[Telemetry] Throw when Elastic APM and OTel tracing are enabled simultanously#258303
Merged
gsoldevila merged 3 commits intoelastic:mainfrom Mar 24, 2026
Merged
[Telemetry] Throw when Elastic APM and OTel tracing are enabled simultanously#258303gsoldevila merged 3 commits intoelastic:mainfrom
gsoldevila merged 3 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/kibana-core (Team:Core) |
28d72c3 to
acd90a1
Compare
gsoldevila
commented
Mar 23, 2026
src/platform/packages/shared/kbn-telemetry/src/init_telemetry.test.ts
Outdated
Show resolved
Hide resolved
…taneously Detects the conflicting configuration at startup and throws a descriptive error, preventing Kibana from starting when both APM (active by default) and OpenTelemetry tracing (telemetry.tracing.enabled) are enabled at the same time, as their context propagation mechanisms clash. Closes elastic#224827 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
acd90a1 to
41f546a
Compare
Member
Author
|
/ci |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @gsoldevila |
951f288 to
9ca47f0
Compare
Merged
3 tasks
viduni94
added a commit
that referenced
this pull request
Mar 25, 2026
…ector resolution (#259446) Closes #259472 ## Summary Fixes two issues breaking `kbn-evals` runs (both local and CI): ### 1. APM / OpenTelemetry tracing conflict A recent validation in `initTelemetry` (#258303, #258663) throws when Elastic APM and OpenTelemetry tracing are both active. The `evals_tracing` Scout config enables OTel tracing but didn't explicitly disable APM, causing Kibana (and the Playwright worker) to crash on startup. Fix: - Added a `coerceCliValue` helper in `applyConfigOverrides` (`kbn-apm-config-loader`) that converts 'true'/'false' to booleans and numeric strings to numbers before they're set in the config object. - Added `--elastic.apm.active=false` and `--elastic.apm.contextPropagationOnly=false` to the `evals_tracing` Scout server config and to `require_init_apm.js` (for the Playwright worker when `TRACING_EXPORTERS` is set). - Updated the `kbn-evals` README to document the required APM settings when configuring tracing in `kibana.dev.yml`. ### 2. Inference endpoint connector resolution #258530 consolidated LLM connector listing through the inference plugin's `getConnectorList()`, which now returns inference endpoint IDs (e.g.: `.anthropic-claude-4.6-opus-chat_completion`) instead of Kibana stack connector keys (e.g.: `elastic-llm-claude-46-opus`). `kbn-evals` was still passing the stack connector key to the inference API, which then tried to execute it as a Kibana action - resulting in "Saved object `[action/.anthropic-claude-4.6-opus-chat_completion]` not found". Fix: - `createConnectorFixture` now detects `.inference-type` connectors and extracts their `inferenceId` from the config, using the ES inference endpoint ID directly. This bypasses the Kibana actions framework and aligns with the unified connector model from [#258530](#258530). ### Checklist - [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] 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.
jeramysoucy
pushed a commit
to jeramysoucy/kibana
that referenced
this pull request
Mar 26, 2026
…tanously (elastic#258303) Prevents Kibana from starting when Elastic APM and OpenTelemetry tracing are both enabled at the same time, as their context propagation mechanisms clash. - Adds a validation check in \`initTelemetry\` that throws a descriptive error when \`elastic.apm.active\` is not explicitly \`false\` and \`telemetry.tracing.enabled\` is \`true\` - The error message tells the user exactly which config knob to turn to resolve the conflict Closes elastic#224827 ## Test plan - [ ] \`yarn test:jest src/platform/packages/shared/kbn-telemetry/src/init_telemetry.test.ts\` — all 5 tests pass --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
jeramysoucy
pushed a commit
to jeramysoucy/kibana
that referenced
this pull request
Mar 26, 2026
…ector resolution (elastic#259446) Closes elastic#259472 ## Summary Fixes two issues breaking `kbn-evals` runs (both local and CI): ### 1. APM / OpenTelemetry tracing conflict A recent validation in `initTelemetry` (elastic#258303, elastic#258663) throws when Elastic APM and OpenTelemetry tracing are both active. The `evals_tracing` Scout config enables OTel tracing but didn't explicitly disable APM, causing Kibana (and the Playwright worker) to crash on startup. Fix: - Added a `coerceCliValue` helper in `applyConfigOverrides` (`kbn-apm-config-loader`) that converts 'true'/'false' to booleans and numeric strings to numbers before they're set in the config object. - Added `--elastic.apm.active=false` and `--elastic.apm.contextPropagationOnly=false` to the `evals_tracing` Scout server config and to `require_init_apm.js` (for the Playwright worker when `TRACING_EXPORTERS` is set). - Updated the `kbn-evals` README to document the required APM settings when configuring tracing in `kibana.dev.yml`. ### 2. Inference endpoint connector resolution elastic#258530 consolidated LLM connector listing through the inference plugin's `getConnectorList()`, which now returns inference endpoint IDs (e.g.: `.anthropic-claude-4.6-opus-chat_completion`) instead of Kibana stack connector keys (e.g.: `elastic-llm-claude-46-opus`). `kbn-evals` was still passing the stack connector key to the inference API, which then tried to execute it as a Kibana action - resulting in "Saved object `[action/.anthropic-claude-4.6-opus-chat_completion]` not found". Fix: - `createConnectorFixture` now detects `.inference-type` connectors and extracts their `inferenceId` from the config, using the ES inference endpoint ID directly. This bypasses the Kibana actions framework and aligns with the unified connector model from [elastic#258530](elastic#258530). ### Checklist - [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] 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.
markov00
pushed a commit
to markov00/kibana
that referenced
this pull request
Mar 26, 2026
…ector resolution (elastic#259446) Closes elastic#259472 ## Summary Fixes two issues breaking `kbn-evals` runs (both local and CI): ### 1. APM / OpenTelemetry tracing conflict A recent validation in `initTelemetry` (elastic#258303, elastic#258663) throws when Elastic APM and OpenTelemetry tracing are both active. The `evals_tracing` Scout config enables OTel tracing but didn't explicitly disable APM, causing Kibana (and the Playwright worker) to crash on startup. Fix: - Added a `coerceCliValue` helper in `applyConfigOverrides` (`kbn-apm-config-loader`) that converts 'true'/'false' to booleans and numeric strings to numbers before they're set in the config object. - Added `--elastic.apm.active=false` and `--elastic.apm.contextPropagationOnly=false` to the `evals_tracing` Scout server config and to `require_init_apm.js` (for the Playwright worker when `TRACING_EXPORTERS` is set). - Updated the `kbn-evals` README to document the required APM settings when configuring tracing in `kibana.dev.yml`. ### 2. Inference endpoint connector resolution elastic#258530 consolidated LLM connector listing through the inference plugin's `getConnectorList()`, which now returns inference endpoint IDs (e.g.: `.anthropic-claude-4.6-opus-chat_completion`) instead of Kibana stack connector keys (e.g.: `elastic-llm-claude-46-opus`). `kbn-evals` was still passing the stack connector key to the inference API, which then tried to execute it as a Kibana action - resulting in "Saved object `[action/.anthropic-claude-4.6-opus-chat_completion]` not found". Fix: - `createConnectorFixture` now detects `.inference-type` connectors and extracts their `inferenceId` from the config, using the ES inference endpoint ID directly. This bypasses the Kibana actions framework and aligns with the unified connector model from [elastic#258530](elastic#258530). ### Checklist - [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] 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.
jeramysoucy
pushed a commit
to jeramysoucy/kibana
that referenced
this pull request
Apr 1, 2026
…ector resolution (elastic#259446) Closes elastic#259472 ## Summary Fixes two issues breaking `kbn-evals` runs (both local and CI): ### 1. APM / OpenTelemetry tracing conflict A recent validation in `initTelemetry` (elastic#258303, elastic#258663) throws when Elastic APM and OpenTelemetry tracing are both active. The `evals_tracing` Scout config enables OTel tracing but didn't explicitly disable APM, causing Kibana (and the Playwright worker) to crash on startup. Fix: - Added a `coerceCliValue` helper in `applyConfigOverrides` (`kbn-apm-config-loader`) that converts 'true'/'false' to booleans and numeric strings to numbers before they're set in the config object. - Added `--elastic.apm.active=false` and `--elastic.apm.contextPropagationOnly=false` to the `evals_tracing` Scout server config and to `require_init_apm.js` (for the Playwright worker when `TRACING_EXPORTERS` is set). - Updated the `kbn-evals` README to document the required APM settings when configuring tracing in `kibana.dev.yml`. ### 2. Inference endpoint connector resolution elastic#258530 consolidated LLM connector listing through the inference plugin's `getConnectorList()`, which now returns inference endpoint IDs (e.g.: `.anthropic-claude-4.6-opus-chat_completion`) instead of Kibana stack connector keys (e.g.: `elastic-llm-claude-46-opus`). `kbn-evals` was still passing the stack connector key to the inference API, which then tried to execute it as a Kibana action - resulting in "Saved object `[action/.anthropic-claude-4.6-opus-chat_completion]` not found". Fix: - `createConnectorFixture` now detects `.inference-type` connectors and extracts their `inferenceId` from the config, using the ES inference endpoint ID directly. This bypasses the Kibana actions framework and aligns with the unified connector model from [elastic#258530](elastic#258530). ### Checklist - [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] 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.
paulinashakirova
pushed a commit
to paulinashakirova/kibana
that referenced
this pull request
Apr 2, 2026
…ector resolution (elastic#259446) Closes elastic#259472 ## Summary Fixes two issues breaking `kbn-evals` runs (both local and CI): ### 1. APM / OpenTelemetry tracing conflict A recent validation in `initTelemetry` (elastic#258303, elastic#258663) throws when Elastic APM and OpenTelemetry tracing are both active. The `evals_tracing` Scout config enables OTel tracing but didn't explicitly disable APM, causing Kibana (and the Playwright worker) to crash on startup. Fix: - Added a `coerceCliValue` helper in `applyConfigOverrides` (`kbn-apm-config-loader`) that converts 'true'/'false' to booleans and numeric strings to numbers before they're set in the config object. - Added `--elastic.apm.active=false` and `--elastic.apm.contextPropagationOnly=false` to the `evals_tracing` Scout server config and to `require_init_apm.js` (for the Playwright worker when `TRACING_EXPORTERS` is set). - Updated the `kbn-evals` README to document the required APM settings when configuring tracing in `kibana.dev.yml`. ### 2. Inference endpoint connector resolution elastic#258530 consolidated LLM connector listing through the inference plugin's `getConnectorList()`, which now returns inference endpoint IDs (e.g.: `.anthropic-claude-4.6-opus-chat_completion`) instead of Kibana stack connector keys (e.g.: `elastic-llm-claude-46-opus`). `kbn-evals` was still passing the stack connector key to the inference API, which then tried to execute it as a Kibana action - resulting in "Saved object `[action/.anthropic-claude-4.6-opus-chat_completion]` not found". Fix: - `createConnectorFixture` now detects `.inference-type` connectors and extracts their `inferenceId` from the config, using the ES inference endpoint ID directly. This bypasses the Kibana actions framework and aligns with the unified connector model from [elastic#258530](elastic#258530). ### Checklist - [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] 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents Kibana from starting when Elastic APM and OpenTelemetry tracing are both enabled at the same time, as their context propagation mechanisms clash.
Closes #224827
Test plan