Skip to content

Conversation

@afharo
Copy link
Member

@afharo afharo commented Aug 4, 2025

Summary

Resolves #230184

Moves the set up of the metric readers defined in the plugin monitoringCollection to the @kbn/metrics package.

This way, both features are supported and can run alongside.

I added @elastic/stack-monitoring as a co-owner of the @kbn/metrics package to make sure that we don't break their features 😇

Checklist

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@afharo afharo self-assigned this Aug 4, 2025
@afharo afharo requested review from a team and vigneshshanmugam as code owners August 4, 2025 19:16
@afharo afharo added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:Monitoring Stack Monitoring team release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Aug 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Member

@pickypg pickypg left a comment

Choose a reason for hiding this comment

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

LGTM with a comment about the singleton teardown.

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Nice!

@afharo afharo enabled auto-merge (squash) August 6, 2025 10:39
@afharo afharo merged commit b943ab9 into elastic:main Aug 6, 2025
13 checks passed
@afharo afharo deleted the otel/add-compatibility-with-monitoring-collection branch August 6, 2025 12:35
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/apm-config-loader 19 20 +1
monitoringCollection 9 8 -1
total -0
Unknown metric groups

API count

id before after diff
@kbn/apm-config-loader 23 24 +1
@kbn/metrics 5 15 +10
@kbn/metrics-config 6 8 +2
total +13

History

cc @afharo

gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Aug 7, 2025
…230465)

## Summary

Resolves elastic#230184

Moves the set up of the metric readers defined in the plugin
`monitoringCollection` to the `@kbn/metrics` package.

This way, both features are supported and can run alongside.

I added @elastic/stack-monitoring as a co-owner of the `@kbn/metrics`
package to make sure that we don't break their features 😇

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
jbudz added a commit to jbudz/kibana that referenced this pull request Aug 12, 2025
jbudz added a commit that referenced this pull request Aug 12, 2025
#231479)

This rolls back when `@opentelemetry/instrumentation-runtime-node` is
loaded to match the behavior prior to [#230465
](https://github.com/elastic/kibana/pull/230465/files#diff-09903975f886a43375599fff16ecf98582125a6705bccdb12ad667da3ba746acL56).

Without this rollback we're seeing a significant (2-3x) increase in
startup times.
jbudz added a commit to jbudz/kibana that referenced this pull request Aug 12, 2025
elastic#231479)

This rolls back when `@opentelemetry/instrumentation-runtime-node` is
loaded to match the behavior prior to [elastic#230465
](https://github.com/elastic/kibana/pull/230465/files#diff-09903975f886a43375599fff16ecf98582125a6705bccdb12ad667da3ba746acL56).

Without this rollback we're seeing a significant (2-3x) increase in
startup times.
jbudz added a commit that referenced this pull request Aug 14, 2025
#231552)

Forward port of #231479

This rolls back when `@opentelemetry/instrumentation-runtime-node` is
loaded to match the behavior prior to
[#230465](https://github.com/elastic/kibana/pull/230465/files#diff-09903975f886a43375599fff16ecf98582125a6705bccdb12ad667da3ba746acL56).

Without this rollback we're seeing a significant (2-3x) increase in
startup times.
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…230465)

## Summary

Resolves elastic#230184

Moves the set up of the metric readers defined in the plugin
`monitoringCollection` to the `@kbn/metrics` package.

This way, both features are supported and can run alongside.

I added @elastic/stack-monitoring as a co-owner of the `@kbn/metrics`
package to make sure that we don't break their features 😇

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
elastic#231552)

Forward port of elastic#231479

This rolls back when `@opentelemetry/instrumentation-runtime-node` is
loaded to match the behavior prior to
[elastic#230465](https://github.com/elastic/kibana/pull/230465/files#diff-09903975f886a43375599fff16ecf98582125a6705bccdb12ad667da3ba746acL56).

Without this rollback we're seeing a significant (2-3x) increase in
startup times.
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
elastic#231552)

Forward port of elastic#231479

This rolls back when `@opentelemetry/instrumentation-runtime-node` is
loaded to match the behavior prior to
[elastic#230465](https://github.com/elastic/kibana/pull/230465/files#diff-09903975f886a43375599fff16ecf98582125a6705bccdb12ad667da3ba746acL56).

Without this rollback we're seeing a significant (2-3x) increase in
startup times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:Monitoring Stack Monitoring team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OTel Metrics] Fix Monitoring Collection vs. Core incompatibility

5 participants