opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Support mTLS for JaegerRemoteSampler when instantiated via JaegerRemoteSamplerProvider in autoinstrumentation

Open evantorrie opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

I'd like to allow autoinstrumented Java code that elects to use otel.traces.sampler=jaeger_remote to be able to pass mTLS specific information to JaegerRemoteSamplerProvider. Currently there is no way to enable mTLS via the otel.traces.sampler.arg configuration parameter, as it supports only

  • endpoint
  • polling interval
  • initialSamplingRate

Describe the solution you'd like

Support for JaegerRemoteSampler mTLS communication via the otel.traces.sampler* configuration variables.

Describe alternatives you've considered

Write Otel-specific code in every Java application that wants to be auto-instrumented to call JaegerRemoteSamplerBuilder.set{ClientTls,TrustedCertificates} and somehow (likely via a custom Javaagent extension) override the sampler construction at SDK initialization time.

evantorrie avatar Dec 08 '23 00:12 evantorrie

@evantorrie At first glance, this doesn't seem too bad. The JaegerRemoteSamplerBuilder has these methods:

  • setSslContext
  • setClientTls
  • setTrustedCertificates

Do you think that those provide enough to get mTLS going? If so, then it would be a matter of determining what config properties would be needed to map into those.

Can you enumerate what the set of config properties would be needed to configure mTLS are?

breedx-splk avatar Jan 30 '24 01:01 breedx-splk