Skip to content

Instantly share code, notes, and snippets.

@zeitlinger
Last active April 29, 2026 23:50
Show Gist options
  • Select an option

  • Save zeitlinger/09585b1ab57c454f87e6dcb9a6f50a5c to your computer and use it in GitHub Desktop.

Select an option

Save zeitlinger/09585b1ab57c454f87e6dcb9a6f50a5c to your computer and use it in GitHub Desktop.
declarative config to exclude health checks in Java agent
file_format: '1.0-rc.1'
resource:
attributes_list: ${OTEL_RESOURCE_ATTRIBUTES}
detection/development:
detectors:
- service: # will add "service.instance.id" and "service.name" from OTEL_SERVICE_NAME
propagator:
composite:
- tracecontext:
- baggage:
tracer_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/traces
sampler:
# Configure sampling to exclude health check endpoints
rule_based_routing:
fallback_sampler:
always_on:
span_kind: SERVER
rules:
# Action to take when the rule matches. Must be DROP or RECORD_AND_SAMPLE.
- action: DROP
# The span attribute to match against.
attribute: url.path
# The pattern to compare the span attribute to.
pattern: /actuator.*
meter_provider:
readers:
- periodic:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/metrics
logger_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}/v1/logs
@Oliveira577890

Copy link
Copy Markdown

Esse aplicativo tá tudo em inglês porque já poderia ter as páginas já atualizada em português Brasil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment