io.opentelemetry.instrumentation.rocketmqclient.v4_8.TextMapExtractAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-rocketmq-client-4.8 Show documentation
Show all versions of opentelemetry-rocketmq-client-4.8 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
The newest version!
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.instrumentation.rocketmqclient.v4_8;
import io.opentelemetry.context.propagation.TextMapGetter;
import javax.annotation.Nullable;
import org.apache.rocketmq.common.message.MessageExt;
enum TextMapExtractAdapter implements TextMapGetter {
INSTANCE;
@Override
public Iterable keys(MessageExt carrier) {
return carrier.getProperties().keySet();
}
@Nullable
@Override
public String get(@Nullable MessageExt carrier, String key) {
return carrier == null ? null : carrier.getProperties().get(key);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy