Skip to content

Work with Cloud team to ensure x-elastic-client-meta headers are captured in ALL HTTP proxy logs #274

Closed

Description

@JoshMock

The Cloud proxy logs ship to Elasticsearch logging clusters including the x-elastic-client-meta header for all Elasticsearch requests. In order to capture and aggregate CLI telemetry data, this configuration needs to be extended to work for ALL HTTP requests, not just Elasticsearch.

This will require working with the Platform Observability team to get changes reviewed, merged and shipped. Due to the sheer volume of HTTP proxy logs Cloud indexes every day, there are limitations to how much new data they are comfortable adding to the indexed logs. There is also a possibility that proxy infrastructure is different for Elasticsearch vs. other APIs like Kibana or the control plane, so some discovery is still needed on that point.

Open questions:

  • Will cloud proxy logs automatically capture and index x-elastic-client-meta headers in regional logging clusters for non-Elasticsearch traffic (e.g. cloud control plane + Kibana)?
  • If not, what work is necessary to ensure that they are captured and indexed?

Activity

  1. added theissue type on May 4, 2026
  2. self-assigned this
    on May 5, 2026
  3. MattDevy commented on Aug 5, 2026

    @MattDevy
    Contributor

    So looking at https://github.com/elastic/proxy

    Elasticsearch + Kibana (and APM, Fleet, Enterprise Search — anything routed by this proxy): yes.client_metacaptured app-agnostically atlogging.go:229, lands inproxy.requests.log→service-proxy-requests-.
    Cloud APIs: no, and not from this codebase. Two distinct things:
    Elastic Cloud public API (api.elastic-cloud.com, adminconsole) — traffic never touches this proxy. This repo handles cluster data-plane traffic only. Logging there is that service's concern; verify in its repo.
    Proxy's own admin API (/api/v0/
    ,http_handler.go:113) — usesapiLog()(logging.go:1048), which has noclient_metafield. Internal-only endpoints, CLI never hits them.

    So: CLI requests to ES/Kibana through cloud proxy get client_meta logged today, truncated to 100 chars. CLI requests to Cloud API need separate verification in the Cloud API service's repo.
    [4:05 PM]So looks like kibana is already logged. But cloud APIs are not as they don't go through the proxy

  4. MattDevy commented on Aug 5, 2026

    @MattDevy
    Contributor

    Draft PR opened to log requests with x-elastic-client-meta header in the cloud API https://github.com/elastic/cloud/pull/157694

  5. JoshMock commented on Aug 21, 2026

    @JoshMock
    MemberAuthor

    @MattDevy says this is finished now that https://github.com/elastic/cloud/pull/157694 is merged. 🎉

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions