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

Configure the `ZipkinSpanExporter` not to set the local IP address

Open mateuszrzeszutek opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. We're currently using the Zipkin exporter in Splunk's Android RUM instrumentation library. By default, the exporter will attach the device's local IP address to each span: https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporter.java#L164 Even though it's usually not sensitive information (these are mostly private IP addresses), they look like PII data -- and while this is completely fine for server-side instrumentation, in client-side instrumentation we should not send this kind of data.

Describe the solution you'd like It'd be really great if ZipkinSpanExporterBuilder exposed a way to set the local IP (including a null value), or to disable adding the local IP address.

Describe alternatives you've considered We could also implement a custom BytesEncoder and do the following

Endpoint localEndpoint = Endpoint.newBuilder().serviceName(span.localServiceName()).build();span = span.toBuilder().localEndpoint(localEndpoint).build();

but that requires us to copy each span just to overwrite the local endpoint

Additional context https://github.com/signalfx/splunk-otel-android/pull/327

mateuszrzeszutek avatar Aug 05 '22 12:08 mateuszrzeszutek

@mateuszrzeszutek are you able to provide a PR to address this?

jkwatson avatar Aug 05 '22 23:08 jkwatson

Sure! I should be able to do this this week.

mateuszrzeszutek avatar Aug 09 '22 09:08 mateuszrzeszutek

I thought I commented on this, but this seems like a good idea to me.

jack-berg avatar Aug 09 '22 12:08 jack-berg

Relates to #4675

breedx-splk avatar Aug 10 '22 15:08 breedx-splk

Resolved in #4675.

jack-berg avatar Aug 17 '22 23:08 jack-berg