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

Traces are generated with an inconsistent operationName value when combining multiple unis #44524

Open
jcuero opened this issue Nov 15, 2024 · 1 comment · May be fixed by #44523
Open

Traces are generated with an inconsistent operationName value when combining multiple unis #44524

jcuero opened this issue Nov 15, 2024 · 1 comment · May be fixed by #44523
Labels
area/tracing kind/bug Something isn't working

Comments

@jcuero
Copy link

jcuero commented Nov 15, 2024

Describe the bug

When combining multiple unis, the operationName field retains the last uni processed instead of retaining the value it was initialized with. As a result, the generated spans are not consistent.

I found that the same context instance is being shared and modified by different instances of ClientObservabilityHandler

Also, different instances of WebTargetImpl are sharing the same HandlerChain instance. This should not happen because the setPreClientSendHandler method is called multiple times with different instances of ClientObservabilityHandler.

Expected behavior

Trace Data

{
  "data": [
    {
      "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
      "spans": [
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "e3ecee88cc741899",
          "operationName": "GET /wizard-server/start",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "04d3bf6a57dca42f"
            }
          ],
          "startTime": 1731645575679604,
          "duration": 2024898,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 10
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/start"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "start"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/start"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "f75295bb442800ac",
          "operationName": "GET /wizard-server/step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "682f9b7414832f43"
            }
          ],
          "startTime": 1731645577720739,
          "duration": 1006705,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_3"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step3"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_3"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "04d3bf6a57dca42f",
          "operationName": "GET /start",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "b074666abd57caee"
            }
          ],
          "startTime": 1731645575677360,
          "duration": 2032231,
          "tags": [
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/start"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "391193cd534c7407",
          "operationName": "GET /wizard-server/step_1",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "ae90dff874de7198"
            }
          ],
          "startTime": 1731645577718967,
          "duration": 1008079,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_1"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step1"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_1"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "682f9b7414832f43",
          "operationName": "GET /step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "b074666abd57caee"
            }
          ],
          "startTime": 1731645577720240,
          "duration": 1010181,
          "tags": [
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_3"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "ae90dff874de7198",
          "operationName": "GET /step_1",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "b074666abd57caee"
            }
          ],
          "startTime": 1731645577718383,
          "duration": 1009752,
          "tags": [
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_1"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "49227e2e820e2f95",
          "operationName": "GET /wizard-server/step_2",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "12d37b8c17445089"
            }
          ],
          "startTime": 1731645577720761,
          "duration": 4007636,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_2"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step2"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_2"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "12d37b8c17445089",
          "operationName": "GET /step_2",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "b074666abd57caee"
            }
          ],
          "startTime": 1731645577719843,
          "duration": 4010205,
          "tags": [
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_2"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "6194ddf9fcc8147f",
          "operationName": "GET /complete",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "b074666abd57caee"
            }
          ],
          "startTime": 1731645581735629,
          "duration": 1011297,
          "tags": [
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/complete"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "96b1ed0d1fc6f3a6",
          "operationName": "GET /wizard-server/complete",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
              "spanID": "6194ddf9fcc8147f"
            }
          ],
          "startTime": 1731645581737274,
          "duration": 1009286,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 13
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/complete"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "complete"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/complete"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "4d7d7d25e47e2e8ee4ed9056c3892539",
          "spanID": "b074666abd57caee",
          "operationName": "GET /wizard-client/work",
          "references": [],
          "startTime": 1731645575621021,
          "duration": 7126393,
          "tags": [
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "work"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "IntelliJ HTTP Client/IntelliJ IDEA 2024.2.3"
            },
            {
              "key": "http.request.body.size",
              "type": "int64",
              "value": 0
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 10
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-client/work"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-client/work"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.client.WizardClientResource"
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        }
      ],
      "processes": {
        "p1": {
          "serviceName": "quarkus-open-telemetry-bug",
          "tags": [
            {
              "key": "host.name",
              "type": "string",
              "value": "....local"
            },
            {
              "key": "otel.library.name",
              "type": "string",
              "value": "io.quarkus.opentelemetry"
            },
            {
              "key": "service.version",
              "type": "string",
              "value": "1.0.0-SNAPSHOT"
            },
            {
              "key": "telemetry.sdk.language",
              "type": "string",
              "value": "java"
            },
            {
              "key": "telemetry.sdk.name",
              "type": "string",
              "value": "opentelemetry"
            },
            {
              "key": "telemetry.sdk.version",
              "type": "string",
              "value": "1.42.1"
            },
            {
              "key": "webengine.name",
              "type": "string",
              "value": "Quarkus"
            },
            {
              "key": "webengine.version",
              "type": "string",
              "value": "999-SNAPSHOT"
            }
          ]
        }
      },
      "warnings": null
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0,
  "errors": null
}

Actual behavior

Trace Data

{
  "data": [
    {
      "traceID": "6e10a4f88b501f26142756421dcb40a9",
      "spans": [
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "cf4b4eba5509e2e8",
          "operationName": "GET /start",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "795b9fe4719c53b3"
            }
          ],
          "startTime": 1731644785471718,
          "duration": 2033385,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/start"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "2eb0c9b358ffdc06",
          "operationName": "GET /wizard-server/start",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "cf4b4eba5509e2e8"
            }
          ],
          "startTime": 1731644785474250,
          "duration": 2025914,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/start"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "start"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/start"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 10
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "11ece084954f6977",
          "operationName": "GET /step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "795b9fe4719c53b3"
            }
          ],
          "startTime": 1731644787515208,
          "duration": 1007025,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_1"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "a7389ddf3f36d643",
          "operationName": "GET /wizard-server/step_1",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "11ece084954f6977"
            }
          ],
          "startTime": 1731644787515778,
          "duration": 1005606,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_1"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step1"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_1"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "d84715cac324505a",
          "operationName": "GET /wizard-server/step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "e25b894b1492fd55"
            }
          ],
          "startTime": 1731644787517348,
          "duration": 1005729,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_3"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step3"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_3"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "e25b894b1492fd55",
          "operationName": "GET /step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "795b9fe4719c53b3"
            }
          ],
          "startTime": 1731644787516839,
          "duration": 1007112,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_3"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "6117ee1b325348df",
          "operationName": "GET /step_3",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "795b9fe4719c53b3"
            }
          ],
          "startTime": 1731644787516408,
          "duration": 4008008,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/step_2"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "981ba4af000341fc",
          "operationName": "GET /wizard-server/step_2",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "6117ee1b325348df"
            }
          ],
          "startTime": 1731644787517409,
          "duration": 4006274,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/step_2"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "step2"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/step_2"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 11
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "40d15e4143e4ed6f",
          "operationName": "GET /wizard-server/complete",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "28c7dc7067a25965"
            }
          ],
          "startTime": 1731644791527162,
          "duration": 1006097,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "Quarkus REST Client"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-server/complete"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.server.WizardServerResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "complete"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-server/complete"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 13
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "28c7dc7067a25965",
          "operationName": "GET /complete",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "6e10a4f88b501f26142756421dcb40a9",
              "spanID": "795b9fe4719c53b3"
            }
          ],
          "startTime": 1731644791526528,
          "duration": 1007556,
          "tags": [
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.full",
              "type": "string",
              "value": "http://localhost:8080/wizard-server/complete"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "client"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "6e10a4f88b501f26142756421dcb40a9",
          "spanID": "795b9fe4719c53b3",
          "operationName": "GET /wizard-client/work",
          "references": [],
          "startTime": 1731644781619844,
          "duration": 10915466,
          "tags": [
            {
              "key": "user_agent.original",
              "type": "string",
              "value": "IntelliJ HTTP Client/IntelliJ IDEA 2024.2.3"
            },
            {
              "key": "code.function",
              "type": "string",
              "value": "work"
            },
            {
              "key": "http.response.status_code",
              "type": "int64",
              "value": 200
            },
            {
              "key": "url.scheme",
              "type": "string",
              "value": "http"
            },
            {
              "key": "server.port",
              "type": "int64",
              "value": 8080
            },
            {
              "key": "http.request.body.size",
              "type": "int64",
              "value": 0
            },
            {
              "key": "server.address",
              "type": "string",
              "value": "localhost"
            },
            {
              "key": "client.address",
              "type": "string",
              "value": "127.0.0.1"
            },
            {
              "key": "url.path",
              "type": "string",
              "value": "/wizard-client/work"
            },
            {
              "key": "code.namespace",
              "type": "string",
              "value": "org.acme.client.WizardClientResource"
            },
            {
              "key": "http.request.method",
              "type": "string",
              "value": "GET"
            },
            {
              "key": "http.route",
              "type": "string",
              "value": "/wizard-client/work"
            },
            {
              "key": "http.response.body.size",
              "type": "int64",
              "value": 10
            },
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "otlp"
            }
          ],
          "logs": [],
          "processID": "p1",
          "warnings": null
        }
      ],
      "processes": {
        "p1": {
          "serviceName": "quarkus-open-telemetry-bug",
          "tags": [
            {
              "key": "host.name",
              "type": "string",
              "value": "....local"
            },
            {
              "key": "otel.library.name",
              "type": "string",
              "value": "io.quarkus.opentelemetry"
            },
            {
              "key": "service.version",
              "type": "string",
              "value": "1.0.0-SNAPSHOT"
            },
            {
              "key": "telemetry.sdk.language",
              "type": "string",
              "value": "java"
            },
            {
              "key": "telemetry.sdk.name",
              "type": "string",
              "value": "opentelemetry"
            },
            {
              "key": "telemetry.sdk.version",
              "type": "string",
              "value": "1.42.1"
            },
            {
              "key": "webengine.name",
              "type": "string",
              "value": "Quarkus"
            },
            {
              "key": "webengine.version",
              "type": "string",
              "value": "999-SNAPSHOT"
            }
          ]
        }
      },
      "warnings": null
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0,
  "errors": null
}

We have three operation names where "operationName": "GET /step_3" but we should have only one. And in two of them, the url.full tag corresponds to another url that was called previously.

How to Reproduce?

Reproducer: https://github.com/jcuero/quarkus-open-telemetry-bug

Run the project and execute:

curl -X GET --location "http://localhost:8080/wizard-client/work"

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@jcuero jcuero added the kind/bug Something isn't working label Nov 15, 2024
Copy link

quarkus-bot bot commented Nov 15, 2024

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant