Skip to content

Support of custom ContextStorageProvider? #7917

Answered by laurit
gpoulin asked this question in Q&A
Discussion options

You must be logged in to vote

You can customize the agent with an extension, see https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/examples/extension There you could use ContextStorageProvider SPI to provide your own context storage just like with manual instrumentation. Keep in mind that agent code is in a different class loader from your application and does not have access to your application classes. It is clear that if you choose to replace the default context storage with something that uses finagle from your application you'll have to apply some pretty serious magic. I personally would attempt instrumenting finagle to propagate otel context instead of trying to replace the agent con…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gpoulin
Comment options

@laurit
Comment options

Answer selected by gpoulin
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