Skip to content

merkio/opentelemetry-java-ignore-spans

 
 

Repository files navigation

OpenTelemetry spans drop extension

This project embeds a simple extension in the opentelemetry javaagent that will drop spans based on the env variable OTEL_DROP_SPANS_*.

Usage

Add the OTEL_DROP_SPANS_{SPAN_KIND}_{ATTRIBUTE_NAME} env variable and set the spans to drop using the , as a separator

Usage

Add the OTEL_DROP_SPANS_SERVER_URL.PATH env variable and set the spans to drop using the , as a separator

Simply download the latest version instead of the javaagent, and you are good to go.

apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
  name: my-instrumentation
spec:
  java:
    env:
      # Will drop spans towards health and metrics endpoints
      - name: OTEL_DROP_SPANS
        value: .*/health,.*/metrics
    image: ghcr.io/vmaleze/opentelemetry-java-ignore-spans:2.15.0

Current versions

References :

About

Opentelemety agent with ability to specify span via env variables which will be droped

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 99.2%
  • Dockerfile 0.8%