What exactly the method com.instana.sdk.support.ContextSupport#takeSnapshot() does?

The methodtakeSnapshot() ​call will read the current trace Context details like Span Id, trace id, and other trace-related information and put it in an internal map. 
It works with restoreSnapshot()​which will read from the map and set them in the current context. 
These two APIs are helpful when the customer has some kind of asynchronous processing and wants to continue the span in another thread. 

However, the customer should not need to know that since it is just an API and how it works internally is subject to change.

This information has been provided by ENG team, and it's also available on this ticket as well.

Have more questions? Submit a request

Comments