Skip to content

otel: add otel-specific fields to ingested docs#45242

Merged
mauri870 merged 44 commits intoelastic:mainfrom
mauri870:otel-component-id
Sep 10, 2025
Merged

otel: add otel-specific fields to ingested docs#45242
mauri870 merged 44 commits intoelastic:mainfrom
mauri870:otel-component-id

Conversation

@mauri870
Copy link
Copy Markdown
Member

@mauri870 mauri870 commented Jul 8, 2025

Proposed commit message

This PR adds the otelcol.component.id and otelcol.component.kind to ingested beats receivers documents. These fields are exclusive to docs ingested by beats receivers and thus not present for standalone beats. In order to avoid conflicts with logs that already have these fields they are nested inside the beats event agent property.

See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/component-universal-telemetry.md#receivers

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@mauri870 mauri870 self-assigned this Jul 8, 2025
@mauri870 mauri870 requested a review from a team as a code owner July 8, 2025 17:24
@mauri870 mauri870 added cleanup Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Jul 8, 2025
@mauri870 mauri870 requested review from faec and khushijain21 July 8, 2025 17:24
@mauri870 mauri870 added backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-8.19 Automated backport to the 8.19 branch labels Jul 8, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 8, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mauri870 mauri870 marked this pull request as draft July 8, 2025 20:21
@mauri870 mauri870 force-pushed the otel-component-id branch from acde212 to c8eab70 Compare July 8, 2025 20:24
@mauri870 mauri870 marked this pull request as ready for review July 8, 2025 20:30
@mauri870 mauri870 changed the title otel: add otelcol.component.id field to ingested docs otel: add otel-specific fields to ingested docs Jul 10, 2025
@mauri870
Copy link
Copy Markdown
Member Author

Leaving this as draft until #45314 is merged, otherwise the tests will keep failing.

@mauri870 mauri870 marked this pull request as draft July 10, 2025 19:46
Comment thread libbeat/beat/info.go Outdated
Comment thread x-pack/filebeat/input/gcppubsub/otel_test.go
@mauri870
Copy link
Copy Markdown
Member Author

mauri870 commented Sep 1, 2025

Blocked on #46337.

@mauri870 mauri870 requested a review from ishleenk17 September 1, 2025 15:28
@mauri870
Copy link
Copy Markdown
Member Author

mauri870 commented Sep 2, 2025

/test

@mauri870
Copy link
Copy Markdown
Member Author

mauri870 commented Sep 3, 2025

/test

@mauri870
Copy link
Copy Markdown
Member Author

mauri870 commented Sep 8, 2025

@elastic/security-service-integrations It looks like I still need a review from your team. Could someone please take a look? Thanks!

@mauri870 mauri870 added the backport-8.19 Automated backport to the 8.19 branch label Sep 9, 2025
Copy link
Copy Markdown
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

SSI owned file LGTM

@mauri870 mauri870 merged commit fafbdcb into elastic:main Sep 10, 2025
208 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

@Mergifyio backport 9.0 9.1

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 10, 2025

backport 9.0 9.1

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Sep 10, 2025
* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf

(cherry picked from commit fafbdcb)

# Conflicts:
#	x-pack/filebeat/tests/integration/otel_test.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go
#	x-pack/metricbeat/tests/integration/otel_test.go
mergify bot pushed a commit that referenced this pull request Sep 10, 2025
* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf

(cherry picked from commit fafbdcb)

# Conflicts:
#	x-pack/filebeat/fbreceiver/receiver_test.go
#	x-pack/filebeat/input/gcppubsub/otel_test.go
#	x-pack/filebeat/tests/integration/otel_test.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go
#	x-pack/metricbeat/tests/integration/otel_test.go
mergify bot pushed a commit that referenced this pull request Sep 10, 2025
* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf

(cherry picked from commit fafbdcb)

# Conflicts:
#	x-pack/filebeat/input/gcppubsub/otel_test.go
#	x-pack/filebeat/tests/integration/otel_test.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go
#	x-pack/metricbeat/tests/integration/otel_test.go
mauri870 added a commit that referenced this pull request Sep 10, 2025
#46499)

* otel: add otel-specific fields to ingested docs (#45242)

* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf

(cherry picked from commit fafbdcb)

# Conflicts:
#	x-pack/filebeat/input/gcppubsub/otel_test.go
#	x-pack/filebeat/tests/integration/otel_test.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go
#	x-pack/metricbeat/tests/integration/otel_test.go

* fix conflicts

* remove test not in the 9.1 branch

* remove more tests not in base branch

* remove duplicated client import

---------

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
mauri870 added a commit that referenced this pull request Sep 10, 2025
…cs (#46497)

* otel: add otel-specific fields to ingested docs (#45242)

* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf

(cherry picked from commit fafbdcb)

# Conflicts:
#	x-pack/filebeat/tests/integration/otel_test.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer.go
#	x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go
#	x-pack/metricbeat/tests/integration/otel_test.go

* fix conflicts

* reorder variables in otelconsumer

---------

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
shmsr pushed a commit that referenced this pull request Sep 11, 2025
* otel: add otelcol.component.id field to ingested docs

* adjust otelcol field name

* rename otelcol.component.id in beats event to otel.component.name

* add otel.component.type

* update metricbeatreceiver unit tests

* add integration test coverage

* update receiver name in test pipeline

* use filestream as receiver name

* revert to otelcol.component.id and otelcol.component.kind

* fix tests

* ignore fields

* ignore otel fields in gcppubsub test

* move assertion on otel fields to the up

* fix linter issues

* handle existing otelcol.component.id

* prevent otelcol fields from being replaced if they exist

* put otelcol fields nested inside agent property

* fix E2E tests

* use EventuallyWithTf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches cleanup Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Security-Service Integrations Security Service Integrations Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OTel] Include receiver-specific fields in ingested Beats documents

7 participants