You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.
Describe the bug
I am testing the unreleased client metric for the Cosmos DB client. After enabling client metric telemetry with IsClientMetricsEnabled = true and making a few requests, it emits some metrics. However, for the metrics with errors, the error.type contains too much information, which differs from the OpenTelemetry standard. The error.type should contain the type of the error or another concise message that indicates the type of the error.
Example of error.type dimension:
Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: f832ed08-dd41-4f89-92ab-05a0befd6371; Reason: (
Errors : [
"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"
]
);
OpenTelemetry standard:
According to the OpenTelemetry standard, the error.type should be more concise and only contain the type of the error. For reference, please see the OpenTelemetry specification: An external link was removed to protect your privacy.
To Reproduce
Installing the the "Microsoft.Azure.Cosmos" package with client metrcy.
Enable OpenTelemetry metrics and add meter "Azure.Cosmos.Client.Operation" & "Azure.Cosmos.Client.Request"
…compliant with open telemetry standard (#4948)
# Pull Request Template
## Description
Address issue #4945
Previous error.type contained detailed error message which wasn't
compliant with OpenTelemetry standard
[error.type](https://opentelemetry.io/docs/specs/semconv/attributes-registry/error/).
This PR generates the error type based on the exception type, status
code and sub status code.
An example of error.type value:
```"CosmosException_NotFound_ResourceNotFound"```
## Type of change
Please delete options that are not relevant.
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
## Closing issues
#4945
To automatically close an issue: closes #IssueNumber
---------
Co-authored-by: Sourabh Jain <sourabhjain@microsoft.com>
Describe the bug
I am testing the unreleased client metric for the Cosmos DB client. After enabling client metric telemetry with IsClientMetricsEnabled = true and making a few requests, it emits some metrics. However, for the metrics with errors, the error.type contains too much information, which differs from the OpenTelemetry standard. The error.type should contain the type of the error or another concise message that indicates the type of the error.
Example of error.type dimension:
OpenTelemetry standard:
According to the OpenTelemetry standard, the error.type should be more concise and only contain the type of the error. For reference, please see the OpenTelemetry specification: An external link was removed to protect your privacy.
To Reproduce
Expected behavior
error.type should be "NotFound (404)" or similar.
Actual behavior
error.type contains overly detailed information like description above.
Environment summary
SDK Version: internal tested SDK (or build from master with hash: 80d9e2e)
OS Version (e.g. Windows, Linux, MacOSX)
Windows
Additional context
Add any other context about the problem here (for example, complete stack traces or logs).
The text was updated successfully, but these errors were encountered: