otelaws s3 error responses should not always be recorded #6331
Labels
area: instrumentation
Related to an instrumentation package
bug
Something isn't working
instrumentation: otelaws
Description
Instrumentation for s3 records 3xx http responses as errors.
https://github.com/open-telemetry/opentelemetry-go-contrib/blob/11cf0df7388a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go#L75-L79
There is already
http.status_code
that covers the result of the call, so recording the error does not add any useful information.When getting objects from s3 conditionally a 3xx http response is expected if the condition is not satisfied. For example, you might get an object if is has been modified since the last time it was accessed.
Environment
otelaws
version: v0.52.0Steps To Reproduce
Expected behavior
Don't record an error for 3xx responses.
Potential fix
The error could be checked using something like:
It seems reasonable to do this for all services, or there could be an "IsTraceableError" check for each service which would not record these "error" responses.
I can create a PR for this if useful.
The text was updated successfully, but these errors were encountered: