Skip to content

feat(config): adds support for full suite of otlp_config.receiver keys - #2308

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits into
mainfrom
lt/2283
Aug 14, 2026
Merged

feat(config): adds support for full suite of otlp_config.receiver keys#2308
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits into
mainfrom
lt/2283

Conversation

@lucastemb

Copy link
Copy Markdown
Contributor

Summary

As part of the ongoing work related to OTLP Ingest, we noticed that some of the embedded OTEL configuration options were not being broadcasted. This PR seeks to explicitly list all otlp_config.receiver options that are recognized. This will lay the ground work for a series of future PRs addressed at accepting or rejecting support for the full suite of config keys.

The full list can be seen here or here

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

N/A

References

@dd-octo-sts dd-octo-sts Bot added the area/docs Reference documentation. label Aug 11, 2026
@pr-commenter

pr-commenter Bot commented Aug 11, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: c3a020b5-2d13-4df6-9cbc-0f7841806d1e
Baseline: e760adfb · Comparison: 7762e110 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_low memory ⚪ +0.36 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ +0.19 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ +0.19 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.02 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.17 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 227 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 51.5 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 92 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 388 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 31.9 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression. Experiments tagged (no analysis) show ⚠️ n/a: SMP ran them but produced no analysis, usually because a replicate failed and exhausted its retries. Check the SMP report for that experiment's replicate failures.

@pr-commenter

pr-commenter Bot commented Aug 12, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: e760adf · Comparison: 7762e11 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.27 MiB (baseline) vs 41.27 MiB (comparison)
Size Change: +0 B (+0.00%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.dca7d28c8f462601bb81d85101fb8da4.1.llvm.17429043362155062973 +130 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.1.llvm.14513083727528882014 -130 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.4.llvm.17429043362155062973 +114 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.4.llvm.14513083727528882014 -114 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.3.llvm.17429043362155062973 +109 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.3.llvm.14513083727528882014 -109 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.0.llvm.17429043362155062973 +97 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.0.llvm.14513083727528882014 -97 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.2.llvm.17429043362155062973 +95 B 1
anon.dca7d28c8f462601bb81d85101fb8da4.2.llvm.14513083727528882014 -95 B 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW]    +130  [NEW]     +40    anon.dca7d28c8f462601bb81d85101fb8da4.1.llvm.17429043362155062973
  [NEW]    +114  [NEW]     +24    anon.dca7d28c8f462601bb81d85101fb8da4.4.llvm.17429043362155062973
  [NEW]    +109  [NEW]     +19    anon.dca7d28c8f462601bb81d85101fb8da4.3.llvm.17429043362155062973
  [NEW]     +97  [NEW]      +7    anon.dca7d28c8f462601bb81d85101fb8da4.0.llvm.17429043362155062973
  [NEW]     +95  [NEW]      +5    anon.dca7d28c8f462601bb81d85101fb8da4.2.llvm.17429043362155062973
  [DEL]     -95  [DEL]      -5    anon.dca7d28c8f462601bb81d85101fb8da4.2.llvm.14513083727528882014
  [DEL]     -97  [DEL]      -7    anon.dca7d28c8f462601bb81d85101fb8da4.0.llvm.14513083727528882014
  [DEL]    -109  [DEL]     -19    anon.dca7d28c8f462601bb81d85101fb8da4.3.llvm.14513083727528882014
  [DEL]    -114  [DEL]     -24    anon.dca7d28c8f462601bb81d85101fb8da4.4.llvm.14513083727528882014
  [DEL]    -130  [DEL]     -40    anon.dca7d28c8f462601bb81d85101fb8da4.1.llvm.14513083727528882014
  [ = ]       0  [ = ]       0    TOTAL

@webern webern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Headed in the right direction, but instead of doing a one-time patch and checking-in the resultant, patched, schema, we need to deserialize and do the patching in memory at build.rs execution.

Your version of things here in the PR currently works and gives us what we want, but it cannot be maintained because the core schema will be overwritten when we update it.

In general, both schema's should be checked into our repository in a pristine state, no edits or patches. Anything we need to do with them happens in-memory during build.rs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot "patch" the core schema like this because we need to be able to overwrite with a new version.

What we need to do instead is vendor (i.e. check-in to this repo) the otel configuration schema (or the relevant parts of it) here in, e.g. schema/otel next to schema/core. Then during build.rs we deserialize both and perform the "patch" in memory before handing it off to code gen or other processes.

@dd-octo-sts dd-octo-sts Bot added area/docs Reference documentation. and removed area/docs Reference documentation. labels Aug 12, 2026
@lucastemb
lucastemb marked this pull request as ready for review August 12, 2026 20:35
@lucastemb
lucastemb requested a review from a team as a code owner August 12, 2026 20:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f88b4cc38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +585 to +588
pub fn load_composed_schema(datadog_schema: &Path, otel_schema_dir: &Path) -> Result<serde_yaml::Value, Error> {
let mut datadog_schema = load_resolved_schema(datadog_schema)?;
let otel_receiver = load_otel_receiver(otel_schema_dir)?;
patch_receiver(&mut datadog_schema, otel_receiver)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Anchor Datadog key membership in the core schema

When a receiver key exists only in the newly vendored OTel schema, composing it into schema_keys makes the overlay and generators classify it as a Datadog key even though the repository's source-class rule says keys absent from schema/core/ are Saluki-only. If one of these currently unknown entries is later marked supported, it will incorrectly enter the Datadog witness/environment path instead of SalukiOnly; add the keys to the canonical core schema if the Agent owns them, or retain their Saluki-only classification.

AGENTS.md reference: AGENTS.md:L36-L38

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. The Core Agent does "own" these keys, but the processing is delegated and offloaded to the embedded OTEL Collector. It would be misleading to classify them as Saluki-only. Also, it was decided that composition should happen in-memory at build time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is by design as we have though about this and decided that, since these appear in Datadog configuration, and affect the observable behavior of the Agent (by being copied into the embedded OTeL collector), these are effectively Datadog configurations. Furthermore, doing this makes all of our downstream processes work correctly for said keys.

Comment on lines +648 to +652
let Some(receiver) = otlp_config.get_mut("properties").and_then(|v| v.get_mut("receiver")) else {
return Ok(());
};

*receiver = otel_receiver;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve core receiver defaults when composing schemas

Whenever load_composed_schema processes the real core schema, replacing the entire receiver node discards Datadog-specific metadata already present there. For example, the core schema declares gRPC and HTTP endpoint defaults of localhost:4317 and localhost:4318, while the replacement OTel nodes declare no defaults, so schema_gen::load_schema now emits default: None even though DatadogConfiguration is still generated from the unpatched core schema and applies those defaults. Merge the additional OTel properties while retaining attributes from overlapping core nodes so generated metadata and runtime behavior remain consistent.

AGENTS.md reference: AGENTS.md:L36-L38

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch. Fixed in (95e873b). We should honor the DataDog defaults for otlp_config.receiver since they were configured for our specific use cases.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: FAIL

The composed OTLP schema resolves the new receiver keys and representative nested/list/duration shapes correctly, but both build scripts stopped watching referenced core schema files. Later edits to files such as apm_config.yaml can leave generated runtime configuration and test metadata stale.

📊 Validated against 8 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 0f88b4c · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Comment thread lib/datadog-agent/config/build.rs Outdated

let schema_dir = files.schema.parent().expect("schema file must have a parent directory");
println!("cargo:rerun-if-changed={}", schema_dir.display());
println!("cargo:rerun-if-changed={}", files.datadog_schema.display());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Keep watching referenced core schema files

Incremental builds can compile stale configuration structs, environment bindings, classifiers, registry entries, and documentation after a referenced core schema changes.

Assertion details
  • Input: Build once, edit a referenced schema such as schema/core/apm_config.yaml without touching core_schema.yaml, then build again.
  • Expected: Both build scripts should watch the parent core schema directory and the OTel schema directory so every consumed schema change reruns generation.
  • Actual: Both changed build scripts now emit rerun-if-changed only for core_schema.yaml, although load_resolved_schema recursively reads apm_config.yaml, logs_config.yaml, and many other sibling files. Cargo therefore considers the generators fresh after those referenced files change. A complete fix must restore the core-directory watcher in both config/build.rs and config-testing/build.rs, while retaining the new OTel-directory watcher.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. Fixed in 95e873b

@lucastemb
lucastemb requested a review from webern August 13, 2026 15:10
@lucastemb lucastemb changed the title feat(otlp): adds support for full suite of otlp_config.receiver keys feat(config): adds support for full suite of otlp_config.receiver keys Aug 13, 2026

@webern webern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing is that I think the gen_datadog_config is not using the merged schema.

The other comments are less immediate.

Comment thread lib/datadog-agent/config/build.rs Outdated
let schema_map = schema_gen::load_schema(&schema_path);

classifier_gen::generate(&overlay, &schema_map, &manifest_dir);
datadog_config_gen::generate(&overlay, &schema_path, &schema_map, &manifest_dir);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pass the composed schema to datadog_config_gen instead of this raw path? schema_map uses the composed schema, but datadog_config_gen::generate reloads this path with load_resolved_schema. Typed configuration generation therefore still sees the unpatched core schema. The issue requires every build consumer to use the same composed schema.

Put differently... any caller that is using the schema should take the composed schema instead of a file path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 843c6e4

}

/// Merge the resolved OTel receiver subtree into the Datadog schema's `otlp_config.receiver` while
/// honoring default values not native to OTel.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think OTeL defaults are an unsolved problem. They don't exist in the spec, apparently. So as soon as we enable one of these keys, we are going to have to figure out its default and how that value arrives into the code.

I think we can move forward for now, but we will hit this next.

}

/// Resolve a single `$ref` target, returning the definition value and its source `$defs`.
fn resolve_otel_ref_target(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere in here we should either mark these as no_env (I think?) with a TODO, that says see if the Agent accepts these by DD_WHATEVER. Or, if feeling ambitious, maybe do an experiment to see if these can be set by DD env var and if so, use the pattern to populate the right vars here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After poking around (and running a correctness test) it seems like only the 13 that are advertised in core_schema.yaml can be set via DD env var. According to the LLM, it seems that no-env won't suppress generation of DD_* env entries, but I'm unclear what the intended effect is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b9a7bdd, but admittedly, I'm not sure if this is what you were looking for

@webern webern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to unblock this merge because I will be out for three days next week and my review basically amounts to, this looks good and we probably still need to deal with defaults, which we can do in a future PR, or as we enable the fields.

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 8d372a5 into main Aug 14, 2026
98 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the lt/2283 branch August 14, 2026 15:34
dd-octo-sts Bot pushed a commit that referenced this pull request Aug 14, 2026
#2308)

## Summary
<!-- Please provide a brief summary about what this PR does.
This should help the reviewers give feedback faster and with higher quality. -->

As part of the ongoing work related to OTLP Ingest, we noticed that some of the embedded OTEL configuration options were not being broadcasted. This PR seeks to explicitly list all `otlp_config.receiver` options that are recognized. This will lay the ground work for a series of future PRs addressed at accepting or rejecting support for the full suite of config keys.

The full list can be seen [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/config.schema.yaml) or [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/README.md)

## Change Type
- [ ] Bug fix
- [x] New feature
- [ ] Non-functional (chore, refactoring, docs)
- [ ] Performance

## How did you test this PR?
<!-- Please how you tested these changes here -->
N/A
## References

<!-- Please list any issues closed by this PR. -->

<!--
- Closes: <issue link>
-->

- Closes: #2283

<!-- Any other issues or PRs relevant to this PR? Feel free to list them here. -->

Co-authored-by: lucas.tembras <lucas.tembras@datadoghq.com> 8d372a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Reference documentation. mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support non-schema-defined OTEL Receiver configuration

2 participants