Skip to content

Expose OTel and Prometheus plugin enabled settings#154951

Open
davidkyle wants to merge 5 commits into
elastic:mainfrom
davidkyle:expose-enable-settings
Open

Expose OTel and Prometheus plugin enabled settings#154951
davidkyle wants to merge 5 commits into
elastic:mainfrom
davidkyle:expose-enable-settings

Conversation

@davidkyle

Copy link
Copy Markdown
Member

The OTel and Prometheus plugins read their respective xpack.*.enabled settings to toggle on or off. The settings are defined XPackSettings but those setting are not exposed to the outside world, if set the node will fail to start with an unknown setting [xpack.prometheus.enabled], exit 1 error.

The settings are required to disable these features in certain serverless projects. This change exposes the settings and adds a simple REST test to verify the REST endpoints are hidden.

Related to #154826

…llSettings()

Both settings were defined but omitted from getAllSettings(), which means
XPackClientPlugin would not register them and the node would reject them
as unknown settings if configured.
…n disabled

When xpack.otel_data.enabled or xpack.prometheus.enabled is false the
respective plugin registers no REST handlers, so all requests to those
endpoints should be rejected with 404.
@davidkyle
davidkyle requested a review from a team as a code owner July 24, 2026 11:25
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jul 24, 2026
@davidkyle davidkyle added Team:StorageEngine and removed needs:triage Requires assignment of a team area label labels Jul 24, 2026
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label and removed Team:StorageEngine labels Jul 24, 2026
@davidkyle davidkyle removed the needs:triage Requires assignment of a team area label label Jul 24, 2026
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jul 24, 2026
@davidkyle davidkyle added :StorageEngine/TSDB You know, for Metrics and removed needs:triage Requires assignment of a team area label labels Jul 24, 2026
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @davidkyle, I've created a changelog YAML for you.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@sidosera sidosera added the :StorageEngine/PromQL PromQL support for Elastic label Jul 24, 2026
settings.add(MACHINE_LEARNING_ENABLED);
settings.add(PROFILING_ENABLED);
settings.add(APM_DATA_ENABLED);
settings.add(OTEL_DATA_ENABLED);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to confirm - this is enabled by default right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@sidosera sidosera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Accepting to unblock. Added clarification question about default behavior.

Elasticsearch's RestController returns 400 (not 404) when no handler
is registered for a URI/method pair. Update OTLPDisabledRestIT and
PrometheusDisabledRestIT to assert the correct status code.
@davidkyle

Copy link
Copy Markdown
Member Author

@elasticmachine test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants