registry-operator / adr

Collection of Architectural Decision Records (ADRs)
The Unlicense
0 stars 2 forks source link

[registry-operator]: observability toolkit #2

Open shanduur opened 4 months ago

shanduur commented 4 months ago

Context and Problem Statement

Any new application should be designed with observability from the start. Observability, encompassing tracing, logs, and metrics, is essential for understanding and managing the behaviour and performance of applications.

  1. Tracing allows for the tracking of requests as they move through various components, enabling pinpointing of bottlenecks and debugging of issues.
  2. Logs provide a detailed record of events and errors, aiding in troubleshooting and auditing.
  3. Metrics offer insights into system performance and resource utilization, facilitating proactive monitoring and optimization.

By incorporating robust observability practices into app design, developers can ensure better reliability, scalability, and maintainability, ultimately enhancing user experience and operational efficiency.

Considered Options

shanduur commented 4 months ago

controller-runtime by default uses logr for logging and prometheus-client for metrics. I would prefer to stick to those defaults, with slog handler. Metrics are beneficial for end users as they allow monitoring and alerting, while traces may not be as essential because they primarily focus on debugging and diagnosing specific issues rather than overall system health and efficiency.

shanduur commented 3 months ago

Looking at Kubernetes KEPs, I noticed that the whole ecosystem is switching to Contextual logging using k8s.io/klog/v2 (KEP-3077) which design is based on logr's design.