← Back to Pull requests

Add the opamp extension to DDOT and autoconfigure it in standalone mode #58861

Closed
unknown closed this pull request without merging on Oct 27, 2026 13:27 UTC
View on GitHub
unknown unknown commented on Oct 26, 2026 12:00 UTC
Author

<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?

1. Bundles the OpenTelemetry opampextension in DDOT, via manifest.yaml + dda inv collector.generate.
2. Makes the converter autoconfigure it in standalone mode, mutually exclusive with the datadog extension:

| | connected (default) | standalone |
| --- | --- | --- |
| datadog | injected (unchanged) | never injected |
| opamp | never injected | injected |

extensions:
  opamp/dd-autoconfigured:
    server:
      http:
        endpoint: https://opamp.<site>/v1/opamp
        headers: {DD-API-KEY: <api_key>}
    reports_raw_config: true

Decisions made, and why:

  • Mode decides, not a flag. In connected mode currently the datadog extension is used to report status to the backend; standalone is expected to rely on OpAMP directly. These two are mutually exclusive. Making it a free choice could allow two simultaneous reporters.

  • Gated on opamp in otelcollector.converter.features (added to the defaults) rather than always-on, so it has the same opt-out as the datadog extension.

  • Endpoint derived from site, with otelcollector.opamp.endpoint to override.

  • reports_raw_config: true by default, overridable via otelcollector.opamp.reports_raw_config. Raw reporting preserves references like ${env:FOO} instead of resolving them, which is what lets the backend see a configuration's reference vocabulary. It does not widen exposure: under the raw key, literals in configopaque fields are still [REDACTED]; only unexpanded ${...} references pass through.

  • Requires an api_key, and reuses a user-defined opamp extension rather than adding a duplicate — both inherited from the existing datadog paths.
  • Motivation

    DDOT standalone cannot participate in OpAMP today — datadog/ddot-collector:7.83.1 rejects the extension outright:

    error decoding 'extensions': unknown type: "opamp" for id: "opamp"
    (valid values: [health_check zpages pprof k8s_observer ecs_observer host_observer
     k8sleaderelector datadog file_storage dogtel])
    

    opampextension is not in COMPONENTS_TO_STRIP, so bundling it is just a manifest entry. Autoconfiguring it means a standalone deployment gets a working channel without hand-writing the extension, endpoint and API-key header.

    Describe how you validated your changes

  • dda inv collector.generate and dda inv schema.codegen reproduce the committed generated files; go mod tidy leaves no drift and the replace (...) block and VULN-100741 comment are intact.

  • go test -tags test ./... passes in comp/otelcol/converter/impl and pkg/config/setup; go vet clean; linux cross-compile of collector-contrib/impl exit 0; all pre-commit and pre-push hooks pass.

  • Six new converter cases: injection in standalone with datadog also enabled (proves the exclusion), non-default site, both overrides, no-API-key, reuse of a user-defined opamp, and connected mode (where datadog is injected instead).

  • A throwaway test asserting components() returns a factory for component.MustNewType("opamp") passed; not kept, since the generated-component tests cover the registry shape.
  • Additional Notes

    The opamp.<site> endpoint pattern is verified only against us1, and reports_raw_config: true changes what every standalone DDOT sends.

    There is currently no end-to-end test against a live OpAMP server. We could definitely add it, but seems like a large enough effort to warrant its own PR.

    Diff: 471 lines (+353 / -118) across 5 files Reviewer: truthbk Review duration: 1526m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.69) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.69 · 471 lines diff across 5 files
    0.69
    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.368
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.069
    Real PR Conversation Timeline
    1 comments
    "Review active on #58861"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 68.9% (HIGH) · Higher = larger blast radius
    68.9%
    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: 27.2% · Safe to merge
    27.2%