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

fix span name when using the OpenTelemetry tracing provider #51072

Merged
merged 5 commits into from
May 15, 2024

Conversation

zirain
Copy link
Member

@zirain zirain commented May 15, 2024

Please provide a description of this PR:

fix: #51039

related to envoyproxy/envoy#34062 and envoyproxy/envoy#34063

@istio-policy-bot
Copy link

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-policy-bot istio-policy-bot added the release-notes-none Indicates a PR that does not require release notes. label May 15, 2024
@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 15, 2024
Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you help understand this change? was it intentional? is it in need of a release note? etc

@zirain
Copy link
Member Author

zirain commented May 15, 2024

before:

[
    {
        "traceId": "8f52b66b50bb0ee219bfeacbd55ec801",
        "parentId": "00919a47cbbe1e80",
        "id": "8dd6684f51ff3ab9",
        "kind": "SERVER",
        "name": "ingress",
        "timestamp": 1715794113386340,
        "duration": 19624,
        "localEndpoint": {
            "serviceName": "httpbin.default"
        },
        "tags": {
            "component": "proxy",
            "downstream_cluster": "-",
            "guid:x-request-id": "d004fc12-b5bd-9531-a625-324728634a0a",
            "http.method": "GET",
            "http.protocol": "HTTP/1.1",
            "http.status_code": "200",
            "http.url": "http://httpbin:8000/get",
            "istio.canonical_revision": "v1",
            "istio.canonical_service": "httpbin",
            "istio.cluster_id": "Kubernetes",
            "istio.mesh_id": "cluster.local",
            "istio.namespace": "default",
            "node_id": "sidecar~10.244.0.13~httpbin-86b8ffc5ff-6l4k5.default~default.svc.cluster.local",
            "peer.address": "10.244.0.12",
            "request_size": "0",
            "response_flags": "-",
            "response_size": "533",
            "upstream_cluster": "inbound|8080||",
            "upstream_cluster.name": "inbound|8080||",
            "user_agent": "curl/8.7.1",
            "zone": ""
        }
    },
    {
        "traceId": "8f52b66b50bb0ee219bfeacbd55ec801",
        "id": "00919a47cbbe1e80",
        "kind": "CLIENT",
        "name": "egress httpbin:8000",
        "timestamp": 1715794113377458,
        "duration": 33593,
        "localEndpoint": {
            "serviceName": "sleep.default"
        },
        "tags": {
            "component": "proxy",
            "downstream_cluster": "-",
            "guid:x-request-id": "d004fc12-b5bd-9531-a625-324728634a0a",
            "http.method": "GET",
            "http.protocol": "HTTP/1.1",
            "http.status_code": "200",
            "http.url": "http://httpbin:8000/get",
            "istio.canonical_revision": "latest",
            "istio.canonical_service": "sleep",
            "istio.cluster_id": "Kubernetes",
            "istio.mesh_id": "cluster.local",
            "istio.namespace": "default",
            "node_id": "sidecar~10.244.0.12~sleep-7656cf8794-qsff2.default~default.svc.cluster.local",
            "peer.address": "10.244.0.12",
            "request_size": "0",
            "response_flags": "-",
            "response_size": "533",
            "upstream_cluster": "outbound|8000||httpbin.default.svc.cluster.local",
            "upstream_cluster.name": "outbound|8000||httpbin.default.svc.cluster.local",
            "user_agent": "curl/8.7.1",
            "zone": ""
        }
    }
]

after:

[
    {
        "traceId": "e23e9c943172432e68b6f4f4fb508deb",
        "parentId": "23d0cd36428d63ea",
        "id": "bda2bc8bff945277",
        "kind": "SERVER",
        "name": "httpbin.default.svc.cluster.local:8000/*",
        "timestamp": 1715794389528590,
        "duration": 3910,
        "localEndpoint": {
            "serviceName": "httpbin.default"
        },
        "tags": {
            "component": "proxy",
            "downstream_cluster": "-",
            "guid:x-request-id": "662bcff8-6d45-9c65-8a0a-72e4961fb5af",
            "http.method": "GET",
            "http.protocol": "HTTP/1.1",
            "http.status_code": "200",
            "http.url": "http://httpbin:8000/get",
            "istio.canonical_revision": "v1",
            "istio.canonical_service": "httpbin",
            "istio.cluster_id": "Kubernetes",
            "istio.mesh_id": "cluster.local",
            "istio.namespace": "default",
            "node_id": "sidecar~10.244.0.38~httpbin-86b8ffc5ff-gcbq2.default~default.svc.cluster.local",
            "peer.address": "10.244.0.39",
            "request_size": "0",
            "response_flags": "-",
            "response_size": "533",
            "upstream_cluster": "inbound|8080||",
            "upstream_cluster.name": "inbound|8080||",
            "user_agent": "curl/8.7.1",
            "zone": ""
        }
    },
    {
        "traceId": "e23e9c943172432e68b6f4f4fb508deb",
        "id": "23d0cd36428d63ea",
        "kind": "CLIENT",
        "name": "httpbin.default.svc.cluster.local:8000/*",
        "timestamp": 1715794389521838,
        "duration": 14410,
        "localEndpoint": {
            "serviceName": "sleep.default"
        },
        "tags": {
            "component": "proxy",
            "downstream_cluster": "-",
            "guid:x-request-id": "662bcff8-6d45-9c65-8a0a-72e4961fb5af",
            "http.method": "GET",
            "http.protocol": "HTTP/1.1",
            "http.status_code": "200",
            "http.url": "http://httpbin:8000/get",
            "istio.canonical_revision": "latest",
            "istio.canonical_service": "sleep",
            "istio.cluster_id": "Kubernetes",
            "istio.mesh_id": "cluster.local",
            "istio.namespace": "default",
            "node_id": "sidecar~10.244.0.39~sleep-7656cf8794-nvkcr.default~default.svc.cluster.local",
            "peer.address": "10.244.0.39",
            "request_size": "0",
            "response_flags": "-",
            "response_size": "533",
            "upstream_cluster": "outbound|8000||httpbin.default.svc.cluster.local",
            "upstream_cluster.name": "outbound|8000||httpbin.default.svc.cluster.local",
            "user_agent": "curl/8.7.1",
            "zone": ""
        }
    }
]

@zirain
Copy link
Member Author

zirain commented May 15, 2024

can you help understand this change? was it intentional? is it in need of a release note? etc

related to envoyproxy/envoy#34063, it worked as expected.

@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 15, 2024
@zirain zirain requested a review from howardjohn May 15, 2024 18:04
@zirain zirain changed the title fix TestProxyTracingOpenTelemetryProvider fix span name when using the OpenTelemetry tracing provider May 15, 2024
@istio-testing istio-testing merged commit cf4ef83 into istio:master May 15, 2024
28 checks passed
@zirain zirain deleted the fix-otel-tracing branch May 15, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants