Project, Don't Pour: Curating What Your Business Events Send to Telemetry

In my last article, I argued that your telemetry is too thin and that you need to add context: country, feature flag, commit, and so on. In an event-driven system, that argument takes a slightly different turn. You don't need to invent that context. You already publish it.

Take an OrderPlaced event. It carries accountId, tenant, orderType, value, and channel. It's a high-cardinality record, far richer than anything I'd be inclined to hand-roll onto a span, and it was modeled for the business, not for observability. So the temptation is obvious: the data is already there, so why not shove the entire event into the trace?

Key takeaway #1

Your events already carry the context: Business events like OrderPlaced are far richer than anything you'd hand-roll onto a span. That makes it tempting to pour the entire event into your traces.

Key takeaway #2

Pouring has hidden costs: Serializing whole events into telemetry gives PII a second home at your observability vendor, creates a coupling nobody tests, and lets unbounded fields blow up your storage costs.

Key takeaway #3

Build a projection boundary: Map events to spans explicitly, with an allowlist, telemetry names of their own, and mapping codethat is versioned and tested. What goes into telemetry should be a decision,not a side effect.

Project, Don't Pour: Curating What Your Business Events Send to Telemetry

In my last article, I argued that your telemetry is too thin and that you need to add context: country, feature flag, commit, and so on. In an event-driven system, that argument takes a slightly different turn. You don't need to invent that context. You already publish it.

Take an OrderPlaced event. It carries accountId, tenant, orderType, value, and channel. It's a high-cardinality record, far richer than anything I'd be inclined to hand-roll onto a span, and it was modeled for the business, not for observability. So the temptation is obvious: the data is already there, so why not shove the entire event into the trace?

Key takeaway #1

Your events already carry the context: Business events like OrderPlaced are far richer than anything you'd hand-roll onto a span. That makes it tempting to pour the entire event into your traces.

Key takeaway #2

Pouring has hidden costs: Serializing whole events into telemetry gives PII a second home at your observability vendor, creates a coupling nobody tests, and lets unbounded fields blow up your storage costs.

Key takeaway #3

Build a projection boundary: Map events to spans explicitly, with an allowlist, telemetry names of their own, and mapping codethat is versioned and tested. What goes into telemetry should be a decision,not a side effect.

Project, Don't Pour: Curating What Your Business Events Send to Telemetry

In my last article, I argued that your telemetry is too thin and that you need to add context: country, feature flag, commit, and so on. In an event-driven system, that argument takes a slightly different turn. You don't need to invent that context. You already publish it.

Take an OrderPlaced event. It carries accountId, tenant, orderType, value, and channel. It's a high-cardinality record, far richer than anything I'd be inclined to hand-roll onto a span, and it was modeled for the business, not for observability. So the temptation is obvious: the data is already there, so why not shove the entire event into the trace?

Key takeaway #1

Your events already carry the context: Business events like OrderPlaced are far richer than anything you'd hand-roll onto a span. That makes it tempting to pour the entire event into your traces.

Key takeaway #2

Pouring has hidden costs: Serializing whole events into telemetry gives PII a second home at your observability vendor, creates a coupling nobody tests, and lets unbounded fields blow up your storage costs.

Key takeaway #3

Build a projection boundary: Map events to spans explicitly, with an allowlist, telemetry names of their own, and mapping codethat is versioned and tested. What goes into telemetry should be a decision,not a side effect.

Why pouring is the trap

Pouring is easy, and that's exactly theproblem. Serializing the event onto the span takes a few lines of code, and youinstantly get rich context. But where do you draw the line? Every field in yourdomain model becomes telemetry by default, including the ones you would neverhave picked on purpose.

I call this projection without curation.

What pouring costs you

PII gets a second home. Automatic projection quietly extends your GDPR data map to your observability vendor, which typically means different hosting, different retention, and no link to your right to erasure.The more useful an identifier is for debugging, the more it behaves like personal data.

Coupling nobody tests. Telemetry is just another consumer of your events, but an unowned one. A dashboard built on order.value isn't covered by your contract tests and isn't versioned with theevent. A migration can pass every one of your consumer tests and still break anSLO alert at 3 a.m.

Cardinality nobody picked. Unbounded fields, like a line itemID or a free-text note, will blow up your storage costs if there's no editorial step to constrain them.

The fix: a projection boundary

Instead of serializing the event, create anexplicit mapping from event to span: a small piece of code that defines whatcrosses the boundary, what it's called, and what shape it takes.

public static classOrderTelemetry

{

   public static voidProjectToSpan(OrderPlaced e, Activity? activity)

   {

       if (activity isnull) return;

 

       // Allowlist: onlythese fields cross the boundary

      activity.SetTag("order.type", e.OrderType);

      activity.SetTag("order.channel", e.Channel);

      activity.SetTag("tenant.id", e.Tenant);

 

       // Bucketed:bounded cardinality instead of a raw amount

      activity.SetTag("order.value_band", ValueBand(e.Value));

   }

}

Three things make this more than a namingexercise:

  • An allow list, not a serializer. A new field on the event won't show up in your telemetry until someone deliberately chooses to include it.
  • Telemetry names of their own. order.type is not orderType, sorenaming a domain field doesn't ripple through to your dashboards.
  • The mapping is code. It's versioned withthe producer and covered by a contract test, so the 3 a.m. break becomes afailing build instead.

Same discipline, two angles

Good event design and good observability arereally the same discipline, viewed from two angles. Business events are richbecause you've modeled the domain truthfully. That richness is precisely whatmakes them useful in a trace.

But rich is not the same as relevant. Whatgoes into telemetry should be a deliberate decision, not a side effect.

Project, don't pour. Want to get more out of your telemetry without leaking personal data or blowing upstorage costs? Don't hesitate to reach out.

Let'scurate your observability strategy.

We value your privacy! We use cookies to enhance your browsing experience and analyse our traffic.
By clicking "Accept All", you consent to our use of cookies.
Dark blue outline of a cookie icon.