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

Jaeger Propagator not handling missing carrier #1542

Closed
ehiggs opened this issue Jan 22, 2021 · 1 comment · Fixed by #1545
Closed

Jaeger Propagator not handling missing carrier #1542

ehiggs opened this issue Jan 22, 2021 · 1 comment · Fixed by #1545
Labels
bug Something isn't working

Comments

@ehiggs
Copy link
Contributor

ehiggs commented Jan 22, 2021

Python 3.8 / Flask injector 0.17b0

Steps to reproduce
If jaeger is the text map and you do not send a carrier header then the parser fails when it tries to parse the carrier header.

        if context is None:
            context = get_current()
        fields = _extract_first_element(
            getter.get(carrier, self.TRACE_ID_KEY)
        ).split(":")

**What is the expected **
Parse as invalid span. Code continues.

What is the actual behavior?

File "/usr/local/lib/python3.8/site-packages/opentelemetry/propagators/jaeger/__init__.py", line 48, in extract
 fields = _extract_first_element(
AttributeError: 'NoneType' object has no attribute ‘split’

Additional context
TraceContextTextMapPropagator does this:

        header = getter.get(carrier, self._TRACEPARENT_HEADER_NAME)

        if not header:
            return trace.set_span_in_context(trace.INVALID_SPAN, context)
@ehiggs ehiggs added the bug Something isn't working label Jan 22, 2021
@ehiggs ehiggs changed the title Jaeger Propagator not handling missing contexts Jaeger Propagator not handling missing carrier Jan 22, 2021
@srikanthccv
Copy link
Member

It was not very clear from gitter discussion. IIUC it is giving error when the carrier doesn't have the propagation headers (for ex: x-b3-traceid or uber-trace-id) instead of setting invalid span context. I haven't looked at jaeger propagator code closely, but looks like this indeed is not expected behavior.

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