Closed CoderPoet closed 1 year ago
For client calls, it may be possible to use the peer.service mapping
mechanism, but that requires the user to manually configure a mapping, which is not very friendly
Hi @CoderPoet ,
Can we pass the
service.name
in the downstream resource attribute to the upstream through the propagation protocol?For example, propagating the
service.name
in the resource attributes through the http header
This should be doable in the agent, but this kind of feature should probably go through the spec process first. (Also, it's worth noting that there already was a similar request before: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/5353 -- implementation-wise, it'd be good to have a common, extensible mechanism for supplementing HTTP response headers across all server instrumentations)
http response headers can be populated now using https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/bootstrap/http/HttpServerResponseCustomizer.java
this could probably be used to implement something like this in an agent extension
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed automatically if there is no response from the author within 7 additional days from this comment.
Is your feature request related to a problem? Please describe. How to accurately get the downstream service name in the upstream as its own
peer.service
, so as to implement accurate service topology metricsAssuming that
a -> b
, the following metrics can be generated:service_topology{service_name="b", peer_service="a", kind="server"}
Describe the solution you'd like Can we pass the
service.name
in the downstream resource attribute to the upstream through the propagation protocol?For example, propagating the
service.name
in the resource attributes through the http headerDescribe alternatives you've considered Is there a suitable protocol specification