vaadin / observability-kit

Other
5 stars 3 forks source link

Add error handling for all instrumentations #32

Closed sissbruecker closed 2 years ago

sissbruecker commented 2 years ago

Instrumentations should capture errors that occured in instrumented methods, and add them to the span that the instrumentation created.

Exceptions can be passed to the OTel instrumentation API using Span.recordException.

caalador commented 2 years ago

To note there is an issue in opentelemetry-specification#1008 where the end result is having recordException set an error implicitly by default is certainly not what we want which means that when using recordeException also the span status needs to be set to ERROR.

caalador commented 2 years ago

Closing issue as we now by default have exception recoding in all our instrumentation.