Skip to content
sumanth.aiAN ENGINEER’S WORKSHOP
← All articles

Observability / 2 MIN READ

Before another dashboard, fix the log fields

A practical parsing contract for AEM and Dispatcher logs, including multiline errors and environment identity.

If every engineer has to remember a different search string to find the same service, the problem is probably upstream of the dashboard. It is in the fields.

I would write a small logging contract before building more visualizations. It should describe how a responder identifies the environment, service, tier, severity, timestamp, and request context without knowing the original log format.

Preserve the source, normalize the meaning

For an illustrative AEM error event, useful normalized fields might include env=production, service=content-publish, aem_tier=publish, and a stable error family. Keep the original message available for investigation. Do not overwrite important source data merely to make a chart convenient.

Datadog processing pipelines parse and enrich logs through processors. JSON-formatted events are automatically parsed, while other formats can need explicit parsing. Test your own logger’s output, including what happens when a stack trace spans multiple lines.

A timestamp mistake changes the incident story

A log’s event time and its arrival time are not interchangeable. If an event is delayed in transport, plotting it by ingestion time can make the failure appear to start after the deployment that actually triggered it.

Test timestamp parsing with timezone offsets, daylight-saving transitions where relevant, and a delayed sample. Pick one canonical event-time field for investigation, while retaining arrival time for pipeline health checks.

Treat parser changes like code changes

Keep a fixture set: normal access, an application exception, an Apache error, a Dispatcher message, an unknown format, and a sanitized multiline trace. For each fixture, record the expected fields and what must remain in the original message.

A parser should fail visibly when the format changes. Watch the share of events that lack environment, service, or severity. A pipeline can still be ingesting while silently losing the dimensions every dashboard depends on.

Avoid turning unbounded values into default grouping fields. A full request URL can contain identifiers or sensitive parameters. A normalized route family is usually a more useful starting point for aggregation; retain detailed values only where their privacy and access requirements have been considered.

The payoff is ordinary but important: engineers can use the same filters across panels, and a change in logging format becomes a detectable event rather than a week of misleading charts.

REFERENCES & FURTHER READING

Official documentation and primary sources behind the technical details. Examples in this article are illustrative.

KEEP READING

Observability / 2 min

The first AEM dashboard should answer five questions

Read article ↗
Observability / 2 min

Follow a request, not a timestamp coincidence

Read article ↗
Browse the whole notebook →