question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gRPC statusCode tag should be integer

See original GitHub issue

The problem

grpc.*.processing.duration timers have a tag, statusCode, which is the name of enum Status. The name is misleading because the tag value is a string, not an integer code. It is also difficult to use the string value for automated alerts (raise hell if 75% of calls failed in the last 30 minutes). There’s no easy way to differentiate failed status codes from good ones without complicated regex that many alerting systems don’t support.

The solution

statusCode should be the integer value of the status. Only 0 (OK) and 1 (CANCELLED) are good statuses, which makes it very easy to find all failed calls (> 1).

Please add a tag status, the value of which will be the enum name; change statusCode to be the integer value of the enum.

Alternatives considered

None exists.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
asarkarcommented, May 18, 2021

Please search for the proper syntax for your chosen system yourself.

I’ve already done the research, and posted the link above, and not asking for help on that. It goes to show that your earlier comment “modern monitoring systems are either capable of remapping or checking for multiple values” isn’t true, so this ticket was closed prematurely on invalid grounds.

That said, I understand OSS doesn’t come with any guarantees, so I’m going to find a way around without support from the library. Thanks.

0reactions
ST-DDTcommented, May 18, 2021

Sorry, but I cannot help you with that. Please search for the proper syntax for your chosen system yourself. The online documentation or SO can probably help you way better with that setup than I currently can. If such a feature is not supported by that system, you should consider using one, that offers what you need.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4, gRPC: Under the Hood - O'Reilly
Defines the endpoint path. For gRPC, this value is constructed as “/” {service name} “/” {method name}. Defines the virtual hostname of the...
Read more >
How to return grpc error in nodejs - Stack Overflow
grpc.status.NOT_FOUND is just a integer, 5, and when the client gets an error response from the server you can read it off the...
Read more >
Consuming a gRPC Service - Quarkus
Dev Mode. gRPC clients can be injected in your application code. ... createFrom().range(0, max) .map(i -> Integer.toString(i)) .map(i -> Item.newBuilder().
Read more >
Processors - Datadog Docs
Structured logs should be shipped in a valid format. ... The remapper processor remaps any source attribute(s) or tags to another target attribute...
Read more >
VirtualServer and VirtualServerRoute Resources
If the pod labels are updated, the Ingress Controller will not see that ... grpcStatus, The expected gRPC status code of the upstream...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found