elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.63k stars 24.64k forks source link

Include the cluster name in HTTP response headers #98981

Open stevejgordon opened 1 year ago

stevejgordon commented 1 year ago

Description

In our language client OpenTelemetry Instrumentation and Elastic APM agents, we would like to collect the name of the cluster that a request has been sent to, so that it can be included in our recorded telemetry. This information is not known in advance by the client, which is configured only with one or more node URLs. While this information could be retrieved and cached for a client with an extra HTTP call to /, this is not desirable to implement purely for including this on telemetry. This has been discussed in the APM agent specification.

Today, we have a mechanism when communicating with Elastic Cloud deployments to capture the cluster name from the X-Found-Handling-Cluster response header included by the proxy. It would be desirable if the self-managed product could also include the cluster name as a response header, for the same logical purpose.

elasticsearchmachine commented 1 year ago

Pinging @elastic/es-core-infra (Team:Core/Infra)

Gokulviper commented 1 year ago

Is anyone working on this can work this issue?