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

sampled flag propagated doesn't correspond to actual sampling #400

Closed
ecourreges-orange opened this issue Feb 7, 2020 · 0 comments · Fixed by #407
Closed

sampled flag propagated doesn't correspond to actual sampling #400

ecourreges-orange opened this issue Feb 7, 2020 · 0 comments · Fixed by #407
Labels
bug Something isn't working

Comments

@ecourreges-orange
Copy link
Contributor

ecourreges-orange commented Feb 7, 2020

Describe your environment
From master commit ae484cb with 'pip3 install -e' of all deps (wsgi, jaeger, http_requests ...)

Steps to reproduce
Used the examples/http/tracer_client.py with EXPORTER=jaeger

What is the expected behavior?
The traceparent header sent from client to server contains 01 at the end (sampled flag)

What is the actual behavior?
I see the client and server traces in jaeger
but traceparent has 00 at the end (not sampled)
So in my real world test where my receiving end interprets properly the 00 as non sampled, my traces do not appear in jaeger.

EXPORTER=jaeger ./tracer_client.py 
< GET / HTTP/1.1
< Host: 127.0.0.1:5000
< User-Agent: python-requests/2.18.4
< Accept-Encoding: gzip, deflate
< Accept: */*
< Connection: keep-alive
< traceparent: 00-0b8295be036d5123be218f5bbbf81d4a-787eeb81df08ead6-00
< 

> HTTP/1.0 200 OK
> Content-Type: text/html; charset=utf-8
> Content-Length: 5
> Server: Werkzeug/1.0.0 Python/3.6.9
> Date: Fri, 07 Feb 2020 15:48:29 GMT
> 
hello
Span(name="/", context=SpanContext(trace_id=0x0b8295be036d5123be218f5bbbf81d4a, span_id=0x787eeb81df08ead6, trace_state={}), kind=SpanKind.CLIENT, parent=None, start_time=2020-02-07T15:48:29.431369Z, end_time=2020-02-07T15:48:29.789187Z)

Additional context
To test I replaced the last line of tracer_client.py to this:

from requests_toolbelt.utils import dump

resp = requests.get(url="http://127.0.0.1:5000/")
data = dump.dump_all(resp)
print(data.decode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant