use of io.opencensus.proto.agent.common.v1.ProcessIdentifier in project instrumentation-java by census-instrumentation.
the class OcAgentNodeUtilsTest method getProcessIdentifier.
@Test
public void getProcessIdentifier() {
String jvmName = "54321@my.org";
Timestamp timestamp = Timestamp.create(10, 20);
ProcessIdentifier processIdentifier = OcAgentNodeUtils.getProcessIdentifier(jvmName, timestamp);
assertThat(processIdentifier.getHostName()).isEqualTo("my.org");
assertThat(processIdentifier.getPid()).isEqualTo(54321);
assertThat(processIdentifier.getStartTimestamp()).isEqualTo(com.google.protobuf.Timestamp.newBuilder().setSeconds(10).setNanos(20).build());
}
Aggregations