← Back to Pull requests

exporters/otlp/otlpprofile/otlpprofilehttp: add experimental OTLP/HTTP profile exporter #9546

Closed
unknown closed this pull request without merging on Nov 20, 2026 15:05 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 15:37 UTC
Author

Part of #8449. Stacked on #9545 (the first three commits come from #9545; review the commits after fef8d444b for this PR).

Adds the experimental go.opentelemetry.io/otel/exporters/otlp/otlpprofile/otlpprofilehttp module implementing sdk/profile.Exporter over HTTP/protobuf using go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.4.1. Using the slim protobuf module keeps google.golang.org/grpc and github.com/grpc-ecosystem/grpc-gateway/v2 out of the HTTP exporter dependency graph.

The shared OTLP transform template in internal/shared/otlp/otlpprofile/transform builds a deduplicated, orphan-free ProfilesDictionary with index-0 zero-value sentinels and dictionary string references (KeyStrindex / StringValueStrindex). The HTTP client posts to /v1development/profiles by default, sends the OTLP-Profiles-Development-Version: 1 header, supports OTEL_EXPORTER_OTLP_PROFILES_ environment variables with fallback to OTEL_EXPORTER_OTLP_, gzip compression, retries with Retry-After, 64 MiB default request-size enforcement, and partial-success (rejected_profiles) handling.

The follow-up PR stacked on this branch adds the OTLP/gRPC exporter (#9547).

Commits in this PR (on top of #9545):

  • internal/shared/otlp/otlpprofile: add shared OTLP profiles transform template: adds parameterized gotmpl transform and conformance tests for slim and full OTLP profile protos.

  • exporters/otlp/otlpprofile/otlpprofilehttp: add OTLP/HTTP profile exporter: adds the HTTP/protobuf exporter, generated internal helpers, tests, and end-to-end RuntimeProducer verification.

  • Review follow-up commits (75061f35b..3a2c13d8c): harden timeout/Retry-After bounds, header error redaction, WithProxy(nil), canonical wire-level AttributeTable deduplication, Function invariant, nil/compression/zero-value guards, and expand test coverage.
  • <details>
    <summary>Benchmarks (539d1ef2c vs 3a2c13d8c)</summary>

    Compared before (539d1ef2c) vs after (3a2c13d8c):

    goos: linux
    goarch: amd64
    pkg: go.opentelemetry.io/otel/exporters/otlp/otlpprofile/otlpprofilehttp/internal/transform
    cpu: Intel(R) Xeon(R) CPU @ 2.20GHz
                    │  before.txt  │          after.txt           │
                    │    sec/op    │   sec/op     vs base         │
    ExportRequest-2   157.8µ ± 14%   154.2µ ± 7%  ~ (p=0.394 n=6)
    
                    │  before.txt  │             after.txt              │
                    │     B/op     │     B/op      vs base              │
    ExportRequest-2   63.18Ki ± 0%   63.12Ki ± 0%  -0.10% (p=0.002 n=6)
    
                    │ before.txt  │             after.txt             │
                    │  allocs/op  │  allocs/op   vs base              │
    ExportRequest-2   1.121k ± 0%   1.122k ± 0%  +0.09% (p=0.002 n=6)
    

    </details>

    Diff: 372 lines (+279 / -93) across 4 files Reviewer: pellared Review duration: 1407m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 372 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.354
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #9546"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%