Skip to content
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

Merged
merged 8 commits into from
May 25, 2023

Conversation

IvanFinochenko
Copy link
Contributor

No description provided.

@IvanFinochenko IvanFinochenko requested a review from a team as a code owner May 24, 2023 06:30
@IvanFinochenko
Copy link
Contributor Author

ISSUE #685

Comment on lines 417 to 422
def setErrorStatus[E <: Throwable](
span: Span,
cause: Cause[E],
errorMapper: ErrorMapper[E]
)(implicit trace: Trace): UIO[Span]

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@grouzen grouzen May 24, 2023

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@grouzen
Copy link
Contributor

grouzen commented May 24, 2023

Hey @IvanFinochenko! Thank you for your contribution!

@grouzen
Copy link
Contributor

grouzen commented May 24, 2023

LGTM! There is just a couple of comments to address. And also, it would be great to add proper tests for this new functionality.

@grouzen grouzen linked an issue May 24, 2023 that may be closed by this pull request
Copy link
Contributor

@grouzen grouzen left a 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
@IvanFinochenko
Copy link
Contributor Author

@grouzen, I added test.
But I have problems with some checks, can you help, please? What's wrong?
locally sbt compile is succeed.

@IvanFinochenko
Copy link
Contributor Author

@grouzen, I fixed it

@grouzen
Copy link
Contributor

grouzen commented May 25, 2023

@IvanFinochenko Hey! Nice! I tried to figure out why it happened yesterday but with no success.

grouzen

This comment was marked as outdated.

@grouzen grouzen merged commit 510fd01 into zio:series/2.x May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTelemetry: add support for recording exceptions in spans
2 participants