elastic / elastic/integrations
[Discuss] Add `service.name` to service based integrations
- Dominant language
- Handlebars
- Stars
- 333
- Forks
- 647
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 225
Description
The concept of "services" is primarily used in APM but should not be limited to this domain. Other resources like databases, queues and web servers are also types of services that should be named.
Services in APM are identified using the ECS field [`service.name`](https://www.elastic.co/guide/en/ecs/current/ecs-service.html#field-service-name), and we can use this for identifying other types of services too.
Service-based integrations like Nginx, Postgresql and MongoDB ingest logs and metrics but the data is not annotated with `service.name`. There are 3 ways we can apply `service.name` to integrations:
- **Static**: "nginx" for the Nginx integration, "postgresql" for the Postgresql integration an so on
- **Inferred**: The service name can be inferred from standardized/known fields. For example, Kubernetes has recommended labels that "describe applications in a way that can be queried". The service name can therefore be derived from `app.kubernetes.io/name` if set.
- **Configurable**: The user can specify the service name they prefer at the time of installing the integration.
## Related
- Add `service.name` with the value of app.kubernetes.io/name label or kubernetes.container.name field, in this order of preference (https://github.com/elastic/integrations/pull/7118)
Contributor guide
Assessment
This issue has not been assessed yet.