ARTICLE AD BOX
Colleagues, please help. After replicating services across multiple instances (replicas), we need to figure out what additional fields are required to identify instances in metrics, traces, logs, and health checks.
- For example, I wanted to add a "hostname" field to metrics and other places, but the question arose: where would this field come from? From an environment variable? Then who would put it there, DevOps? Or maybe the Open Telemetry Collector can automatically extract the hostname so we don't have to manually set it in environment variables on the server?
- It's important to consider that it's possible that two services could be running on one host, in which case the "host name" field alone won't be sufficient for unambiguous identification. I'm also not yet sure whether it's possible for two service replicas to be running on a single host.
- This is just my opinion on one field. Could you please tell me how else service instances are typically identified in metrics, traces, logs, and health checks?
If it's important, our young project doesn't have Kubernetes. We're deploying the service in Docker Compose on the developer workstations. The team lead plans to use Docker Swarm for production. The project is written in Golang.
