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

feat: baggage processor #62

Merged
merged 44 commits into from
Feb 1, 2023
Merged

feat: baggage processor #62

merged 44 commits into from
Feb 1, 2023

Conversation

emilyashley
Copy link
Contributor

@emilyashley emilyashley commented Jan 27, 2023

Which problem is this PR solving?

Short description of the changes

  • Adds examples of two ways to implement baggage in the hello-world-flask example app
  • Update trace exporter tests to include batch, baggage, console, and local vis exporters.
  • Implements a BaggageSpanProcessor that reads entries stored in Baggage form the parent contrext and adds the baggage entries to the span on span start. Appears on subsequent child spans.

How to verify that this has the expected result

Run the example hello-world-flask application.

For curl localhost:5000
Expect "queen": "bee" attribute on the honey span. Expect "queen": "bee", "honey": "bee" on the child span.

For curl localhost:5000/ctx
Expect "worker": "bees" attribute on the bumble span. Expect "worker": "bees", "bumble": "bees", "additional": "bees" on the last span.

@emilyashley emilyashley marked this pull request as ready for review January 31, 2023 18:18
@emilyashley emilyashley requested a review from a team January 31, 2023 18:18
src/honeycomb/opentelemetry/baggage.py Outdated Show resolved Hide resolved
src/honeycomb/opentelemetry/baggage.py Outdated Show resolved Hide resolved
Copy link
Contributor

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

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

This is looking great! Couple more suggestions noted and then I think we'll be good to go with this.

src/honeycomb/opentelemetry/baggage.py Outdated Show resolved Hide resolved
tests/test_baggage.py Outdated Show resolved Hide resolved
tests/test_baggage.py Outdated Show resolved Hide resolved
tests/test_baggage.py Outdated Show resolved Hide resolved
tests/test_baggage.py Outdated Show resolved Hide resolved
tests/test_trace.py Show resolved Hide resolved
tests/test_trace.py Outdated Show resolved Hide resolved
tests/test_baggage.py Outdated Show resolved Hide resolved
emilyashley and others added 7 commits February 1, 2023 15:36
Co-Authored-By: Purvi Kanal <8810222+pkanal@users.noreply.github.com>
Co-Authored-By: Purvi Kanal <8810222+pkanal@users.noreply.github.com>
Co-Authored-By: Purvi Kanal <8810222+pkanal@users.noreply.github.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-Authored-By: Purvi Kanal <8810222+pkanal@users.noreply.github.com>
Copy link
Contributor

@pkanal pkanal left a comment

Choose a reason for hiding this comment

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

Looks great! Reviewed and addressed comments over zoom together!

Copy link
Contributor

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

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

baggage

@emilyashley emilyashley merged commit d4fbcc0 into main Feb 1, 2023
@emilyashley emilyashley deleted the emash-baggage-processor branch February 1, 2023 22:00
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.

Add baggage span processor
3 participants