Skip to content

[Telemetry] Throw when Elastic APM and OTel tracing are enabled simultanously#258303

Merged
gsoldevila merged 3 commits intoelastic:mainfrom
gsoldevila:claude/suspicious-rubin
Mar 24, 2026
Merged

[Telemetry] Throw when Elastic APM and OTel tracing are enabled simultanously#258303
gsoldevila merged 3 commits intoelastic:mainfrom
gsoldevila:claude/suspicious-rubin

Conversation

@gsoldevila
Copy link
Copy Markdown
Member

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 #224827

Test plan

  • `yarn test:jest src/platform/packages/shared/kbn-telemetry/src/init_telemetry.test.ts` — all 5 tests pass

@gsoldevila gsoldevila self-assigned this Mar 18, 2026
@gsoldevila gsoldevila requested review from a team as code owners March 18, 2026 10:33
@gsoldevila gsoldevila added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 18, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

🚀

@gsoldevila gsoldevila force-pushed the claude/suspicious-rubin branch from 28d72c3 to acd90a1 Compare March 23, 2026 10:15
…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>
@gsoldevila gsoldevila force-pushed the claude/suspicious-rubin branch from acd90a1 to 41f546a Compare March 23, 2026 10:21
@gsoldevila
Copy link
Copy Markdown
Member Author

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #69 / Package policies Package Policy - update Input Packages should install index templates when upgrading from input package to integration package

Metrics [docs]

✅ unchanged

History

cc @gsoldevila

@gsoldevila gsoldevila force-pushed the claude/suspicious-rubin branch from 951f288 to 9ca47f0 Compare March 24, 2026 08:05
@gsoldevila gsoldevila enabled auto-merge (squash) March 24, 2026 08:06
@gsoldevila gsoldevila merged commit 86d1a30 into elastic:main Mar 24, 2026
18 checks passed
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.
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// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Server-side OTel] Throw when Elastic APM and OTel being enabled at the same time

4 participants