Skip to content

Agent V2: Automatically add agent info to Elasticsearch headers #32993

@fearful-symmetry

Description

@fearful-symmetry

The current V1 code has a Headers() function that returns headerdata used by elasticsearch: https://github.com/elastic/elastic-agent/blob/689aee33c923be6183267c0e45596aa8d758e6eb/internal/pkg/agent/application/info/agent_info.go#L91

This in turn is used by the InjectHeadersRule to add elasticsearch headers. As far as I can tell, this headers data doesn't exist in the V2 client: https://github.com/elastic/elastic-agent-client/blob/main/pkg/client/client_v2.go

I'm not sure where this data comes from in V2, but we need to add it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions