-
Notifications
You must be signed in to change notification settings - Fork 57
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
OpenTelemetry: add support for recording exceptions in spans #695
OpenTelemetry: add support for recording exceptions in spans #695
Conversation
ISSUE #685 |
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/Tracing.scala
Outdated
Show resolved
Hide resolved
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/Tracing.scala
Show resolved
Hide resolved
def setErrorStatus[E <: Throwable]( | ||
span: Span, | ||
cause: Cause[E], | ||
errorMapper: ErrorMapper[E] | ||
)(implicit trace: Trace): UIO[Span] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think we need to make it a part of the public API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it public as in OpenTracing
https://github.com/zio/zio-telemetry/blob/series/2.x/opentracing/src/main/scala/zio/telemetry/opentracing/OpenTracing.scala#L17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The thing is that opentracing module needs some love, and I'm planning to give it when we stabilize the API of opentelemetry, which is our playground for the moment. So please, do not refer to opentracing module as an example.
Considering the above I would like to ask you about making this method private. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Hey @IvanFinochenko! Thank you for your contribution! |
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/Tracing.scala
Outdated
Show resolved
Hide resolved
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/ErrorMapper.scala
Outdated
Show resolved
Hide resolved
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/ErrorMapper.scala
Outdated
Show resolved
Hide resolved
...telemetry-example/src/main/scala/zio/telemetry/opentelemetry/example/http/ProxyHttpApp.scala
Outdated
Show resolved
Hide resolved
LGTM! There is just a couple of comments to address. And also, it would be great to add proper tests for this new functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper tests.
# Conflicts: # opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing/Tracing.scala # opentelemetry/src/test/scala/zio/telemetry/opentelemetry/tracing/TracingTest.scala
@grouzen, I added test. |
@grouzen, I fixed it |
@IvanFinochenko Hey! Nice! I tried to figure out why it happened yesterday but with no success. |
No description provided.