elastic / apm

Elastic Application Performance Monitoring - resources and general issue tracking for Elastic APM.
https://www.elastic.co/apm
Apache License 2.0
376 stars 111 forks source link

Support centrally defined service labels #776

Open axw opened 1 year ago

axw commented 1 year ago

Is your feature request related to a problem? Please describe.

Users sometimes have a need to specify additional labels for instrumented services, e.g. the organisation/department/team which owns the service.

At the moment it is only possible to specify global labels locally to each agent, i.e. by setting the ELASTIC_APM_GLOBAL_LABELS environment variable or language-specific equivalents (system properties, etc.)

Describe the solution you'd like

We should be able to define a mapping of service.name to global labels through agent central config. e.g. https://discuss.elastic.co/t/setup-global-labels-in-remote-apm-agent-configuration/328112

Describe alternatives you've considered

Users could attach additional labels by customising the APM ingest pipelines.

barcus commented 1 year ago

Thank you @axw for this request I have more than 300 services and more than 800k events per day in APM, I'm a bit worry about applying ingest pipeline to all of them based on a condition through service name 🤔

axw commented 1 year ago

@barcus is your concern about the manageability aspect, or performance? 800K events/day is ~9 events/second, so I don't think this would be a problem for an ingest pipeline to manage.

barcus commented 1 year ago

@axw the performance, but I did a mistake, there are about 800 millions per day !