Expose OTel and Prometheus plugin enabled settings#154951
Conversation
…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.
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
Hi @davidkyle, I've created a changelog YAML for you. |
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
ℹ️ 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 overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
| settings.add(MACHINE_LEARNING_ENABLED); | ||
| settings.add(PROFILING_ENABLED); | ||
| settings.add(APM_DATA_ENABLED); | ||
| settings.add(OTEL_DATA_ENABLED); |
There was a problem hiding this comment.
Just to confirm - this is enabled by default right?
There was a problem hiding this comment.
sidosera
left a comment
There was a problem hiding this comment.
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.
|
@elasticmachine test this please |
The OTel and Prometheus plugins read their respective
xpack.*.enabledsettings 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 anunknown setting [xpack.prometheus.enabled], exit 1error.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