Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Oct 14, 2025

What does this PR do?

This PR add a new elasticdiagnsotics extension. This new extension will be used in hybrid mode and will perform diagnostics for running otel collector. It will:

  • Acts as a registrar and keeps track of common diagnostic hooks.
  • Collects profiles using runtime/pprof.
  • Collects internal telemetry exposed by the OTeL Collector.
  • Implements the extensioncapabilities.ConfigWatcher interface and stores the latest configuration of the running collector.
  • Listens for diagnostic requests and provides diagnostic data.

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

Disruptive User Impact

None that i can think of. I have to do some final testing on windows to verify this.

Related issues


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

* edot diagnostics

* revert otel.yml

* add for supervised

* cleanup

* more fixes

* spelling and comments

* docs and comments

* test case

* diagram

* fix test

* fix CI

* cleanup and npipe

* comments

* rename

* go.mod and notice

* go.mod and notice

* restore otel-merged.yaml

* refactor ZipArchiveEDOT

* checkci

* license

* initial commit

* timeout

* fix tests

* fix tests

* comments

* error handling

* lint

* test case

* readme

* gofmt

* remove println

* test

* add cpu profile

* remove telemetry for now.

* remove redundant code

* doc

* fix npipe

* Update internal/pkg/otel/extension/elasticdiagnostics/extension.go

Co-authored-by: Craig MacKenzie <[email protected]>

* readme

* readme

* Update internal/pkg/otel/extension/elasticdiagnostics/extension.go

Co-authored-by: Panos Koutsovasilis <[email protected]>

* mutex

* comments

* Update generated_component_test.go

* Update generated_component_test.go

* comments

* test thorough

* use eventuallyWith

* update go.mod and notice

* add cpu

* comment

* test

* fix test

* lint

* lint

* test

* comments

* cleanup

* comments

* fix test

---------

Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Panos Koutsovasilis <[email protected]>
(cherry picked from commit 47112bd)

# Conflicts:
#	internal/pkg/agent/cmd/otel.go
#	internal/pkg/otel/components.go
#	internal/pkg/otel/extension/elasticdiagnostics/extension.go
#	internal/pkg/otel/manager/diagnostics.go
#	internal/pkg/otel/manager/diagnostics_test.go
#	internal/pkg/otel/manager/execution_embedded.go
#	internal/pkg/otel/manager/manager.go
#	internal/pkg/otel/manager/manager_test.go
#	internal/pkg/otel/translate/otelconfig.go
#	testing/integration/ess/diagnostics_test.go
@mergify mergify bot requested a review from a team as a code owner October 14, 2025 07:49
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Oct 14, 2025
@mergify mergify bot requested review from michalpristas and straistaru and removed request for a team October 14, 2025 07:49
@mergify
Copy link
Contributor Author

mergify bot commented Oct 14, 2025

Cherry-pick of 47112bd has failed:

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

You are currently cherry-picking commit 47112bda4.
  (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:   internal/pkg/agent/application/paths/common.go
	new file:   internal/pkg/agent/cmd/diagnostics_otel.go
	modified:   internal/pkg/agent/cmd/run.go
	modified:   internal/pkg/diagnostics/diagnostics.go
	new file:   internal/pkg/otel/diagnostics.go
	modified:   internal/pkg/otel/manager/force_extension_converter.go
	modified:   internal/pkg/otel/translate/otelconfig_test.go
	modified:   pkg/control/v2/server/server.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   internal/pkg/agent/cmd/otel.go
	both modified:   internal/pkg/otel/components.go
	deleted by us:   internal/pkg/otel/extension/elasticdiagnostics/extension.go
	deleted by us:   internal/pkg/otel/manager/diagnostics.go
	deleted by us:   internal/pkg/otel/manager/diagnostics_test.go
	deleted by us:   internal/pkg/otel/manager/execution_embedded.go
	both modified:   internal/pkg/otel/manager/manager.go
	both modified:   internal/pkg/otel/manager/manager_test.go
	both modified:   internal/pkg/otel/translate/otelconfig.go
	both modified:   testing/integration/ess/diagnostics_test.go

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 Oct 14, 2025
@elasticmachine
Copy link
Collaborator

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

@pierrehilbert
Copy link
Contributor

@VihasMakwana you have some conflicts to fix.

@VihasMakwana
Copy link
Contributor

Not needed on 9.1.

@mergify mergify bot deleted the mergify/bp/9.1/pr-10052 branch October 15, 2025 15:53
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.

3 participants