← Back to blog
Solution 4 min read 炬鲸团队

Observability in Financial Services: Tracing Slow Transactions Across Systems

Using a slow bank transfer as the example, this article shows how tracing finds a cross-system root cause in minutes, plus a sampling strategy, audit compliance, data masking, and a phased rollout plan for financial services.

A familiar problem in banking and brokerage: a transfer or order request crosses four or five systems — channel, core, clearing, risk control — the user sees it as slow, but every system says "we're fine." Without tracing, this is resolved by conference calls and grepping logs system by system, taking anywhere from half a day to several days.

Scenario: Locating a Slow Transaction

Take a transfer that takes 8 seconds to return. The traditional approach is to pull logs from each system and line up timestamps — slow and manual. With tracing, it works differently:

  1. Open the transaction from the alert; the trace already spans channel → core → risk → clearing
  2. The flame graph shows 7.2 seconds spent in the risk.score span on the risk-control system
  3. Expanding that span surfaces its logs with context: model=anti-fraud-v3 timeout
  4. Following the thread reveals that risk control calls an external anti-fraud model service that timed out with no fallback configured, stalling the whole chain

From detection to root cause: 10 minutes. The difference from the old way is that you never had to ask "which system is slow" — the trace already told you, because spans carry both the service name and a per-span duration with sub-millisecond precision. Root-causing becomes reading a flame graph instead of diffing timestamps across five teams' logs.

Why Sampling Strategy Matters in Finance

Transaction volume is enormous. Capturing every trace makes storage costs balloon, and most traces are fast, healthy requests with no diagnostic value. A recommended sampling mix:

  • Capture all spans carrying an error flag (errors are rare — keep them all)
  • Latency-based sampling: keep 100% of requests where latency > 500ms
  • A 1% probability sample of normal requests as a safety net
  • Force full capture of critical transactions (transfers, orders, credit approval) via a custom attribute

In JJHub Observe, sampling rules are configured per service:

sampling:
  - match: "attributes.error = true"
    rate: 1.0
  - match: "duration > 500ms"
    rate: 1.0
  - match: "attributes.txn_type in ('transfer','order','credit')"
    rate: 1.0
  - default: 0.01

In production this mix keeps trace storage below 5% of full capture while guaranteeing there's always data when something breaks.

Audit and Compliance

Financial regulators impose hard requirements on traceability. JJHub Observe stores audit logs separately and immutably — who queried which logs/traces, with which account, at what time — with retention configurable to meet regulatory terms (commonly one to three years). Sensitive-field masking is on by default: card numbers and national ID numbers are redacted in both display and export. For stricter control, run the platform in an isolated VPC with the data plane separated from the management plane.

A Phased Rollout

Don't onboard every system at once. A recommended path:

  1. Pilot on one or two mid-volume, problem-prone systems first (e.g., the payment gateway or clearing)
  2. Onboard non-invasively with the OTel agent and let it run for two weeks
  3. Write the onboarding standard and alert baselines, then roll out horizontally

Define SLOs early. Pick two or three latency SLOs per pilot service — for example p99 < 300ms for the gateway and error rate < 0.1% — and wire them into the alerting rules. Without SLOs, "the system is slow" is just a feeling, and tracing data is far more useful when you know the exact threshold you're defending.

In financial services, observability isn't a nice-to-have — it directly affects mean time to recovery (MTTR) and regulatory compliance. Systems that onboard early are simply calmer when things go wrong.

Storage is the other lever worth tuning early. Financial trace data is mostly useful in the first few days; beyond that it's audit material. Set hot retention to 7–14 days and move the rest to cold object storage, which drops the per-GB cost dramatically while keeping records searchable for compliance. Combined with the sampling rules above, a mid-sized bank can run tracing for a fraction of what full capture would cost.

Finally, treat trace data as part of the incident record. After an outage, export the relevant traces and logs alongside the postmortem so the root-cause analysis references primary evidence rather than someone's recollection. Auditors and regulators respond far better to a trace than to a narrative.