Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 11, 2025

What does this PR do?

This PR adds component.* fields for components run by the OTelManager. For more reasoning check https://github.com/elastic/ingest-dev/issues/5139

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Logs from normal mode

{"log.level":"info","@timestamp":"2025-02-24T10:59:43.243Z","message":"X","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"log.logger":"centralmgmt.V2-manager","log.origin":{"file.line":505,"file.name":"management/managerV2.go","function":"github.com/elastic/beats/v7/x-pack/libbeat/management.(*BeatV2Manager).unitListen"},"service.name":"filebeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}

Logs from components run by Otel Manager

{"log.level":"error","@timestamp":"2025-02-27T17:24:15.152+0530","log.logger":"modules","message"X","log":{"source":"elastic-agent"},"kind":"receiver","name":"filebeatreceiver/_agent-component/filestream-default","data_type":"logs","log":{"source":"filestream-default"},"component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-default"},"service.name":"Khushis-MacBook-Pro.local","ecs.version":"1.6.0","ecs.version":"1.6.0"}

Some Differences:

  • We have two log.source fields in the latter. It is not misleading, but two fields with same key can be confusing to users.

Related issues


This is an automatic backport of pull request #7062 done by [Mergify](https://mergify.com).

* Add  fields to otel logs

(cherry picked from commit ca05561)

# Conflicts:
#	go.mod
#	go.sum
@mergify mergify bot requested a review from a team as a code owner March 11, 2025 10:16
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Mar 11, 2025
@mergify mergify bot requested review from michel-laterman and pchila and removed request for a team March 11, 2025 10:16
@mergify
Copy link
Contributor Author

mergify bot commented Mar 11, 2025

Cherry-pick of ca05561 has failed:

On branch mergify/bp/8.x/pr-7062
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit ca055614f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   NOTICE.txt
	modified:   internal/pkg/otel/configtranslate/otelconfig.go
	modified:   internal/pkg/otel/configtranslate/otelconfig_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   go.mod
	both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Mar 11, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elastic-sonarqube
Copy link

@khushijain21 khushijain21 enabled auto-merge (squash) March 11, 2025 13:35
@khushijain21 khushijain21 merged commit 1751774 into 8.x Mar 11, 2025
13 checks passed
@khushijain21 khushijain21 deleted the mergify/bp/8.x/pr-7062 branch March 11, 2025 13:44
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

cc @khushijain21

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

Labels

backport conflicts There is a conflict in the backported pull request skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants