Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ static ByteBuffer generateProcessCorrelationStorage(
if (serviceName == null) {
throw new IllegalStateException("A service name must be configured!");
}
String environment =
serviceResource.getAttribute(UniversalProfilingIncubatingAttributes.SERVICE_NAMESPACE);
String environment = serviceResource.getAttribute(ServiceAttributes.SERVICE_NAMESPACE);

ByteBuffer buffer = ByteBuffer.allocateDirect(4096);
buffer.order(ByteOrder.nativeOrder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ private UniversalProfilingIncubatingAttributes() {}

// not yet part of stable semantic conventions, inlined here to prevent dependency issues

public static final AttributeKey<String> SERVICE_NAMESPACE =
AttributeKey.stringKey("service.namespace");
public static final AttributeKey<String> HOST_ID = AttributeKey.stringKey("host.id");
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@

import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.semconv.incubating.HostIncubatingAttributes;
import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import org.junit.jupiter.api.Test;

public class UniversalProfilingIncubatingAttributesTest {

@Test
void serviceNamespace() {
check(
UniversalProfilingIncubatingAttributes.SERVICE_NAMESPACE,
ServiceIncubatingAttributes.SERVICE_NAMESPACE);
}

@Test
void hostId() {
check(UniversalProfilingIncubatingAttributes.HOST_ID, HostIncubatingAttributes.HOST_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import io.opentelemetry.sdk.trace.samplers.SamplingResult;
import io.opentelemetry.semconv.ServiceAttributes;
import io.opentelemetry.semconv.incubating.HostIncubatingAttributes;
import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import java.lang.ref.WeakReference;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down Expand Up @@ -254,7 +253,7 @@ public void testProcessStoragePopulated() {
Resource withNamespace =
Resource.builder()
.put(ServiceAttributes.SERVICE_NAME, "service Ä 1")
.put(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "my nameßspace")
.put(ServiceAttributes.SERVICE_NAMESPACE, "my nameßspace")
.build();
try (OpenTelemetrySdk sdk = initSdk(withNamespace, b -> {}, Sampler.alwaysOn())) {
checkProcessStorage("service Ä 1", "my nameßspace");
Expand Down
Loading