Repository navigation
feat(otel): export AOP agent signals with GenAI lifecycle semantics - #178
Merged
Merged
Conversation
M09Ic
force-pushed
the
feat/otel-aop-signals
branch
2 times, most recently
from
October 12, 2026 04:19
6176c05 to
69f4205
Compare
M09Ic
force-pushed
the
feat/otel-aop-signals
branch
from
October 12, 2026 05:04
69f4205 to
40ff98f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configuring an OTLP endpoint for a normal Cyber Agent execution exports Agent lifecycle, reported model usage and execution activity as traces, structured logs and metrics. One Collector sends all three signals to SigNoz and the same traces to Phoenix.
The AOP projection previously could mark a completed model response as canceled during tool execution, replace a parent tool's call context with a nested command/process, and leave orphan scopes active until extension shutdown. This change fixes those boundaries and pins a coherent GenAI semantic dialect.
Implementation
exts/otel; Agent/tool producers and AOP protobuf definitions keep their existing contracts. Independent SDKs share Resource attributes, with logs/metrics recorded before trace sampling.invoke_agent,chat,execute_tool) and retain OpenInference compatibility. Record provider dialect, conversation/known Agent identity, finite terminalerror.type, instrumentation version and semantic version. Omit response model when only a request alias is known. Keep framework-specific JEV purpose names and customevaluateoperation documented; unknown JEV providers/models are not borrowed from the main Agent.http/protobufexplicitly; other configured protocols fail validation. Reuse SDK resource/header/TLS/sampling settings.Content capture defaults to off. Bounded correlation and subscription queues, asynchronous export errors and observed subscription drops are part of the extension lifecycle; no global provider mutation or OTel-specific AOP hooks are required.
Validation
Validated against this PR's production source:
go build -mod=readonly ./...; also built with the original committed checksum manifest. Clean-checkoutgo mod tidyidentified deterministic checksum bookkeeping required by CI, which is included without local test files or dependency version changes. The AOP submodule remains tidy.emptytemplates forceposix full netgo noembed osusergo sqlitebuild tags; whitespace checks.cmd/aiscanagainst a real model gateway (gpt-6-sol), using ordinary OTel environment configuration without a recording exporter: 10 model calls, 10 tools (4 failures), 114,242 tokens, 29 spans in each backend and 158 SigNoz logs. Canonical JSONL, CLI usage, trace/metric tokens, 98 nonstreaming AOP fact logs and execution parents/failures agree; the task succeeds after recovery and all active counts return to zero.Only production implementation, dependency checksums, reusable deployment configuration and documentation are included. New tests, acceptance fixtures/scripts, credentials, binaries, screenshots and temporary artifacts remain local. Checksum updates were reproduced in a clean checkout without local test files.
Boundaries
GenAI v1.41.0 is the selected complete dialect, not a claim of latest/all-field coverage. Provider identity is the configured client dialect and remains static for the extension's lifetime. StandardLoop publishes usage after tool results, and startup/recap auxiliary usage remains incomplete. Exact per-attempt usage, full effective requests, response metadata, first-token timing and cross-process W3C propagation need more source facts. Complex mechanisms are covered by replay; this real-model acceptance covers the ordinary Agent/tool path. Phoenix receives traces; logs and metrics are accepted in SigNoz. Log SDK internal queue drops, production dashboards, billing and alert rules remain documented follow-ups.
Refs #175.