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

Missing grpc status code label in trace metrics #2903

Open
juanzolotoochin opened this issue Oct 1, 2024 · 1 comment
Open

Missing grpc status code label in trace metrics #2903

juanzolotoochin opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
enhancement quick change/addition that does not need full team approval

Comments

@juanzolotoochin
Copy link

I'm using UnaryServerInterceptor from "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc".

This generates a metric trace.grpc.server.hits which is the main metric I have for incoming traffic for my gRPC service.

I'd expect this metric to be labeled with the gRPC status code so I can count hits by status code.

Other datadog integrations (such as python flask) already do this with http status code.

@juanzolotoochin juanzolotoochin added the enhancement quick change/addition that does not need full team approval label Oct 1, 2024
@github-actions github-actions bot added the needs-triage New issues that have not yet been triaged label Oct 1, 2024
@mtoffl01
Copy link
Contributor

mtoffl01 commented Oct 8, 2024

Hello!

Yes, this is a known limitation; http.status_code is a tag on trace metrics but grpc.status.code is not. The grpc spans populate the latter attribute and not the former.
See: https://docs.datadoghq.com/tracing/metrics/metrics_namespace/#metric-suffix

A few quick workarounds while the team discusses this further:

@mtoffl01 mtoffl01 self-assigned this Oct 8, 2024
@mtoffl01 mtoffl01 removed the needs-triage New issues that have not yet been triaged label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement quick change/addition that does not need full team approval
Projects
None yet
Development

No branches or pull requests

2 participants