Skip to content

Commit 6e7fa97

Browse files
committed
feat(collector/receiver): expose service.instance.id
1 parent 1a9cbcb commit 6e7fa97

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

collector/receiver/telemetryapireceiver/receiver.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ func newTelemetryAPIReceiver(
337337
r.Attributes().PutStr(semconv.AttributeServiceName, "unknown_service")
338338
}
339339

340+
serviceInstanceID, ok := set.Resource.Attributes().Get(semconv.AttributeServiceInstanceID)
341+
if ok {
342+
r.Attributes().PutStr(semconv.AttributeServiceInstanceID, serviceInstanceID.Str())
343+
}
344+
340345
if val, ok := os.LookupEnv("OTEL_SERVICE_NAME"); ok {
341346
r.Attributes().PutStr(semconv.AttributeServiceName, val)
342347
}

0 commit comments

Comments
 (0)