fix(otlp): parse OTEL_EXPORTER_OTLP_HEADERS, TIMEOUT, and INSECURE from environment #150
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 180 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.311
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #150"
general
weight: 0.35
agagniere
Description
Resolves the
TODOinopentelemetry-sdk/src/otlp.zig(ConfigOptions.mergeFromEnvMap), which previously only parsedENDPOINT,COMPRESSION, andPROTOCOLfrom the environment, ignoring the standard OpenTelemetry exporter configuration variables:OTEL_EXPORTER_OTLP_HEADERSOTEL_EXPORTER_OTLP_TIMEOUTOTEL_EXPORTER_OTLP_INSECUREChanges
1.
OTEL_EXPORTER_OTLP_HEADERS:- Parses and validates key-value pairs using
parseHeaders.- Copies string into
headersand manages ownership viaheaders_owned: boolso memory is properly freed inConfigOptions.deinit().2.
OTEL_EXPORTER_OTLP_TIMEOUT:- Parses integer milliseconds per spec, converting to
timeout_sec.- Enforces
max_timeout_secboundary and validates format.3.
OTEL_EXPORTER_OTLP_INSECURE:- Parses boolean
"true"/"false"(case-insensitively).- Validates conflicting options (e.g.,
httpsscheme + insecure).4. Error Handling & Tests:
- Added
InvalidTimeoutandInvalidInsecuretoConfigError.- Added comprehensive unit tests covering valid inputs, empty strings, invalid syntax, bounds checking, and leak checks under
std.testing.allocator.Specification Reference
Close #149