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

[loadgen] - add baggage #331

Merged
merged 4 commits into from
Aug 24, 2022

Conversation

puckpuck
Copy link
Contributor

@puckpuck puckpuck commented Aug 23, 2022

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
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
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
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
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
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
Copy link
Member

julianocosta89 commented Aug 24, 2022

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
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
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