Skip to content

[8.14](backport #4811) Add Resource Detection processor to OTel mode#4979

Merged
michalpristas merged 5 commits into8.14from
mergify/bp/8.14/pr-4811
Jun 21, 2024
Merged

[8.14](backport #4811) Add Resource Detection processor to OTel mode#4979
michalpristas merged 5 commits into8.14from
mergify/bp/8.14/pr-4811

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jun 21, 2024

What does this PR do?

This PR makes the Resource Detection processor available to users running Elastic Agent in otel mode.

Why is it important?

This allows users to enrich the collected telemetry with metadata of the infrastructure, e.g. host.name, os.type, cloud.provider, cloud.region, k8s.cluster.name and many more.

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/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

No impact expected.

How to test this PR locally

  1. Build the agent locally (see docs)
  2. Unpack the .tar.gz archive in build/distributions
  3. Run the built binary with `build/distributions/elastic-agent-*/elastic-agent otel --config internal/pkg/otel/testdata/all-components.yml
    This is an automatic backport of pull request Add Resource Detection processor to OTel mode #4811 done by Mergify.

* Add Resource Detection processor to OTel mode

* go mod tidy

* make notice

For some reason the `go.sum` file contains an update to the dependency `github.com/pascaldekloe/goe`, and go-licence-detector cannot detect the license, which is CC0-1.0.

I have added an override for the package and also added CC0-1.0 to allowed licenses.

* mage otel:readme

* Add changelog entry

* update `elastic-agent-autodiscover` to `v0.7.0`

* make notice

* go mod tidy

* mage update

* make notice

---------

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
(cherry picked from commit a5a4a3b)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
#	internal/pkg/otel/README.md
#	internal/pkg/otel/components.go
#	internal/pkg/otel/testdata/all-components.yml
@mergify mergify bot requested a review from a team as a code owner June 21, 2024 08:18
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 21, 2024
@mergify mergify bot requested review from AndersonQ and pchila and removed request for a team June 21, 2024 08:18
@mergify
Copy link
Contributor Author

mergify bot commented Jun 21, 2024

Cherry-pick of a5a4a3b has failed:

On branch mergify/bp/8.14/pr-4811
Your branch is up to date with 'origin/8.14'.

You are currently cherry-picking commit a5a4a3bbc3.
  (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:
	new file:   changelog/fragments/1716543099-add-otel-resource-detection-processor.yaml
	modified:   dev-tools/notice/overrides.json
	modified:   dev-tools/notice/rules.json

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod
	both modified:   go.sum
	both modified:   internal/pkg/otel/README.md
	both modified:   internal/pkg/otel/components.go
	deleted by us:   internal/pkg/otel/testdata/all-components.yml

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

@michalpristas
Copy link
Contributor

depends on #4981

@mergify
Copy link
Contributor Author

mergify bot commented Jun 21, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.14/pr-4811 upstream/mergify/bp/8.14/pr-4811
git merge upstream/8.14
git push upstream mergify/bp/8.14/pr-4811

@michalpristas michalpristas added backport-v8.14.0 Automated backport with mergify and removed backport labels Jun 21, 2024
@elastic-sonarqube
Copy link

@michalpristas michalpristas enabled auto-merge (squash) June 21, 2024 14:03
@michalpristas michalpristas merged commit e63611c into 8.14 Jun 21, 2024
@michalpristas michalpristas deleted the mergify/bp/8.14/pr-4811 branch June 21, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v8.14.0 Automated backport with mergify conflicts There is a conflict in the backported pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants