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

When specify exporter-jar by -Dotel.exporter.jar, the OtlpGrpcSpanExporter and OtlpGrpcMetricExporter are also installed #2193

Closed
lshangq opened this issue Feb 4, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@lshangq
Copy link

lshangq commented Feb 4, 2021

Describe the bug
When specify exporter-jar by -Dotel.exporter.jar, the OtlpGrpcSpanExporter and OtlpGrpcMetricExporter are also installed.

logs as below
[grpc-default-executor-2] WARN io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter - Failed to export spans. Error message: UNAVAILABLE: io exception
[grpc-default-executor-1] WARN io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporter - Failed to export metrics

Steps to reproduce
java -javaagent:path/to/opentelemetry-javaagent-all.jar
-Dotel.exporter.jar=path/to/external-exporter.jar
-jar myapp.jar

What did you expect to see?
When specify exporter-jar by -Dotel.exporter.jar, the default exporter includes OtlpGrpcSpanExporter and OtlpGrpcMetricExporter are not installed except for explict specification.

What did you see instead?
When specify exporter-jar by -Dotel.exporter.jar, the OtlpGrpcSpanExporter and OtlpGrpcMetricExporter are also installed.
What version are you using?
v0.15.0

Environment
openjdk version "1.8.0_202
OS: centos7.3

Additional context
Add any other context about the problem here.

@lshangq lshangq added the bug Something isn't working label Feb 4, 2021
@anuraaga
Copy link
Contributor

anuraaga commented Feb 5, 2021

This is definitely a change in behavior we should fix. In the meantime you may want to disable the default exporters with OTEL_TRACE_EXPORTER=none and OTEL_METRICS_EXPORTER=none

@lshangq
Copy link
Author

lshangq commented Feb 5, 2021

Thanks, will it be fixed before release 1.0.0

@trask
Copy link
Member

trask commented Apr 6, 2021

Closing, as we are moving from otel.exporter.jar to otel.javaagent.extensions in #2442, where this will be possible by providing a custom property source, e.g.

@AutoService(PropertySource.class)
public class AgentTestingExporterPropertySource implements PropertySource {
@Override
public Map<String, String> getProperties() {
Map<String, String> properties = new HashMap<>();
properties.put("otel.traces.exporter", "none");
properties.put("otel.metrics.exporter", "none");
return properties;
}
}

@trask trask closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants