Skip to content

Is there any way to specify service information per process within application for platform / orchestrator apps? #5953

Answered by trask
rkolesnev asked this question in Q&A
Discussion options

You must be logged in to vote

hi @rkolesnev! I think this is a common-ish use case, e.g. when using the Javaagent in an application server that hosts multiple applications.

we don't really have a pre-baked answer for this, but I hope some day we will

for now, I think you could use a SpanProcessor to propagate custom "tenant" attributes down from parent to child, e.g. https://github.com/microsoft/ApplicationInsights-Java/blob/main/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/InheritedAttributesSpanProcessor.java

and then write a SpanExporter wrapper that wraps the SpanData and provides your custom Resource info before passing to the real SpanExporter

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rkolesnev
Comment options

Answer selected by rkolesnev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants