Skip to content

feat(otelcol.receiver.datadog): Expose intake proxy and trace_id_cache_size settings#5776

Merged
thampiotr merged 5 commits into
mainfrom
thampiotr/datadog-receiver-intake-proxy
Mar 13, 2026
Merged

feat(otelcol.receiver.datadog): Expose intake proxy and trace_id_cache_size settings#5776
thampiotr merged 5 commits into
mainfrom
thampiotr/datadog-receiver-intake-proxy

Conversation

@thampiotr
Copy link
Copy Markdown
Contributor

@thampiotr thampiotr commented Mar 12, 2026

Summary

  • Expose the upstream intake config block (with behavior, proxy > api settings) so users can proxy /intake requests to Datadog's API. Without this, the /intake endpoint always returns 405.
  • Expose the trace_id_cache_size attribute for configuring the 64-bit to 128-bit trace ID mapping cache.
  • Update documentation with the new blocks, arguments, and a usage example.

Fixes https://github.com/grafana/support-escalations/issues/21159

Test plan

  • New unit tests for intake proxy config, intake disable config, no intake block (default), and trace_id_cache_size
  • All existing tests pass
  • make lint passes
  • Verify the component works end-to-end with a Datadog Agent sending to /intake

Made with Cursor

@thampiotr thampiotr requested review from a team and clayton-cornell as code owners March 12, 2026 11:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 12, 2026

💻 Deploy preview deleted (feat(otelcol.receiver.datadog): Expose intake proxy and trace_id_cache_size settings).

@thampiotr thampiotr requested a review from Copilot March 12, 2026 12:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the otelcol.receiver.datadog component’s Alloy surface area to match more of the upstream datadogreceiver configuration, enabling /intake proxying to Datadog and allowing configuration of the trace ID mapping cache size.

Changes:

  • Added trace_id_cache_size argument and an intake block (with nested proxy/api) to otelcol.receiver.datadog arguments and conversion logic.
  • Added unit tests covering trace_id_cache_size and multiple intake configurations (proxy/disable/absent).
  • Updated component reference documentation with the new argument/blocks and a /intake proxy example.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
internal/component/otelcol/receiver/datadog/datadog.go Exposes new args/blocks and converts them into upstream datadogreceiver.Config.
internal/component/otelcol/receiver/datadog/datadog_test.go Adds unit tests for the new configuration surface area.
docs/sources/reference/components/otelcol/otelcol.receiver.datadog.md Documents the new argument and intake proxy configuration (including an example).

Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Comment thread internal/component/otelcol/receiver/datadog/datadog_test.go
Comment thread internal/component/otelcol/receiver/datadog/datadog.go Outdated
@thampiotr thampiotr marked this pull request as draft March 12, 2026 13:29
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

@kgeckhart
Copy link
Copy Markdown
Contributor

Made with Cursor

Unrelated: It's interesting to me how all the AI agents want to format PR descriptions in this way. I had added the explicit PR directions as a means to try to force it to use the template in the way we would.

Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
@cursor cursor Bot force-pushed the thampiotr/datadog-receiver-intake-proxy branch from 7fca91a to 67d846d Compare March 12, 2026 14:35
@thampiotr thampiotr requested a review from Copilot March 12, 2026 15:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@thampiotr thampiotr marked this pull request as ready for review March 12, 2026 15:45
@thampiotr thampiotr enabled auto-merge (squash) March 12, 2026 15:50
Comment thread internal/component/otelcol/receiver/datadog/datadog.go
Comment thread internal/component/otelcol/receiver/datadog/datadog_test.go
@thampiotr thampiotr merged commit 0384ad4 into main Mar 13, 2026
49 checks passed
@thampiotr thampiotr deleted the thampiotr/datadog-receiver-intake-proxy branch March 13, 2026 11:11
@thampiotr thampiotr added the backport/v1.14 Backport to release/v1.14 label Mar 13, 2026
grafana-alloybot Bot pushed a commit that referenced this pull request Mar 13, 2026
…e_size settings (#5776)

## Summary

- Expose the upstream `intake` config block (with `behavior`, `proxy >
api` settings) so users can proxy `/intake` requests to Datadog's API.
Without this, the `/intake` endpoint always returns 405.
- Expose the `trace_id_cache_size` attribute for configuring the 64-bit
to 128-bit trace ID mapping cache.
- Update documentation with the new blocks, arguments, and a usage
example.

(cherry picked from commit 0384ad4)
thampiotr added a commit that referenced this pull request Mar 13, 2026
…_size settings [backport] (#5785)

## Backport of #5776

This PR backports #5776 to release/v1.14.

### Original PR Author
@thampiotr

### Description
## Summary

- Expose the upstream `intake` config block (with `behavior`, `proxy >
api` settings) so users can proxy `/intake` requests to Datadog's API.
Without this, the `/intake` endpoint always returns 405.
- Expose the `trace_id_cache_size` attribute for configuring the 64-bit
to 128-bit trace ID mapping cache.
- Update documentation with the new blocks, arguments, and a usage
example.

Fixes https://github.com/grafana/support-escalations/issues/21159

## Test plan

- [x] New unit tests for `intake` proxy config, `intake` disable config,
no intake block (default), and `trace_id_cache_size`
- [x] All existing tests pass
- [x] `make lint` passes
- [x] Verify the component works end-to-end with a Datadog Agent sending
to `/intake`


Made with [Cursor](https://cursor.com)

---
*This backport was created automatically.*

Co-authored-by: Piotr <17101802+thampiotr@users.noreply.github.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/v1.14 Backport to release/v1.14 frozen-due-to-age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants