Skip to content

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

Notifications You must be signed in to change notification settings

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

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_SERVER_HTTP.TARGET
        value: .*/health,.*/metrics
    image: ghcr.io/vmaleze/opentelemetry-java-ignore-spans:1.2.0

Current versions

  • Extension version => 1.2.3
  • OpenTelemetry java agent => 1.27.0

References :

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 88.4%
  • Kotlin 10.9%
  • Dockerfile 0.7%