Forward-merge release/0.7 into main - #733
Conversation
#### Overview Expands the GenAI OpenTelemetry projection so traces contain sanitized LLM instructions, prompts, responses, and complete Relay span parentage. It also adds an opt-in policy for retaining complete sanitized request history instead of applying current-turn filtering. - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. #### Details - Projects normalized system instructions, input messages, and output messages into `gen_ai.system_instructions`, `gen_ai.input.messages`, and `gen_ai.output.messages`. - Serializes text, multimodal content, tool calls, and tool results using the OpenTelemetry GenAI message schemas while omitting empty message attributes. - Emits canonical finish reasons, including the valid `tool_call` value. - Adds the top-level `enable_full_payloads` option across Rust, Python, Node.js, and Go. It defaults to `false` and is listed last in each configuration for compatibility. - When enabled, preserves complete sanitized LLM request inputs and annotations instead of applying current-turn filtering. Credential removal and configured sanitizers remain active. - Emits minimal internal spans for Relay scope types without GenAI semantics so the original parent-child chain is not lost. Marks remain omitted from the GenAI projection. - Updates the observability documentation and maintainer guidance for the expanded projection and payload policy. The configuration change is additive and retains the existing current-turn filtering behavior by default. Testing: - `cargo test -p nemo-relay observability::otel::tests` (52 passed) - Focused Rust full-payload policy and plugin lifecycle tests - Focused Python, Node.js, and Go configuration serialization tests - `just test-go` - `cargo clippy -p nemo-relay --all-targets -- -D warnings` - Changed-file pre-commit suite, including formatting, type checking, documentation links, Cargo checks, Go vet, and Node.js formatting #### Where should the reviewer start? Start with `crates/core/src/observability/otel_genai.rs` for the GenAI attribute and generic-span projection. Then review `crates/core/src/api/llm.rs` and `crates/core/src/observability/plugin_component.rs` for the full-payload runtime policy and configuration surface. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none Authors: - Will Killian (https://github.com/willkill07) Approvers: - Bryan Bednarski (https://github.com/bbednarski9) URL: #729
|
FAILURE - Unable to forward-merge due to an error, manual merge is necessary. Do not use the IMPORTANT: When merging this PR, do not use the auto-merger (i.e. the |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #733 +/- ##
==========================================
- Coverage 94.40% 94.36% -0.04%
==========================================
Files 330 330
Lines 97496 97667 +171
Branches 113 113
==========================================
+ Hits 92032 92157 +125
- Misses 5464 5510 +46
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Forward-merge triggered by push to release/0.7 that creates a PR to keep main up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.