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

Add flag to use producer context as consumer parent #11

Merged

Conversation

Steffen911
Copy link
Contributor

Issue

Fixes #10

What

Adds a new useProducerContextAsConsumerParent that defaults to false. When set to true, the consumer trace uses the context of the producer as its active context, i.e. it keeps the same traceId. In that case, there is no link to the producer span.

Copy link
Collaborator

@unflxw unflxw left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

@unflxw
Copy link
Collaborator

unflxw commented Oct 7, 2024

@Steffen911 Could you make it so that Prettier is happy? 😅

@Steffen911
Copy link
Contributor Author

@unflxw It should be happy now 😄

@unflxw unflxw merged commit f836455 into appsignal:main Oct 8, 2024
17 checks passed
@Steffen911 Steffen911 deleted the feat/10-use-producer-context-in-consumer branch October 8, 2024 06:46
unflxw added a commit that referenced this pull request Oct 8, 2024
Some tweaks to the changes introduced in #11.

Rename the config option to `useProducerSpanAsConsumerParent` (that
is, `s/Context/Span`) to use language that is more familiar to casual
OpenTelemetry users.

Rewrite the config option description to describe what happens with
and without the config option.

Rearrange the instrumentation to move logic branches out of the span
creation function.
unflxw added a commit that referenced this pull request Oct 8, 2024
Some tweaks to the changes introduced in #11.

Rename the config option to `useProducerSpanAsConsumerParent` (that
is, `s/Context/Span`) to use language that is more familiar to casual
OpenTelemetry users.

Rewrite the config option description to describe what happens with
and without the config option.

Rearrange the instrumentation to move logic branches out of the span
creation function.
unflxw added a commit that referenced this pull request Oct 8, 2024
Some tweaks to the changes introduced in #11.

Rename the config option to `useProducerSpanAsConsumerParent` (that
is, `s/Context/Span`) to use language that is more familiar to casual
OpenTelemetry users.

Rewrite the config option description to describe what happens with
and without the config option.

Rearrange the instrumentation to move logic branches out of the span
creation function.
unflxw added a commit that referenced this pull request Oct 8, 2024
Some tweaks to the changes introduced in #11.

Rename the config option to `useProducerSpanAsConsumerParent` (that
is, `s/Context/Span`) to use language that is more familiar to casual
OpenTelemetry users.

Rewrite the config option description to describe what happens with
and without the config option.

Rearrange the instrumentation to move logic branches out of the span
creation function.
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.

Use ProducerContext as active context in Consumer
2 participants