Skip to content

Metrics Push interval is 15s instead of default 60s #13246

@nabbdl

Description

@nabbdl

Describe the bug

We are using the Java opentelemetry java instrumentation injected by opentelemetry operator on kubernetes. The metrics are pushed every 15s and we would like to lower this interval. According to the documentation the default interval is set to 60s. We tried to change the OTEL_METRIC_EXPORTER_INTERVAL variable without success. We then enable the debug log (OTLEL_JAVAAGENT_DEBUG), and we can see that the INTERVAL (160000000000) variable is taken into account but it has no effects :-(

OBSERVABLE_GAUGE=default, GAUGE=default}, memoryMode=REUSABLE_DATA}, intervalNanos=160000000000}]

We are currently running the latest version of the agent and we tried older version without success.

Steps to reproduce

Install Opentelemetry operator in Kubernetes
Created instrumentation configuration:

spec:
exporter:
endpoint: http://xxxxxxxxxxxxxxxxxxxxx:4318
propagators:
- tracecontext
- baggage
sampler:
type: parentbased_always_on
java:
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest
env:
- name: OTEL_SERVICE_NAME
valueFrom:
fieldRef:
fieldPath: "metadata.labels['app.kubernetes.io/instance']"
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_METRICS_EXPORTER
value: otlp
- name: OTEL_LOGS_EXPORTER
value: none
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: http/protobuf
- name: OTEL_INSTRUMENTATION_COMMON_MDC_RESOURCE_ATTRIBUTES
value: service.namespace,service.name,service.instance.id,service.version,deployment.environment

Added the inject annotation on a kubernetes deployment
Start a java app
Observ the metrics interval on grafana

Expected behavior

Be able to change the metric push interval.

Actual behavior

Metric effective push interval is 15s

Javaagent or library instrumentation version

2.12.0

Environment

JDK:
OS:

Additional context

Tried with multiple Java apps and getting the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions