-
Notifications
You must be signed in to change notification settings - Fork 786
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
Support for error.type #4865
Comments
Related discussion on introduction of error.type which states that leaving out well-known values is intentional: open-telemetry/semantic-conventions#205 |
This issue might also solve #3600 even though the proposed solution is different. |
If possible I would like to take this issue my self when the time is right and we have settled on which values to use 😉 |
This might be relevant for .NET 8. |
Workaround for cancelled requests until error.type is implemented. .AddAspNetCoreInstrumentation(options =>
{
options.EnrichWithHttpResponse = (activity, response) =>
{
if (response.HttpContext.RequestAborted.IsCancellationRequested)
{
activity.AddTag("custom.error.type", "cancelled");
}
};
}) |
@kaspertygesen Thanks for the detailed issue and the links. Here is my observation: Status code in case of
Now, regarding the issue that you have raised. There are two possibilities we can go with
I think we should go with |
@vishweshbankwar Thanks for the feedback. I will wait for a decision on which option to go with. |
Related: dotnet/aspnetcore#51620 |
Feature Request
Is your feature request related to a problem?
When using
AspNetCoreInstrumentation
anActivity
gets statusError
when a client cancels the request.It is currently not very obvious why the trace has status
Error
in this case.Describe the solution you'd like:
The semantic conventions has been updated with the addition of the
error.type
-attribute.Support for
error.type
should be implemented in general and not only support requests cancelled by the client.Example:
If
error.type
clearly states that the client cancelled the request, then it would be much more obvious why the trace has statusError
.It would also allow users to filter on cancelled requests if these are not considered errors in a given scenario.
This scenario is described in the spec here.
Describe alternatives you've considered.
During EnrichWithHttpResponse I could do one of the following but I would prefer general support for
error.type
.OK
in case of cancelled requestserror.type
in case of cancelled requestsAdditional Context
The spec seems a little unclear on the well-known values for
error.type
.It mentions the following values which doesn't seem to follow any common naming standard:
WebSocketDisconnect; _OTHER; timeout; name_resolution_error; 500;
In addition the name of an exception may be used.
An initial discussion on which values to use for
AspNetCoreInstrumentation
might be a good first step.The text was updated successfully, but these errors were encountered: