Skip to content

[loadgen] - add baggage#331

Merged
austinlparker merged 4 commits into
open-telemetry:mainfrom
honeycombio:loadgen-baggage
Aug 24, 2022
Merged

[loadgen] - add baggage#331
austinlparker merged 4 commits into
open-telemetry:mainfrom
honeycombio:loadgen-baggage

Conversation

@puckpuck

@puckpuck puckpuck commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

Fixes #329

Changes

  • fixes some routes to be the API routes instead of the Browser routes for the frontend
  • Adds a synthetic_request=true baggage to all requests
  • Appropriate CHANGELOG.md updated for non-trivial changes

@puckpuck
puckpuck requested a review from a team August 23, 2022 00:19
@cartersocha

Copy link
Copy Markdown
Contributor

I pulled the branch and did a fresh docker build. I'm not seeing any baggage attribute being created or passed down from the load gen

@puckpuck

Copy link
Copy Markdown
Contributor Author

I pulled the branch and did a fresh docker build. I'm not seeing any baggage attribute being created or passed down from the load gen

baggage doesn't get exported. The only way to see it is to capture the HTTP headers and sniff out the baggage header. To test this, I put a proxy server in place and had the loadgen go through the proxy server. Then within my proxy server I was able to sniff out the baggage header on requests to the frontend.

@cartersocha

Copy link
Copy Markdown
Contributor

I pulled the branch and did a fresh docker build. I'm not seeing any baggage attribute being created or passed down from the load gen

baggage doesn't get exported. The only way to see it is to capture the HTTP headers and sniff out the baggage header. To test this, I put a proxy server in place and had the loadgen go through the proxy server. Then within my proxy server I was able to sniff out the baggage header on requests to the frontend.

How are we expecting baggage to be consumed then if it’s not appearing in jaeger?

Ideally in grafana & jaeger we have filters on is synthetic

@cijothomas

Copy link
Copy Markdown
Member

I pulled the branch and did a fresh docker build. I'm not seeing any baggage attribute being created or passed down from the load gen

baggage doesn't get exported. The only way to see it is to capture the HTTP headers and sniff out the baggage header. To test this, I put a proxy server in place and had the loadgen go through the proxy server. Then within my proxy server I was able to sniff out the baggage header on requests to the frontend.

How are we expecting baggage to be consumed then if it’s not appearing in jaeger?

Ideally in grafana & jaeger we have filters on is synthetic

I think one must write a SpanProcessor to read Baggage and add it as Span Attributes. Baggage is not automatically attached to Spans or Logs or Metrics by default.

(some old discussions from spec open-telemetry/opentelemetry-specification#867)

@puckpuck

Copy link
Copy Markdown
Contributor Author

How are we expecting baggage to be consumed then if it’s not appearing in jaeger?

As was mentioned baggage isn't meant to be exported by OTLP. Some have written SpanProcessors that will take items out of baggage and add them as span attributes before getting exported. Here is an example of one in Go: https://github.com/honeycombio/honeycomb-opentelemetry-go/blob/main/baggage_span_processor.go

We still want people to know baggage was used to drive something about the webstore telemetry. So #332 will add a span attribute app.synthetic_request when it sees the baggage item appear. Also #335 added logic where the app.payment.charged attribute on a span event will be true/false based on that baggage value.

We should most certainly document this stuff, and how baggage is used in downstream services.

@julianocosta89

julianocosta89 commented Aug 24, 2022

Copy link
Copy Markdown
Member

How are we expecting baggage to be consumed then if it’s not appearing in jaeger?

If I got that right, in a real life scenario we could decide to create or not the spans based on the baggage.
Would that be a good use case for it @puckpuck ?

@austinlparker

Copy link
Copy Markdown
Member

How are we expecting baggage to be consumed then if it’s not appearing in jaeger?

If I got that right, in a real life scenario we could decide to create or not the spans based on the baggage. Would that be a good use case for it @puckpuck ?

My 0.02, you wouldn't necessarily want to create spans or not based on baggage (although you could), but it would be useful to insert into the telemetry as an attribute. Let's say you have an SLO (or any other kind of alert) on some API route, perhaps you'd want to filter out synthetic requests from impacting that SLO since it doesn't affect "real" users.

@austinlparker
austinlparker merged commit 2e7a702 into open-telemetry:main Aug 24, 2022
@puckpuck
puckpuck deleted the loadgen-baggage branch August 24, 2022 16:51
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
* add baggage

* add baggage

* add load generator baggage
mohamed3637 added a commit to mohamed3637/opentelemetry-demo that referenced this pull request Oct 7, 2025
* add baggage

* add baggage

* add load generator baggage
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.

Load Generator needs to set baggage

6 participants