Skip to content

feat: Approach B - Minimal agent boilerplate + OTEL Collector enrichment - #669

Closed
Ladas wants to merge 3 commits into
rossoctl:mainfrom
Ladas:feat/otel-minimal-agent-collector-667
Closed

Ladas wants to merge 3 commits into
rossoctl:mainfrom
Ladas:feat/otel-minimal-agent-collector-667

Conversation

@Ladas

@Ladas Ladas commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Approach B for issue #667: Reduce agent observability code from ~551 lines to ~50 lines by letting the OTEL Collector handle all MLflow/OpenInference/GenAI attribute enrichment.

  • Agent creates only: named root span + sets input.value + gen_ai.conversation.id (~50 lines)
  • OTEL Collector transform/agent_enrichment adds all mlflow., openinference., gen_ai.* attributes
  • Uses IsRootSpan() OTTL function (Collector v0.104.0+) for reliable root span detection
  • Collector copies resource attributes (service.name) to span attributes for MLflow

See design doc for full architecture.

Related

Test plan

  • Create minimal tracing module (~50 lines) for weather agent
  • Update OTEL Collector config with transform/agent_enrichment
  • Run MLflow E2E tests (pytest -m observability)
  • Verify IsRootSpan() works with collector v0.122.1
  • Parametrize tests across multiple agent variants

🤖 Generated with Claude Code

Ladas and others added 3 commits February 13, 2026 18:06
Add design document for Approach B: reducing agent observability code
to ~50 lines (root span + input/output capture) and letting the OTEL
Collector handle all MLflow/OpenInference/GenAI attribute enrichment.

Closes rossoctl#667 (approach B)

Signed-off-by: Ladas <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
…ariants

Add VariantProfile dataclass and AGENT_OBSERVABILITY_VARIANT env var to
support testing different agent instrumentation approaches with the same
test suite. Each variant declares what root span attributes it produces,
and tests assert/skip based on the variant's capabilities.

Supported variants:
- baseline: Full observability.py in agent (PR 114 approach)
- minimal: Minimal agent boilerplate + OTEL Collector enrichment
- authbridge: AuthBridge ext_proc root span, zero agent code
- none: No instrumentation (negative test)

Refs rossoctl#667

Signed-off-by: Ladas <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
Reduce agent observability code from ~551 lines to ~50 lines by moving
MLflow/OpenInference/GenAI attribute enrichment to the OTEL Collector.

Agent sets only what it uniquely knows (input.value, output.value,
gen_ai.agent.name, gen_ai.operation.name, gen_ai.conversation.id).
The new transform/agent_enrichment processor derives all mlflow.*,
openinference.*, and llm.* attributes from those + resource attributes.

Changes:
- Add observability_minimal.py reference implementation for agents
- Add otel-collector-agent-enrichment.yaml standalone transform config
- Add transform/agent_enrichment processor to otel-collector.yaml
- Include agent_enrichment in both Phoenix and MLflow pipelines
- Update design doc with final implementation details

Refs rossoctl#667

Signed-off-by: Ladas <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
@Ladas
Ladas force-pushed the feat/otel-minimal-agent-collector-667 branch from cbc9179 to e19cac8 Compare February 13, 2026 17:06
@Ladas

Ladas commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

for now going with #668

@Ladas Ladas closed this Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant