← All articles
Architecture · MuleSoft · Observability · Distributed Systems

Designing Observability for Enterprise Integrations

Enterprise integrations rarely fail in one neat place. A business transaction may enter through an API, publish an event, cross a queue, invoke several services and finally update a system of record. When something goes wrong, the important question is not simply which application logged an error? It is what happened to this business transaction across the entire path?

That distinction is the foundation of integration observability.

Logs Are Evidence, Not the Architecture

Application logs are useful, but a collection of logs does not automatically provide observability. A production support engineer should be able to answer questions such as:

  • Where did the transaction enter the platform?
  • Which systems processed it?
  • Which business identifier was involved?
  • How long did each stage take?
  • Was a message retried or duplicated?
  • Where did processing stop?
  • Can the transaction be recovered safely?

If answering those questions requires manually searching five applications using timestamps, the platform has logging but weak observability.

Start with a Correlation Model

A correlation identifier should travel with the transaction whenever possible.

Client
  -> Experience API [correlationId=abc]
  -> Process API    [correlationId=abc]
  -> Queue/Event    [correlationId=abc]
  -> System API     [correlationId=abc]
  -> Target System

The identifier is not necessarily the business key. A customer ID or order ID can appear in many transactions. The correlation ID represents one processing journey, while business identifiers provide searchable context.

A useful telemetry envelope may include:

{
  "correlationId": "abc-123",
  "businessObject": "Account",
  "businessKey": "EXT-98231",
  "source": "salesforce",
  "destination": "master-data-service",
  "operation": "upsert",
  "status": "FAILED",
  "attempt": 2
}

Avoid putting secrets or unnecessarily sensitive payload data into telemetry.

Observe Business Stages, Not Every Processor

Logging every transformation step creates noise. Instead, define meaningful stages:

  1. transaction accepted;
  2. validation completed;
  3. durable handoff completed;
  4. downstream request started;
  5. downstream request completed;
  6. transaction completed or routed for recovery.

This creates a compact lifecycle that can be reconstructed later.

Metrics Need Multiple Dimensions

A single success-rate metric hides too much. Integration platforms should normally track at least:

  • throughput;
  • success and failure counts;
  • latency percentiles;
  • queue depth;
  • consumer lag;
  • retry volume;
  • retry exhaustion;
  • duplicate suppression;
  • downstream response codes;
  • recovery backlog age.

The most useful alerts describe a service-level symptom rather than an isolated log statement. For example, a growing queue combined with increasing consumer lag is usually more actionable than an alert for every individual timeout.

Distributed Tracing and Asynchronous Boundaries

Synchronous HTTP chains are comparatively easy to trace. Asynchronous boundaries are harder because execution continues later, possibly on another worker.

Carry correlation metadata in message headers or event metadata when the transport supports it. At the consumer, create a new processing span while retaining the parent transaction context. If full distributed tracing is unavailable, structured lifecycle events can still reconstruct the path.

Do not assume the broker message identifier, Salesforce Replay ID, business key and application correlation ID are interchangeable. They represent different concerns.

Design Failure Telemetry for Recovery

Failure records should answer both operational and recovery questions. Useful fields include:

correlationId
failedRecordId
sourceSystem
processingStage
errorType
errorMessage
firstFailureTime
lastAttemptTime
attemptCount
recoveryStatus

Whether to retain the original business payload is a design decision. Payload retention can simplify replay but may create security, privacy and storage concerns. An alternative is to persist the failed record identifier and re-fetch current data from the source system during recovery.

After successful recovery, another design choice appears: delete the failure entry or retain a terminal status for audit history. High-volume systems often need retention and archival rules so an operational recovery store does not become an uncontrolled historical database.

Separate Technical Health from Business Health

A service can be technically healthy while business processing is broken.

For example:

HTTP availability: 99.99%
Queue consumer: running
CPU: normal
Business records rejected by validation: 38%

Infrastructure dashboards alone would call this system healthy. Business-level telemetry reveals the real incident.

Track both.

Make Dashboards Answer Questions

A useful integration dashboard should make common investigations fast:

Is traffic flowing? Show throughput and recent completion rate.

Are we falling behind? Show queue depth, lag and oldest pending age.

Is a dependency degrading? Show downstream latency and errors by dependency.

Are retries helping or making things worse? Show retry attempts, eventual successes and exhausted retries.

Can operations recover failures? Show recoverable backlog, age and recovery outcomes.

Alert on Trends and Exhaustion

Not every failure deserves a page. Transient failures may recover automatically. Alerting should distinguish between expected resilience behavior and conditions requiring intervention.

Examples include:

retry rate increasing rapidly
consumer lag above threshold for 10 minutes
oldest recovery item > 30 minutes
error percentage > threshold at meaningful traffic volume
no completed transactions during expected traffic window

The exact thresholds depend on business criticality and normal traffic patterns.

Observability Is Part of the Contract

For important integrations, telemetry requirements should be considered during design—not after production incidents.

Ask during architecture review:

  • What identifier follows the transaction?
  • Which business identifiers are safe and useful to expose?
  • What does success mean?
  • What failures are automatically recoverable?
  • How will we know when consumers are behind?
  • How will support find one failed transaction?
  • What information is required to replay it safely?

These questions influence APIs, event schemas, error handling and persistence.

Final Principle

The objective is not to produce more logs. It is to reduce the time between something is wrong and we know exactly what happened and what to do next.

A mature integration platform makes transaction flow visible across application boundaries, measures both technical and business outcomes, and connects observability directly to recovery design.

CONTINUE READING

Explore closely related architecture, integration and implementation topics.