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.
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.