Skip to content

Conversation

VihasMakwana
Copy link
Contributor

@VihasMakwana VihasMakwana commented Sep 19, 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

Copy link
Contributor

mergify bot commented Sep 19, 2025

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 edot-diagnostics upstream/edot-diagnostics
git merge upstream/main
git push upstream edot-diagnostics

Copy link
Contributor

mergify bot commented Sep 19, 2025

This pull request does not have a backport label. Could you fix it @VihasMakwana? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@VihasMakwana VihasMakwana changed the title [DRAFT] edot diagnostics [EDOT] Implement EDOT diagnostics extension and a new subcommand Sep 22, 2025
@VihasMakwana VihasMakwana changed the title [EDOT] Implement EDOT diagnostics extension and a new subcommand [otel] Implement EDOT diagnostics extension Sep 22, 2025
@VihasMakwana VihasMakwana marked this pull request as ready for review September 22, 2025 16:32
@VihasMakwana VihasMakwana requested a review from a team as a code owner September 22, 2025 16:32
swiatekm
swiatekm previously approved these changes Sep 30, 2025
Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

LGTM overall, had some more comments but they aren't blocking.

blakerouse
blakerouse previously approved these changes Sep 30, 2025
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

This looks good and is ready to merge. I do have one request for an added comment.

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Thanks for adding the comment. Looks good.

@ebeahan
Copy link
Member

ebeahan commented Sep 30, 2025

v1.33.0:amd64:basic,slim,complete,service,elastic-otel-collector is timing out in CI to obtain a BK agent, but we don't see this as a blocker. Force merging.

@ebeahan ebeahan merged commit 47112bd into elastic:main Sep 30, 2025
16 of 21 checks passed
@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @VihasMakwana

@VihasMakwana VihasMakwana added the backport-9.1 Automated backport to the 9.1 branch label Oct 14, 2025
mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* 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
@VihasMakwana VihasMakwana added the backport-8.19 Automated backport to the 8.19 branch label Oct 15, 2025
mergify bot pushed a commit that referenced this pull request Oct 15, 2025
* 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/otel/components.go
#	internal/pkg/otel/extension/elasticdiagnostics/extension.go
#	internal/pkg/otel/manager/execution_embedded.go
#	internal/pkg/otel/manager/manager.go
#	internal/pkg/otel/manager/manager_test.go
VihasMakwana added a commit that referenced this pull request Oct 16, 2025
…10597)

* [otel] Implement EDOT diagnostics extension (#10052)

* 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/otel/components.go
#	internal/pkg/otel/extension/elasticdiagnostics/extension.go
#	internal/pkg/otel/manager/execution_embedded.go
#	internal/pkg/otel/manager/manager.go
#	internal/pkg/otel/manager/manager_test.go

* conflitcs

---------

Co-authored-by: Vihas Makwana <[email protected]>
Co-authored-by: Vihas <[email protected]>
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-9.1 Automated backport to the 9.1 branch 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.

[beats receivers] Set management.enabled.otel: true for beats receivers

7 participants