Repository navigation
fix(opentelemetry_grpc): set error.type to the gRPC status code name #893
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
Merged
yordis
merged 22 commits into
open-telemetry:main
from
yordis:yordis/fix-grpc-error-type-status-code
Dec 3, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0161cbf
test(opentelemetry_grpc): expect the status code as error.type on fai…
yordis 8ff0f3f
fix(opentelemetry_grpc): set error.type to the gRPC status code so fa…
yordis 6785da0
test(opentelemetry_grpc): describe a raising client call by its excep…
yordis 301fb83
fix(opentelemetry_grpc): describe a raising client call by its except…
yordis 461fa3a
refactor(opentelemetry_grpc): take the gRPC status code names from th…
yordis 6bc1787
test(opentelemetry_grpc): expect an error type when a client call ret…
yordis 004ec62
fix(opentelemetry_grpc): set error.type when a client call returns a …
yordis 736bf15
docs(opentelemetry_grpc): point the server error codes at the gRPC se…
yordis 9678a32
test(opentelemetry_grpc): expect a raising client call to name its ex…
yordis d0a42f9
fix(opentelemetry_grpc): name a raising client call's exception the w…
yordis 69e415c
test(opentelemetry_grpc): expect a client call to record a status cod…
yordis 0217cfa
fix(opentelemetry_grpc): describe a client status code grpc has no na…
yordis 397f1a3
test(opentelemetry_grpc): expect a raised RPCError on a client call t…
yordis 6eb364f
fix(opentelemetry_grpc): name a raised RPCError on a client call by i…
yordis 06dede3
test(opentelemetry_grpc): expect no description when a client call fa…
yordis b3bae86
fix(opentelemetry_grpc): leave the description empty when a client ca…
yordis 3cd859c
test(opentelemetry_grpc): expect no description when a server handler…
yordis 7478e88
fix(opentelemetry_grpc): leave the description empty when a server ha…
yordis 75ab2ef
test(opentelemetry_grpc): expect a client call that returns an except…
yordis 0afcaf6
fix(opentelemetry_grpc): name and describe a client call that returns…
yordis f303fc2
refactor(opentelemetry_grpc): name a raised client exception the same…
yordis aa98e2e
fix(opentelemetry_grpc): record Erlang errors as the exception they n…
yordis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
instrumentation/opentelemetry_grpc/lib/opentelemetry_grpc/status_code.ex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| defmodule OpentelemetryGrpc.StatusCode do | ||
| @moduledoc false | ||
|
|
||
| alias OpenTelemetry.SemConv.Incubating.RPCAttributes | ||
|
|
||
| @names Map.new(RPCAttributes.rpc_grpc_status_code_values(), fn {name, code} -> | ||
| {code, name |> Atom.to_string() |> String.upcase()} | ||
| end) | ||
|
|
||
| @spec name(non_neg_integer()) :: String.t() | ||
| def name(code), do: Map.get(@names, code, "_OTHER") | ||
| end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.