opentelemetry-java
opentelemetry-java copied to clipboard
Configure the `ZipkinSpanExporter` not to set the local IP address
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 are you able to provide a PR to address this?
Sure! I should be able to do this this week.
I thought I commented on this, but this seems like a good idea to me.
Relates to #4675
Resolved in #4675.