open-telemetry / opentelemetry-android

OpenTelemetry Tooling for Android
Apache License 2.0
152 stars 40 forks source link

Feature: ignore some errors generated from http interceptors #175

Open GerardPaligot opened 11 months ago

GerardPaligot commented 11 months ago

For now, TracingInterceptor record all errors generated by http request executed in the Android application. But it could be interesting to add a way to ignore some errors like java.io.InterruptedIOException, okhttp3.internal.http2.StreamResetException (stream was reset: CANCEL) or  java.io.IOException (Canceled).

All these errors are generated when a Kotlin coroutine scope is cancelled and where we are no more interested about the http response. It sounds legit to ignore the instrumentation of this kind of error.

trask commented 11 months ago

Related https://github.com/open-telemetry/semantic-conventions/issues/560