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

Multiple duplicated records in Jaeger #1043

Closed
asyncee opened this issue Aug 26, 2020 · 2 comments
Closed

Multiple duplicated records in Jaeger #1043

asyncee opened this issue Aug 26, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@asyncee
Copy link

asyncee commented Aug 26, 2020

Hello.

I have created a simple demo project in Python that uses fastapi, requests and corresponding instrumentation libraries. The project consists of two simple apps. First application sends request to second application to get some json payload back and then displays it on the screen to the user. All communications are instrumented via instrumentation libraries:

  • opentelemetry-instrumentation-requests
  • opentelemetry-instrumentation-fastapi

I have two exporters: Jaeger one and console exporter (for debugging).

When i open Jaeger interface, i see multiple duplicate entries for the same span and a warning message "Duplicate span ID", but json that is written to sdtout is valid and does not contain any duplicate ids. Jaeger is deployed in Docker container and using last version.

I have created demo project to help you reproduce the problem: https://github.com/asyncee/opentelemetry-issue/tree/master

Following screenshot demonstrates that every span is duplicated (app_a / and app_b /welcome):

image

Following screenshot demonstrates warnings:

2020-08-26_18-06-34

Trace created by console exporter:

{
    "name": "/welcome",
    "context": {
        "trace_id": "0x2f42e1c358ec8f0901fb3df0715b52f5",
        "span_id": "0xce26fccf215dfd48",
        "trace_state": "{}"
    },
    "kind": "SpanKind.CLIENT",
    "parent_id": "0x1141b51b2ec62f64",
    "start_time": "2020-08-26T15:02:36.347670Z",
    "end_time": "2020-08-26T15:02:36.359535Z",
    "status": {
        "canonical_code": "OK"
    },
    "attributes": {
        "component": "http",
        "http.method": "GET",
        "http.url": "http://localhost:8001/welcome",
        "http.status_code": 200,
        "http.status_text": "OK"
    },
    "events": [],
    "links": [],
    "resource": {}
}
{
    "name": "get_welcome_message",
    "context": {
        "trace_id": "0x2f42e1c358ec8f0901fb3df0715b52f5",
        "span_id": "0x1141b51b2ec62f64",
        "trace_state": "{}"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": "0x93f7571142329617",
    "start_time": "2020-08-26T15:02:36.347574Z",
    "end_time": "2020-08-26T15:02:36.359591Z",
    "status": {
        "canonical_code": "OK"
    },
    "attributes": {},
    "events": [],
    "links": [],
    "resource": {}
}
{
    "name": "/ asgi.http.send",
    "context": {
        "trace_id": "0x2f42e1c358ec8f0901fb3df0715b52f5",
        "span_id": "0x11bd45da87f24542",
        "trace_state": "{}"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": "0x93f7571142329617",
    "start_time": "2020-08-26T15:02:36.360270Z",
    "end_time": "2020-08-26T15:02:36.360558Z",
    "status": {
        "canonical_code": "OK"
    },
    "attributes": {
        "http.status_code": 200,
        "type": "http.response.start"
    },
    "events": [],
    "links": [],
    "resource": {}
}
{
    "name": "/ asgi.http.send",
    "context": {
        "trace_id": "0x2f42e1c358ec8f0901fb3df0715b52f5",
        "span_id": "0xd1ff9dbd6eb6b48e",
        "trace_state": "{}"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": "0x93f7571142329617",
    "start_time": "2020-08-26T15:02:36.360623Z",
    "end_time": "2020-08-26T15:02:36.360686Z",
    "status": {
        "canonical_code": "OK"
    },
    "attributes": {
        "type": "http.response.body"
    },
    "events": [],
    "links": [],
    "resource": {}
}
{
    "name": "/ asgi",
    "context": {
        "trace_id": "0x2f42e1c358ec8f0901fb3df0715b52f5",
        "span_id": "0x93f7571142329617",
        "trace_state": "{}"
    },
    "kind": "SpanKind.SERVER",
    "parent_id": null,
    "start_time": "2020-08-26T15:02:36.346879Z",
    "end_time": "2020-08-26T15:02:36.360705Z",
    "status": {
        "canonical_code": "OK"
    },
    "attributes": {
        "component": "http",
        "http.scheme": "http",
        "http.host": "127.0.0.1:8000",
        "host.port": 8000,
        "http.flavor": "1.1",
        "http.target": "/",
        "http.url": "http://127.0.0.1:8000/",
        "http.method": "GET",
        "http.server_name": "127.0.0.1:8000",
        "http.user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.108 Safari/537.36",
        "net.peer.ip": "127.0.0.1",
        "net.peer.port": 51389,
        "http.route": "/"
    },
    "events": [],
    "links": [],
    "resource": {}
}

Thanks!

@asyncee asyncee added the bug Something isn't working label Aug 26, 2020
@asyncee
Copy link
Author

asyncee commented Aug 27, 2020

Zipkin backend does not have this problem, so i will switch to that for my research needs.

@asyncee asyncee closed this as completed Aug 27, 2020
@codeboten
Copy link
Contributor

Thanks for following up @asyncee, just to close the loop, I think this issue was a duplicate of #981 which was just recently fixed in the jaeger exporter.

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