We are creating a backend observability rubric. The rubric should cover four main areas: structured logs, tracing, metric cardinality, and ownership.
We want to define what good observability looks like in each of these areas, possibly with levels (e.g., bronze, silver, gold) or criteria.
However, note that the user's request is to "compose a backend observability rubric", so we are to produce a document that sets standards.
Let's break down each area:
-
Structured Logs:
- What makes a log structured? (JSON, key-value pairs, etc.)
- What fields should be present? (timestamp, severity, service name, trace ID, etc.)
- How to handle sensitive data?
- Log levels and their appropriate use.
- Sampling and performance considerations.
-
Tracing:
- What is distributed tracing? (trace, span, parent ID, etc.)
- How to propagate context (e.g., W3C Trace Context).
- Integration with logging (correlation via trace ID).
- Sampling strategies (e.g., fixed rate, adaptive, etc.)
- What to trace? (external calls, database queries, etc.)
-
Metric Cardinality:
- Understanding cardinality in metrics (labels/tags).
- Avoiding high cardinality (e.g., user IDs, request IDs in labels).
- Recommended label sets for common metrics (e.g., HTTP status codes, methods, endpoints).
- How to design metrics to be scalable and useful.
-
Ownership:
- Who owns the observability of a service? (the team that owns the service)
- Documentation: what should be documented about the observability setup?
- SLIs/SLOs: defining service level indicators and objectives.
- Alerting: who is responsible for responding to alerts? (often the team that owns the service)
We can structure the rubric as a set of criteria for each area, possibly with different levels (like maturity levels).
Alternatively, we can create a checklist or a set of must-haves and nice-to-haves.
Let's think about the purpose: the rubric is likely used to evaluate or set standards for backend services.
Proposed structure:
For each area (structured logs, tracing, metric cardinality, ownership):
- Description: What is this about and why is it important?
- Key Requirements: List of must-have criteria.
- Advanced Practices: List of nice-to-have or advanced criteria.
- Common Pitfalls: What to avoid.
However, the user might be looking for a rubric that can be used to score a service.
Another common approach is to have levels:
Level 1 (Basic): Minimum viable observability.
Level 2 (Standard): Good practices that are widely adopted.
Level 3 (Advanced): State-of-the-art, but may require more effort.
Let's do levels for each area? But note the four areas are different, so we might have a total score by combining the levels in each.
Alternatively, we can have a rubric that is a set of criteria and then assign a score (e.g., 0-5) for each criterion, and then sum up.
However, the user did not specify the format. Since they said "rubric", it could be a scoring guide.
Let me propose:
We create a table with rows as the criteria (grouped by the four areas) and columns as the levels (or scores).
But to keep it simple and actionable, let's define:
For each area, we define:
- Bronze (or 1): The minimal acceptable standard.
- Silver (or 2): The recommended standard for production services.
- Gold (or 3): Advanced, for critical services or when you have the resources.
Then we can have a total score by adding up the levels? But note that the areas are not equally weighted.
Alternatively, we can have a pass/fail for bronze, and then silver and gold are improvements.
Since the user didn't specify, I'll create a rubric that defines:
For each area, what are the criteria for bronze, silver, and gold.
Let's do:
-
Structured Logs:
Bronze:
- All logs are structured (JSON or key-value) and not plain text.
- Logs include at least: timestamp, log level, service name, and a message.
- Logs are written to stdout/stderr or a log file that is collected by a centralized system.
Silver:
- All logs include a trace ID for correlation with traces (when available).
- Logs are not overly verbose (e.g., debug logs are disabled by default in production).
- Sensitive data (PII, secrets) is masked or omitted.
- Logs are rotated and retained according to policy.
Gold:
- Logs are enriched with additional context (e.g., user ID, request ID, version) when appropriate and without high cardinality.
- Log sampling is implemented for high-volume services to avoid overwhelming the system, and the sampling is configurable.
- Logs are indexed and searchable in near real-time for debugging.
-
Tracing:
Bronze:
- The service generates and propagates trace context (trace ID, span ID) for all incoming and outgoing requests.
- Traces are exported to a tracing backend (e.g., Jaeger, Zipkin, or a commercial APM).
- Key operations (e.g., external calls, database queries) are spanned.
Silver:
- Tracing is integrated with logging (log entries include trace ID and span ID).
- The service uses a standard propagation format (W3C Trace Context).
- The service respects the sampling decision from the upstream (if any) and makes its own sampling decisions for new traces.
- Traces include meaningful operation names and tags (e.g., HTTP method, URL, status code).
Gold:
- Adaptive sampling is used to maintain a target number of traces per second (or per minute) to avoid data loss and control costs.
- The service implements custom spans for important business logic (e.g., a critical function call).
- Traces are analyzed for performance issues, and the team regularly reviews trace data.
-
Metric Cardinality:
Bronze:
- Metrics are labeled with low-cardinality values only (e.g., status code, method, endpoint but not user ID or request ID).
- The service exports metrics in a standard format (e.g., Prometheus) and they are scraped by a central system.
Silver:
- The service has a set of standard metrics (e.g., request duration, error count, request count) with appropriate labels.
- The team has documented the allowed labels for each metric and their possible values (to avoid high cardinality).
However, note that the rubric might be used to evaluate a service, so we need to make it measurable.
Alternatively, we can have a scoring system:
For each criterion, we assign 0 (not met), 1 (partially met), 2 (fully met). Then we can have a total score.
But the user didn't ask for a score, just a rubric.
Let me adjust: the rubric should define what is expected at each level.
Since the user said "rubric", it is often used for assessment. So I'll define:
For each of the four areas, we have three levels (bronze, silver, gold) with clear definitions.
Then, when assessing a service, we can say it is at bronze level for structured logs, silver for tracing, etc.
We can also have an overall level by taking the minimum or average? But the areas are independent.
Given the complexity, I think it's better to have independent levels for each area.
Let me write it in a structured way.
However, note: the user might want a single rubric that covers all four areas. So we can have a table:
| Area | Bronze | Silver | Gold |
|---|
| Structured Logs | ... | ... | ... |
| Tracing | ... | ... | ... |
| ... | ... | ... | ... |
But the descriptions might be long. Alternatively, we can have a list for each area.
Since the user asked to "compose" and we are in a text-based response, I'll write it as a markdown document.
Let's do:
Backend Observability Rubric
This rubric defines the expected standards for backend services in terms of observability. It covers four key areas: structured logs, tracing, metric cardinality, and ownership. Each area has three levels of maturity: Bronze (minimum), Silver (recommended), and Gold (advanced).
1. Structured Logs
Bronze
- Logs are structured (JSON or key-value pairs) and not plain text.
- Each log entry includes at least:
timestamp, level (or severity), service (or service.name), and message.
- Logs are emitted to standard output/error or to a file that is collected by a centralized logging system.
Silver
- All logs include a
trace_id (and span_id when applicable) to correlate with traces.
- Log levels are used appropriately (e.g.,
debug for detailed information, info for general events, warn for recoverable errors, error for failures). Debug logs are disabled by default in production.
- Sensitive data (PII, secrets) is masked or omitted from logs.
- Logs are rotated and retained according to a defined policy (e.g., 30 days).
Gold
- Logs are enriched with additional context when it aids debugging and without introducing high cardinality (e.g.,
user_id if the user base is small, request_id for a specific request).
- For high-volume services, log sampling is implemented (e.g., 10% of requests) and the sampling rate is configurable without restarting the service.
- Logs are indexed and searchable in near real-time (e.g., within a few seconds) for quick debugging.
2. Tracing
Bronze
- The service generates and propagates trace context (trace ID, span ID) for all incoming and outgoing requests (using a standard like W3C Trace Context).
- Traces are exported to a tracing backend (e.g., Jaeger, Zipkin, Datadog APM).
- Key operations (e.g., external HTTP calls, database queries, message queue operations) are automatically instrumented as spans.
Silver
- Log entries include
trace_id and span_id to correlate logs with traces.
- The service respects the sampling decision from upstream (if present) and makes its own sampling decisions for new traces (with a default sampling rate, e.g., 1% or 10%).
- Spans have meaningful operation names (e.g.,
GET /users, SELECT * FROM users) and include relevant tags (e.g., http.method, http.status_code, db.statement).
Gold
- Adaptive sampling is used to maintain a target number of traces per second (e.g., 100 traces per second) to avoid data loss and control costs.
- The service includes custom spans for important business logic (e.g., a complex calculation or a critical workflow step).
- The team regularly reviews trace data (e.g., slow traces, error traces) to identify performance bottlenecks and failures.
3. Metric Cardinality
Bronze
- All metrics are labeled with low-cardinality values only. Avoid labeling with high-cardinality data (e.g., user IDs, request IDs, arbitrary strings).
- Metrics are exported in a standard format (e.g., Prometheus text format) and are scraped by a central metrics system.
Silver
- The service has a set of standard metrics (e.g.,
http_requests_total, http_request_duration_seconds, http_errors_total) with appropriate labels (e.g., method, endpoint, status_code).
- The team has documented the allowed labels for each metric and their possible values (to prevent high cardinality).
Gold
- The service uses recording rules to precompute expensive queries (e.g., 99th percentile latency over 5 minutes) and stores them as new metrics to reduce load on the metrics database.
- The team monitors the cardinality of metrics (e.g., via alerts on the number of time series) and investigates sudden increases.
- Metrics are used to define and monitor SLOs (e.g., availability, latency) and are visualized in dashboards.
4. Ownership
Bronze
- The team that owns the service is responsible for its observability (logs, traces, metrics).
- There is documentation (in the code repository, e.g., README) on how to access the logs, traces, and metrics for the service.
Silver
- The team defines and monitors at least one SLI (Service Level Indicator) and SLO (Service Level Objective) for the service (e.g., availability, latency, error rate). These are documented and reviewed periodically (e.g., quarterly).
- Alerts for the service are owned by the team, and there is a clear escalation path (e.g., PagerDuty rotation) and runbooks for common alerts.
Gold
- The team has runbooks for common issues that can be diagnosed using the observability data (logs, traces, metrics). Runbooks are kept up-to-date.
- The team participates in blameless post-mortems for incidents and uses observability data to drive improvements (e.g., adding more logs, adjusting SLOs, fixing technical debt).
This rubric can be used to assess the observability maturity of a backend service. Each area is independent, and a service can be at different levels in different areas.
However, note that the levels are cumulative: achieving Silver implies meeting Bronze criteria, and Gold implies meeting Silver.
When assessing, check the criteria for each level in order.
This is a starting point and should be adapted to the organization's specific needs and tooling.
Backend Observability Maturity Rubric
Overview
This rubric evaluates backend system observability across four critical pillars. Each pillar has Bronze (minimum viable), Silver (production-ready), and Gold (advanced) maturity levels. Total possible score: 12 points (3 points per pillar × 4 pillars).
1. Structured Logging (Max 3 pts)
Bronze (1 pt)
- ✅ Logs emitted in structured format (JSON/Key-Value)
- ✅ Required fields present:
timestamp, severity, service.name, message
- ✅ No sensitive data in logs (PII, secrets masked/redacted)
Silver (2 pts)
- ✅ Contextual enrichment:
trace_id, span_id, user_id (non-PII), request_id
- ✅ Standard severity levels used appropriately (
DEBUG/INFO/WARN/ERROR/FATAL)
- ✅ Log rotation/retention policy configured (e.g., 30 days hot storage)
- ✅ Centralized collection via agent/forwarder (FluentBit, Filebeat, OpenTelemetry Collector)
Gold (3 pts)
- ✅ Dynamic sampling implemented (adjust rate based on volume/error rate)
- ✅ Log correlation with traces/metrics via shared context propagation
- ✅ Schema validation enforced (log structure validated on ingestion)
- ✅ Performance monitoring: log generation latency <1ms, <1% CPU overhead
2. Distributed Tracing (Max 3 pts)
Bronze (1 pt)
- ✅ Trace context propagation across service boundaries (W3C Trace Context)
- ✅ Root spans created for all ingress requests
- ✅ Key operations instrumented (DB calls, external HTTP/I/O, async processing)
Silver (2 pts)
- ✅ Span attributes populated with meaningful tags (
http.method, db.statement, messaging.destination)
- ✅ Error propagation: exceptions captured with stack traces
- ✅ Sampling strategy documented (fixed-rate, probabilistic, or head-based)
- ✅ Trace lookup by
trace_id available in logging/tracing UI
Gold (3 pts)
- ✅ Adaptive sampling (tail-based sampling for errors/slow traces)
- ✅ Custom instrumentation for business-critical workflows
- ✅ Trace-spans-to-logs bidirectional correlation (logs contain
span_id, traces contain log links)
- ✅ Performance budgets tracked per span (e.g., "DB query < 100ms" alerts)
3. Metric Cardinality Management (Max 3 pts)
Bronze (1 pt)
- ✅ No high-cardinality labels (avoid
user_id, request_id, session_id as labels)
- ✅ Standard base metrics exported: request count, duration, errors
- ✅ Metric naming convention followed (e.g.,
service_request_duration_seconds)
Silver (2 pts)
- ✅ Cardinality limits enforced per metric (e.g., <100 unique label combinations)
- ✅ Label value sanitization (trim length, replace special chars)
- ✅ Metric documentation cataloging purpose, labels, and cardinality expectations
- ✅ SLO/SLI metrics defined (availability, latency, throughput)
Gold (3 pts)
- ✅ Automated cardinality alerts (e.g., "metric
http_requests exceeded 50 label values")
- ✅ Recording rules used to pre-aggregate high-cardinality raw metrics
- ✅ Histogram/quantile optimization (dynamic buckets for latency metrics)
- ✅ Cost-aware design: metrics mapped to business value vs. storage cost
4. Ownership & Operations (Max 3 pts)
Bronze (1 pt)
- ✅ Clear service ownership (team/individual documented in
OWNERS file or service catalog)
- ✅ On-call rotation defined with primary/secondary contacts
- ✅ Basic alert runbooks for critical failures (e.g., "service down" procedures)
Silver (2 pts)
- ✅ SLOs defined and monitored (with error budget tracking)
- ✅ Alert fatigue prevention: alerts actionable, non-overlapping, with clear severity
- ✅ Observability documentation in
README.md/wiki: data locations, query examples, ownership
- ✅ Regular incident reviews (blameless post-mortems with observability analysis)
Gold (3 pts)
- ✅ Proactive reliability work: weekly error budget burn review, capacity planning
- ✅ Automated remediation for known patterns (e.g., auto-restart, circuit breaker tuning)
- ✅ Cross-service dependency mapping visualized (service topology with health)
- ✅ Cost accountability: observability costs allocated to service/team budgets
Scoring & Assessment
| Pillar | Bronze | Silver | Gold | Max |
|---|
| Structured Logs | 1 | 2 | 3 | 3 |
| Tracing | 1 | 2 | 3 | 3 |
| Metric Cardinality | 1 | 2 | 3 | 3 |
| Ownership | 1 | 2 | 3 | 3 |
| Total | | | | 12 |
Maturity Tiers
- 0-4 pts: Ad-hoc – Observability fragmented, reactive debugging only
- 5-8 pts: Defined – Production-ready but gaps in correlation/automation
- 9-12 pts: Optimized – Proactive reliability, cost-aware, full-stack visibility
Key Principles Embedded
- Cardinality as a first-class concern – Metrics scale with label value count, not just metric count
- Context propagation invariant –
trace_id flows from ingress → all logs/spans → egress
- Ownership = Accountability – Teams own their observability data quality and costs
- Actionability over volume – All signals tie to actions (alerts, debugging, capacity decisions)
Implementation Checklist
Adapt this rubric to your stack (Prometheus vs. OTel, ELK vs. Loki, Jaeger vs. X-Ray). The principles hold regardless of tooling.