Skip to content

feat(callbacks/tls): add opt-in TLS observability callback - #936

Open
runninggo wants to merge 7 commits into
cloudwego:mainfrom
runninggo:codex/upstream-eino-tls-lens-final
Open

feat(callbacks/tls): add opt-in TLS observability callback#936
runninggo wants to merge 7 commits into
cloudwego:mainfrom
runninggo:codex/upstream-eino-tls-lens-final

Conversation

@runninggo

Copy link
Copy Markdown

What type of PR is this?

feat: A new opt-in callback integration.

Check the PR title

  • This PR title matches the format: <type>(optional scope): <description>
  • The description is user-oriented and clear.
  • The new module includes English and Chinese usage/configuration READMEs.

More detailed description

en:

Adds callbacks/tls, an opt-in Eino callback module that exports callback spans to Volcengine TLS. It keeps existing callback and generic OTLP behavior unchanged unless TLS export is explicitly configured.

The module records agent.turn, llm.request, and tool.call spans, aggregates streaming chunks before exporting, and attaches token usage, provider/model metadata, tool arguments/results, error state, and duration when available.

The PR also adds TLS transport options in libs/acl/opentelemetry and Ark callback usage metadata needed for complete trace attribution.

The module-local genproto replacement was removed so downstream consumers do not rely on non-transitive Go module configuration.

zh(optional):

新增可选的 callbacks/tls 回调模块,将 Eino 回调 Span 导出到 Volcengine TLS;未显式配置时不会改变现有 callback 或通用 OTLP 行为。流式输出会在导出前聚合,并保留模型、Token、工具调用、错误和耗时信息。

Which issue(s) this PR fixes

Fixes #935

Validation

  • go test -mod=readonly -race -gcflags='all=-l -N' ./... in callbacks/tls
  • go test -mod=readonly -race -gcflags='all=-l -N' ./... in libs/acl/opentelemetry
  • go test -mod=readonly -race -gcflags='all=-l -N' ./... in components/model/ark
  • Apache 2.0 license headers, gofmt, and git diff --check verified.

Upstream GitHub Actions will run after this PR is opened.

import TLS callback module into eino-ext

align tracing hooks with existing callback integrations

add regression tests for tool-name mapping and stream concat behavior
@CLAassistant

CLAassistant commented Jul 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@runninggo
runninggo force-pushed the codex/upstream-eino-tls-lens-final branch from 07477ad to 460ba5d Compare July 28, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(callbacks/tls): add opt-in TLS observability callback

2 participants