Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EUM script correlation #138

Merged
merged 6 commits into from
Jul 21, 2020
Merged

Support EUM script correlation #138

merged 6 commits into from
Jul 21, 2020

Conversation

andrewslotin
Copy link
Contributor

Forward the correlation ID and type provided by Instana end-user monitoring script to the host agent in span.crid and span.crtp fields. These values override provided X-Instana-T and X-Instana-S header values, effectively forcing a new trace when provided.

@andrewslotin andrewslotin requested a review from pglombardo July 20, 2020 10:14
Copy link
Contributor

@pglombardo pglombardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

recorder := instana.NewTestRecorder()
tracer := instana.NewTracerWithEverything(&instana.Options{}, recorder)

sp := tracer.StartSpan("test", ot.ChildOf(instana.SpanContext{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a valid use case? I didn't know that...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ot.ChildOf() takes a span context, which is an interface type, so there it's possible to use any type that satisfies ot.SpanContext there, although you probably should not create your own parent contexts in production code... Here is just for testing purposes only.

@andrewslotin andrewslotin merged commit 874e706 into master Jul 21, 2020
@andrewslotin andrewslotin deleted the correlation_id_support branch July 21, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants