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

Support otlp_span and otlp_metric exporter config names #1253

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Sep 24, 2020

Signed-off-by: Pavol Loffay ploffay@redhat.com

Resolves #1250

cc) @malafeev

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay changed the title Support otlp_span and otelp_metric exporter config names Support otlp_span and otlp_metric exporter config names Sep 24, 2020
@@ -91,6 +91,7 @@ private static MetricExporterFactory findMetricExporterFactory(String exporterNa
if (metricExporterFactory
.getClass()
.getSimpleName()
.replace("_", "")
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm - feels a bit magic but I guess it's fine 😃

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, maybe the factories could have a method that returns a name and do the comparison based on that.

Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of SpanExporterFactory/MetricExporterFactory having a method Set<String> getNames() (Set since e.g. OtlpSpanExporterFactory can be enabled via both otlp and otlp_span)

Copy link
Member

Choose a reason for hiding this comment

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

I guess this is only applicable to our built-in exporters though, as opposed to someone building their own Exporter and using EXPORTER_JAR, so maybe not. Also, I forget, now that we are Java 8, we can always add interface methods after GA 😁

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think my idea before was to have a map of wellknown names, and only use the classname for custom exporters

@anuraaga anuraaga closed this Sep 25, 2020
@anuraaga anuraaga reopened this Sep 25, 2020
@anuraaga anuraaga merged commit 8ed4ef5 into open-telemetry:master Sep 25, 2020
@anuraaga
Copy link
Contributor

Thanks!

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.

Add support for otlp_span and otlp_metric values of OTEL_EXPORTER
5 participants