A logging backend centralizes application and infrastructure logs so operators can search events, analyze failures, build dashboards, and create alarms. This becomes essential when independent gRPC microservices produce separate log streams that are difficult to combine locally. section 9.1.3 section 9.3.7
Choose the collection path according to deployment constraints:
- Use node-level logging when applications write to files or standard output; rotate growing files, then ship or analyze the resulting files centrally. section 9.1.3
- Use cluster-level logging when Kubernetes nodes run collection agents, typically as a DaemonSet, to gather container standard-output logs and forward them centrally. section 9.1.3
- Treat the backend as more than a request receiver: it may also provide log dashboards and alarms. section 9.1.3
- Add correlation or distributed trace IDs when operators need to filter one operation across services. section 9.3.7
Trace-aware application logs
A Go service can use logrus with a JSON formatter that reads span data from context and adds trace_id and span_id to every entry. Calling log.WithContext(ctx).Info("Creating order...") then produces searchable structured output for a distributed operation. section 9.3.7
Compare node-level file or standard-output logging with rotation and later shipping. section 9.1.3
Follow the Kubernetes cluster-level path from container output through node agents to centralized collection. section 9.1.3
