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

add more methods to ExtendedTracer #5197

Closed
wants to merge 1 commit into from

Conversation

zeitlinger
Copy link
Member

The Opentelemetry APIs are rather difficult to use - therefore I've developed the following utility method, which is part of a company internal library - so it has already been tested by some users.

Based on this issue, I'm now creating a PR here.

Not polished yet

  • method names
  • javadoc

Breaking changes

In addition to adding functionality, the existing functionality is also changed as follows:

  • the methods don't throw Exception anymore - this is turned out to be inconvenient to use
  • when an exception is caught, the span status is set to error - this is what you usually want

Questions

I'm undecided if it's better to catch (an re-throw) Exception or Throwable - the current implementation is not consistent between run (catches Throwable) and call (catches Exception)

@zeitlinger zeitlinger requested a review from a team February 10, 2023 17:49
@jkwatson
Copy link
Contributor

Looking at these methods, I would suggest they be put into a contrib module in the opentelemetry-java-contrib repository, rather than here. It's a bit of a hodge-podge of things to assist with manual instrumentation, and not things that we'd want to ever add to the actual Tracer interface.

@zeitlinger
Copy link
Member Author

Looking at these methods, I would suggest they be put into a contrib module in the opentelemetry-java-contrib repository, rather than here. It's a bit of a hodge-podge of things to assist with manual instrumentation, and not things that we'd want to ever add to the actual Tracer interface.

Not sure I understand - these methods are not part of the standard Tracer interface.
Are you saying we should have another ExtendedTracer in a contrib module?

@jkwatson
Copy link
Contributor

No. The goal of ExtendedTracer was to eventually add the methods to the Tracer interface. These methods you are adding don't seem like Tracer methods at all, but just a bunch of instrumentation utility methods.

@zeitlinger
Copy link
Member Author

Closing in favor of open-telemetry/opentelemetry-java-contrib#759

@zeitlinger zeitlinger closed this Feb 23, 2023
@zeitlinger zeitlinger deleted the tracing_utils branch February 23, 2023 16:37
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.

2 participants