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

zpages /debug/tracez shows a mismatched encoding for trace IDs #1920

Closed
kevincantu opened this issue Oct 7, 2020 · 2 comments
Closed

zpages /debug/tracez shows a mismatched encoding for trace IDs #1920

kevincantu opened this issue Oct 7, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@kevincantu
Copy link

I've been experimenting with otel-collector (contrib) 0.11.0, and hooked up the OTLP gRPC receiver and the logging exporter. (My full config is mostly in this ticket, FWIW.)

When I do the following:

  • create spans in a Python demo app,
  • use the Python Console Exporter (to look at traces),
  • use the Python OTLP gRPC exporter,
  • use the otel-collector's OTLP gRPC receiver,
  • use the otel-collector's logging exporter (to look at traces)...

Expected: when browsing to zpages' /debug/tracez page, and clicking to see detail, the trace IDs should match between interfaces.

Actual: the IDs differ in zpages /debug/tracez!

For example, this console trace:

{
    "name": "kevin-doing-more",
    "context": {
        "trace_id": "0x127f68ce78b35244e1c202019c4be195",
        "span_id": "0x54f8c53815a7ce90",
        "trace_state": "{}"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": "0xd9458faf2617e74c",
    "start_time": "2020-10-07T21:52:11.216741Z",
    "end_time": "2020-10-07T21:52:11.216805Z",
...
{
    "name": "kevin-otel-hello",
    "context": {
        "trace_id": "0x127f68ce78b35244e1c202019c4be195",
        "span_id": "0xd9458faf2617e74c",
        "trace_state": "{}"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": null,
    "start_time": "2020-10-07T21:52:11.216656Z",
    "end_time": "2020-10-07T21:52:11.216823Z",

Turns into (expected) this logging exporter trace:

Span #0
    Trace ID       : 127f68ce78b35244e1c202019c4be195
    Parent ID      : d9458faf2617e74c
    ID             : 54f8c53815a7ce90
    Name           : kevin-doing-more
    Kind           : SPAN_KIND_INTERNAL
    Start time     : 2020-10-07 21:52:11.216741 +0000 UTC
    End time       : 2020-10-07 21:52:11.216805 +0000 UTC
    Status code    : STATUS_CODE_OK
Span #1
    Trace ID       : 127f68ce78b35244e1c202019c4be195
    Parent ID      : 
    ID             : d9458faf2617e74c
    Name           : kevin-otel-hello
    Kind           : SPAN_KIND_INTERNAL
    Start time     : 2020-10-07 21:52:11.216656 +0000 UTC
    End time       : 2020-10-07 21:52:11.216823 +0000 UTC
    Status code    : STATUS_CODE_OK

But (unexpected) is visible as this in /debug/tracez:

2020/10/07-21:52:11.407349      .    33 trace_id: 6211ea005157f6b0ff1856141018e0cd span_id: fb81590a89d3fe76
                                        Attributes:{accepted_spans=2, format="protobuf", refused_spans=0, transport="grpc"}

Screen Shot 2020-10-07 at 3 19 17 PM

Is there some leftover encoding difference from OpenCensus?

@kevincantu kevincantu added the bug Something isn't working label Oct 7, 2020
@kevincantu
Copy link
Author

There are also some smaller nits: the CSS is missing, the page refers to TraceID instead of trace_id, and the "(sec)" label is wrong.

@bogdandrutu
Copy link
Member

Hello @kevincantu, I think this is working as intended, the Spans you see in the zpages are internal spans created by the collector tracing instrumentation and suppose to be used for debugging, the spans that you see in the logging exporter are incoming spans (spans received and flowing in our pipelines). So these two are different spans and different traces.

Please send a fix to the zpages CSS in the https://github.com/census-instrumentation/opencensus-go/tree/master/zpages.

Thank you.

MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
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

No branches or pull requests

2 participants