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

Allow parent/child relationship in Opentelemetry spans #1779

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

meum
Copy link

@meum meum commented Jan 28, 2025

Proposed Changes

Adds an option to set remote span as parent rather than link when propagating Opentelemetry context between the publisher and receiver.
See issue #1666

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

@lukebakken lukebakken self-assigned this Jan 28, 2025
@lukebakken lukebakken added this to the 7.2.0 milestone Jan 28, 2025
Copy link

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

LGTM from otel semconv perspective!

projects/RabbitMQ.Client/Impl/RabbitMQActivitySource.cs Outdated Show resolved Hide resolved
meum and others added 2 commits January 31, 2025 08:46
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
@meum
Copy link
Author

meum commented Jan 31, 2025

Does it make more sense to remove the TracingLinkType enum, and just have a bool UsePublisherAsParent?
My original reason for making an enum was that we might want something more advanced in the future, e.g. making it configurable per message, or automatically determining if parent/child makes sense based on the exchange type. But I'm not sure what that would look like.

@stebet
Copy link
Contributor

stebet commented Jan 31, 2025

LGTM :)

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.

5 participants