forked from open-telemetry/opentelemetry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSemConvAttributesTest.java
More file actions
37 lines (30 loc) · 1.43 KB
/
SemConvAttributesTest.java
File metadata and controls
37 lines (30 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.sdk.internal;
import static org.assertj.core.api.Assertions.assertThat;
import io.opentelemetry.semconv.ErrorAttributes;
import io.opentelemetry.semconv.HttpAttributes;
import io.opentelemetry.semconv.ServerAttributes;
import io.opentelemetry.semconv.incubating.OtelIncubatingAttributes;
import io.opentelemetry.semconv.incubating.RpcIncubatingAttributes;
import org.junit.jupiter.api.Test;
class SemConvAttributesTest {
@Test
void testAttributeKeys() {
assertThat(SemConvAttributes.OTEL_COMPONENT_NAME)
.isEqualTo(OtelIncubatingAttributes.OTEL_COMPONENT_NAME);
assertThat(SemConvAttributes.OTEL_COMPONENT_TYPE)
.isEqualTo(OtelIncubatingAttributes.OTEL_COMPONENT_TYPE);
assertThat(SemConvAttributes.OTEL_SPAN_SAMPLING_RESULT)
.isEqualTo(OtelIncubatingAttributes.OTEL_SPAN_SAMPLING_RESULT);
assertThat(SemConvAttributes.ERROR_TYPE).isEqualTo(ErrorAttributes.ERROR_TYPE);
assertThat(SemConvAttributes.SERVER_ADDRESS).isEqualTo(ServerAttributes.SERVER_ADDRESS);
assertThat(SemConvAttributes.SERVER_PORT).isEqualTo(ServerAttributes.SERVER_PORT);
assertThat(SemConvAttributes.RPC_GRPC_STATUS_CODE)
.isEqualTo(RpcIncubatingAttributes.RPC_GRPC_STATUS_CODE);
assertThat(SemConvAttributes.HTTP_RESPONSE_STATUS_CODE)
.isEqualTo(HttpAttributes.HTTP_RESPONSE_STATUS_CODE);
}
}