Skip to content

fix(adk): set OTLP exporter timeout in milliseconds#1639

Merged
EItanya merged 2 commits intokagent-dev:mainfrom
supreme-gg-gg:fix/tracing-timeout
Apr 7, 2026
Merged

fix(adk): set OTLP exporter timeout in milliseconds#1639
EItanya merged 2 commits intokagent-dev:mainfrom
supreme-gg-gg:fix/tracing-timeout

Conversation

@supreme-gg-gg
Copy link
Copy Markdown
Contributor

OTEL specified that timeout env vars should be in milliseconds: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#timeout-configuration

Python SDK's exporter currently expects it in seconds, so this adds a utility function to parse the env var into seconds. Go is not affected because OTEL Go SDK will properly take up the new value in milliseconds properly.

Without changing this to milliseconds, Go ADK was having a timeout configured as 15ms which results in intermittent error like traces export: exporter export timeout: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Copilot AI review requested due to automatic review settings April 7, 2026 17:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates OTLP exporter timeout handling to align with the OpenTelemetry spec (timeouts specified in milliseconds), while ensuring the Python SDK receives timeouts in seconds as expected.

Changes:

  • Added a Python utility to resolve OTLP timeout env vars (ms) into seconds and wired it into trace/log OTLP exporters.
  • Added tests validating millisecond-to-second resolution and env var precedence.
  • Updated Helm default OTLP timeouts from 15 to 15000 (milliseconds) for traces and logs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
python/packages/kagent-core/src/kagent/core/tracing/_utils.py Adds OTLP timeout env parsing (ms→s) and passes computed timeouts into OTLP trace/log exporters.
python/packages/kagent-core/tests/test_tracing_configure.py Adds parametrized coverage for timeout resolution behavior.
helm/kagent/values.yaml Changes default OTLP timeout values to milliseconds to match OTEL spec and avoid unintended 15ms timeouts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@EItanya EItanya merged commit b44c921 into kagent-dev:main Apr 7, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants