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

More stable selection of exporter to use #511

Closed
iNikem opened this issue Jun 13, 2020 · 8 comments
Closed

More stable selection of exporter to use #511

iNikem opened this issue Jun 13, 2020 · 8 comments

Comments

@iNikem
Copy link
Contributor

iNikem commented Jun 13, 2020

Isn't it quite normal to use the fully qualified class name when selecting an SPI implementation? SDK currently uses the approach too. It's guaranteed to be unique based on the nature of a Java classpath, while a name provided by a method has chances of collision which seems like something we don't want to deal with.

Having a hard-coded mapping from a short name to the fully qualified name for well-known implementations in the agent like otlp, logging, jaeger and zipkin seems like it could also provide the simpler UX without the risk of conflicting names from random exporters on the classpath.

Originally posted by @anuraaga in open-telemetry/opentelemetry-java#1332 (comment)

@iNikem
Copy link
Contributor Author

iNikem commented Jun 13, 2020

I like both options from the comment above:

  • Select exporter by fully classified name of its factory
  • Have hard-coded mapping of short names to factories

I probably would favour the second option, it is more user-friendly.

@trask
Copy link
Member

trask commented Jun 13, 2020

👍 to the user-friendly option

@anuraaga
Copy link
Contributor

anuraaga commented Jun 14, 2020

To clarify, I didn't mean to necessarily have to pick between two options :) We can accept both a fully qualified name (will be useful for people shading their own agent binary with a potentially custom exporter) and the short one for well known exporters to have and eat the cake

@anuraaga
Copy link
Contributor

anuraaga commented Jun 14, 2020

While talking about classifiers had a new thought. Instead of a set of short names, we don't really need any short names. How about automatically activating an exporter based on the presence of the endpoint flag, like ota.otlp.endpoint, ota.zipkin.endpoint? Currently we only load one exporter but it'd actually be sort of nice if we could just go ahead and enable all the exporters that users set the endpoint for.

Well, looking at the original post again this doesn't work for logging :) But ota.logging.file=stdout or /var/log/ota.txt could be a nice option too. ota.logging.enabled for special exporters that don't need options like endpoints can work. And gives us the power of multiple exporters

@trask
Copy link
Member

trask commented Jul 16, 2020

Instead of a set of short names, we don't really need any short names. How about automatically activating an exporter based on the presence of the endpoint flag, like ota.otlp.endpoint, ota.zipkin.endpoint? Currently we only load one exporter but it'd actually be sort of nice if we could just go ahead and enable all the exporters that users set the endpoint for.

I like this proposal.

Also, it addresses this part of #385:

We currently only support a single exporter jar, so how does someone use jaeger + prometheus?

@iNikem
Copy link
Contributor Author

iNikem commented Jul 16, 2020

And #496

@trask
Copy link
Member

trask commented Jul 16, 2020

Does it make sense to close this issue and move the proposal over to #496?

@trask
Copy link
Member

trask commented Aug 13, 2020

Closing, moved above proposal over to #496

@trask trask closed this as completed Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants