Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce support for fields configuration #12114

Open
axw opened this issue Nov 28, 2023 · 0 comments
Open

Reintroduce support for fields configuration #12114

axw opened this issue Nov 28, 2023 · 0 comments

Comments

@axw
Copy link
Member

axw commented Nov 28, 2023

When we switched to the new ES output in 8.0, we dropped support for adding statically defined fields to all events received by apm-server. Beats has this configuration:

# Optional fields that you can specify to add additional information to the
# output.
#fields:
#  env: staging

This can be used for setting environment-wide fields, such as service.environment or orchestrator.cluster.name. The only practical alternative that I can think of would be to set global labels on all agents feeding into the apm-server in that environment.

We should consider reintroducing this configuration. There would likely need to be two implementations of this -- one for libbeat outputs, and one for the docappender output. For the latter, it can be implemented by using sjson (or similar) after marshalling an event to JSON:

if err := modeljson.MarshalAPMEvent(event, &r.jsonw); err != nil {
r.reset()
return err
}

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

No branches or pull requests

1 participant