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

Stabilize ExtendedSpanBuilder APIs #6504

Open
jack-berg opened this issue Jun 6, 2024 · 2 comments
Open

Stabilize ExtendedSpanBuilder APIs #6504

jack-berg opened this issue Jun 6, 2024 · 2 comments
Labels
Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

The ExtendedSpanBuilder APIs have been around (in some form) for a while now. They were introduced on 12/7/23 in #6017 and existed in contrib previously. The APIs don't allow you to do anything new, but improve the ergonomics of certain common operations.

In #6497 I left a comment suggesting a change to the APIs I think we should consider prior to stabilization:

The only thing that gives me pause is the SpanCallable, SpanRunnable interfaces. Would be preferable if we didn't introduce our own functional interfaces and could use Callable, Runnable instead. I understand that we loose type safety over the exception type, but could be worthwhile to have an API with types from standard java users are familiar with.

@jack-berg jack-berg added the Feature Request Suggest an idea for this project label Jun 6, 2024
@zeitlinger
Copy link
Member

SpanCallable

I get the impression people are not particularly happy about the standard interfaces: https://stackoverflow.com/questions/2248131/handling-exceptions-from-java-executorservice-tasks

@trask
Copy link
Member

trask commented Jun 10, 2024

I'm probably in favor of keeping SpanCallable and SpanRunnable

I think the convenience API because noticeably less convenient if we switch to Callable and Runnable

  • startAndRun(Runnable) - we can't bubble up checked exceptions
  • startAndRun(Callable) - we have to wrap and rethrow checked exceptions, altering their original type and affecting upstream throws clauses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

3 participants