Configure the output

edit

You configure APM Server to write to a specific output by setting options in the Outputs section of the apm-server.yml config file. Only a single output may be defined.

The following topics describe how to configure each supported output:

If you’ve secured the Elastic Stack, also read Securing APM Server for more about security-related configuration options.

Sourcemaps

edit

Sourcemaps can be uploaded through all outputs but must eventually be stored in Elasticsearch. When using outputs other than Elasticsearch, source_mapping.elasticsearch must be set for source maps to be applied. Be sure to update source_mapping.index_pattern if sourcemaps are stored in the non-default location. See source_mapping.elasticsearch for more details.

fields

edit

Fields are optional tags that can be added to any output. Fields can be scalar values, arrays, dictionaries, or any nested combination of these. By default, the fields that you specify here will be grouped under a fields sub-dictionary in the output document.

Example:

fields: {project: "myproject", instance-id: "574734885120952459"}

To store the custom fields as top-level fields, set the fields_under_root option to true. This is not recommended as when new fields are added to APM documents backward compatibility cannot be ensured.