Skip to content

Add observable provider attempt metadata - #76

Merged
clifton merged 1 commit into
mainfrom
codex/observable-transport-telemetry
Aug 4, 2026
Merged

clifton merged 1 commit into
mainfrom
codex/observable-transport-telemetry

Conversation

@clifton

@clifton clifton commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve exact HTTP status codes and recognized provider request IDs on every extraction attempt and provider error
  • add opt-in bounded response-body capture behind a mandatory caller-supplied sanitizer
  • emit one content-free OpenTelemetry GenAI semantic-convention span per non-streaming extraction or generation attempt through the existing tracing facade
  • classify malformed successful provider envelopes as typed UnexpectedResponse errors while retaining their HTTP diagnostics

API notes

  • AttemptRecord::response carries the uniform ResponseMetadata sidecar on both success and failure
  • RStructorError::{status_code, request_id, response_metadata} expose terminal diagnostics without matching provider-specific variants
  • ResponseBodyCapture never stores a body unless the caller explicitly opts in and supplies the sanitizer
  • applications keep control of their tracing subscriber and OpenTelemetry SDK/exporter

RStructorError::ApiError has a new response metadata field. Exact downstream struct-pattern matches should add ..; normal matches and accessor-based code are unchanged.

The GenAI semantic conventions are still marked development upstream, so the instrumentation exports GEN_AI_SEMCONV_STABILITY and isolates field construction in one module for future convention updates.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --all-features --target-dir tmp/pr3-target -- -D warnings
  • cargo check --no-default-features --features derive,mock --target-dir tmp/pr3-min-target
  • deterministic all-feature integration matrix (credentialed live-provider modules skipped)
  • commit-hook unit suite: 219 passed
  • all-feature library suite: 306 passed
  • HTTP mock suite: 44 passed

@clifton
clifton force-pushed the codex/unified-extraction-report branch from 9e9232e to accadb4 Compare August 4, 2026 18:10
@clifton
clifton force-pushed the codex/observable-transport-telemetry branch from bc5be71 to 31e8628 Compare August 4, 2026 18:10
@clifton
clifton force-pushed the codex/unified-extraction-report branch from accadb4 to 9dcce4c Compare August 4, 2026 18:24
Base automatically changed from codex/unified-extraction-report to main August 4, 2026 18:27
@clifton
clifton marked this pull request as ready for review August 4, 2026 18:30
@clifton
clifton force-pushed the codex/observable-transport-telemetry branch from 31e8628 to abbb17d Compare August 4, 2026 18:30
@clifton
clifton merged commit 019e1e6 into main Aug 4, 2026
9 checks passed
@clifton
clifton deleted the codex/observable-transport-telemetry branch August 4, 2026 18:33
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.

1 participant