File tree 3 files changed +7
-5
lines changed
instrumentation/resources/library
main/java/io/opentelemetry/instrumentation/resources
testSecurityManager/java/io/opentelemetry/instrumentation/resources
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ testing {
77
77
dependencies {
78
78
implementation(project(" :instrumentation:resources:library" ))
79
79
implementation(" io.opentelemetry:opentelemetry-sdk-common" )
80
+ implementation(" io.opentelemetry.semconv:opentelemetry-semconv-incubating" )
80
81
}
81
82
}
82
83
}
Original file line number Diff line number Diff line change 23
23
public final class ProcessResource {
24
24
25
25
// copied from ProcessIncubatingAttributes
26
- static final AttributeKey <List <String >> PROCESS_COMMAND_ARGS =
26
+ private static final AttributeKey <List <String >> PROCESS_COMMAND_ARGS =
27
27
AttributeKey .stringArrayKey ("process.command_args" );
28
- static final AttributeKey <String > PROCESS_COMMAND_LINE =
28
+ private static final AttributeKey <String > PROCESS_COMMAND_LINE =
29
29
AttributeKey .stringKey ("process.command_line" );
30
- static final AttributeKey <String > PROCESS_EXECUTABLE_PATH =
30
+ private static final AttributeKey <String > PROCESS_EXECUTABLE_PATH =
31
31
AttributeKey .stringKey ("process.executable.path" );
32
- static final AttributeKey <Long > PROCESS_PID = AttributeKey .longKey ("process.pid" );
32
+ private static final AttributeKey <Long > PROCESS_PID = AttributeKey .longKey ("process.pid" );
33
33
34
34
// Note: This pattern doesn't support file paths with spaces in them.
35
35
// Important: This is statically used in buildResource, so must be declared/initialized first.
Original file line number Diff line number Diff line change 9
9
10
10
import io .opentelemetry .api .common .Attributes ;
11
11
import io .opentelemetry .sdk .resources .Resource ;
12
+ import io .opentelemetry .semconv .incubating .ProcessIncubatingAttributes ;
12
13
import org .junit .jupiter .api .Test ;
13
14
import org .junit .jupiter .api .TestInstance ;
14
15
import org .junit .jupiter .api .condition .EnabledOnJre ;
@@ -36,7 +37,7 @@ void osResourceEmpty() {
36
37
@ Test
37
38
void processResourceEmpty () {
38
39
Attributes attributes = ProcessResource .buildResource ().getAttributes ();
39
- assertThat (attributes .asMap ()).containsOnlyKeys (ProcessResource .PROCESS_PID );
40
+ assertThat (attributes .asMap ()).containsOnlyKeys (ProcessIncubatingAttributes .PROCESS_PID );
40
41
}
41
42
42
43
@ Test
You can’t perform that action at this time.
0 commit comments