Designing for observability - logs, metrics and traces
Observability connects logs, metrics and traces through correlation, golden signals and useful operational questions, providing a practical design for distributed services.
Designing for observability - logs, metrics and traces
Monitoring tells us that a service is unhealthy, but an operator still needs to understand why it is unhealthy and which customer operation is impacted. In a distributed fund platform, one request can cross an API, price service, cache and document service, and every component may have a separate log. Looking at one server dashboard is not enough.
In this article, we are going to compare monitoring and observability, discuss logs, metrics and traces as the three pillars, and define correlation, golden signals and a practical design for our services. Refer to the existing APM articles and the “Why we moved to Application Insights” article for more details on application monitoring.
TL;DR Summary
- Monitoring asks whether known conditions are healthy; observability helps us understand unknown failure modes from system output.
- Logs explain events, metrics show measurements across a time window and traces follow one request across services.
- A correlation id and operation id connect the three pillars.
- The golden signals are latency, traffic, errors and saturation.
- OpenTracing, Zipkin and Application Insights dependency tracking are available approaches for distributed tracing.
- Start with a small set of useful signals, then add detail when an operational question needs it.
Challenges
A green dashboard with an unhappy customer
A dashboard may show CPU and memory within limits while one fund report is taking too long. If we only monitor infrastructure counters, we are missing the customer operation and the dependency which is causing the delay.
One request, many services
When a request crosses services, each service is writing its own timestamp and request id. Without a shared correlation id, the operator is joining records by guesswork. Under load, the same time window contains entries from many customers.
Too much data without a question
Collecting every log, metric and trace is increasing storage and query cost. A large data set is not observability if nobody can use it to answer “what changed?” or “which operation is failing?”
What is observability?
Observability is the ability to understand the internal state and behaviour of a system from the outputs it produces, such as logs, metrics and traces.
In simple terms, monitoring is checking known questions like “is the API up?”, while observability is helping us answer new questions like “why are only valuation requests slow after this release?” Monitoring remains important, observability is extending the questions we can ask.
The following diagram depicts the three observability pillars around a shared operation context.

The purple path is the shared correlation context. Logs, metrics and traces are more useful when they can all be filtered by operation, service and time.
Why observability is important?
Observability is important because it is reducing blind spots and helping us move from reactive support calls to proactive diagnosis. A latency alert can point to a trace, the trace can point to a dependency and the dependency logs can explain the failed operation.
In our case, we should begin with the fund API request, its dependency calls and the business outcome. We should not start with every possible metric before understanding which operational decisions they support.
Monitoring versus observability
| Concern | Monitoring | Observability |
|---|---|---|
| Question | Is a known condition healthy? | What is happening and why? |
| Signal | Predefined dashboard and alert | Queryable outputs and context |
| Failure | Known threshold breach | Unknown interaction or new failure |
| Example | CPU is above the limit | Price requests are slow only when cache misses increase |
| Action | Page the operator | Investigate and explain the customer impact |
The two are not competing products. Monitoring is one use of observable system output, and alerts still need clear thresholds and owners.
The three pillars
Logs
Logs record discrete events such as a fund valuation failed, a request was denied or a document was generated. Use structured properties for CorrelationId, FundId, operation and result. Refer the upcoming structured logging article for message templates and sensitive-data rules.
Metrics
Metrics are numeric measurements aggregated across a time window. Track request count, duration, error count, queue depth, cache hit rate and resource saturation. Counters are useful for rates, while gauges are useful for current values.
Traces
Traces follow one operation through services and dependencies. A trace contains spans for the API request, database query, cache call and downstream HTTP call. Zipkin and OpenTracing were available approaches for distributed tracing, and Application Insights can track operation ids and dependencies in an Azure-hosted application.
Golden signals
The golden signals give us a compact starting set,
- Latency: how long the request or dependency call is taking.
- Traffic: how many requests, messages or jobs are arriving.
- Errors: failed requests, exceptions and rejected operations.
- Saturation: how close a resource is to its useful capacity.
Use dimensions such as endpoint, dependency and status, but keep cardinality manageable. A metric with one unique label per request is becoming expensive and difficult to aggregate.
Design the correlation context
Generate or accept a correlation id at the front door, validate its format and add it to every log event. A trace operation id can be carried through HTTP headers to the next service. Do not trust a client to provide an identity value; use the authenticated context separately.
Example:
using (LogContext.PushProperty("CorrelationId", correlationId))
using (LogContext.PushProperty("Operation", "FundValuation"))
{
Log.Information("Starting valuation for {FundId}", fundId);
var result = priceClient.Get(fundId);
Log.Information("Valuation completed with {Status}", result.Status);
}
The same operation should publish request duration, outcome and dependency spans. Keep the identifiers consistent across the API, worker and external service boundary.
When a dependency call is failing, the trace should show whether the API waited for the dependency, retried it or returned a cached result. The log should explain the business operation, and the metric should show whether the pattern is isolated or increasing across all requests. This combination is giving an operator a path from alert to customer impact.
Selection criteria
Choose observability tools from these questions,
- Can the operator search one request across services?
- Can we distinguish an application error from a dependency error?
- Can an alert show customer impact instead of only machine health?
- Can the team retain and protect logs, metrics and traces?
- Can the tool integrate with the existing Azure hosting and APM process?
Application Insights is a pragmatic choice for an Azure-hosted .NET application when the team wants requests, dependencies, exceptions and metrics in one service. OpenTracing and Zipkin are useful when a team needs a vendor-neutral trace model or already operates those components. In our case, choose the smallest combination which answers the operational questions and can be operated day to day.
Must Do / Should / Don’t
Must Do
- Must include correlation and operation context across service boundaries.
- Must measure latency, traffic, errors and saturation for important operations.
- Must protect telemetry because logs and traces can contain customer context.
Should
- Should link an alert to a trace and then to relevant logs.
- Should start with a small set of golden signals and expand from incidents.
- Should define ownership for each alert and dashboard.
Don’t
- Don’t call infrastructure CPU monitoring complete observability.
- Don’t create unique metric dimensions for every request.
- Don’t collect sensitive request bodies or credentials in traces.
Wrap up
In this article, we have looked at monitoring versus observability, logs, metrics, traces, correlation ids, distributed tracing and golden signals.
Thanks for reading this article. In the next article, I will walk you through Cosmos DB versus Azure SQL Database and choosing the right data store.
Related Posts
What is resiliency and why do we need a DR strategy? - Part 1
What resiliency is, why we need a DR strategy, how high availability, disaster recovery and backup differ and the principles we follow.
Cloud cost optimization - right-sizing, reserved capacity and auto-shutdown
Azure cloud cost optimisation combines right-sizing, reserved capacity, auto-shutdown, autoscale, tagging, cleanup, Advisor metrics and showback into a repeatable loop.
Containers vs PaaS vs Serverless - which one for which workload?
VMs, PaaS, containers and serverless offer different control and operational trade-offs, with workload context guiding the right Azure hosting model.