chapter twelve
12 Standardized logging and event formats
This chapter covers
- The components of a structured logger
- Building support for a telemetry emissions format in your code
- Parsing the telemetry emissions format in your shipping stage
This chapter focuses on emitting (and parsing) events from your production code. Chapter 2 was all about the Emitting stage in general, and if you haven’t read it this chapter will make less sense. Standardizing the format of telemetry for centralized logging and metrics emissions makes your telemetry system easier to maintain overall. There is a clear up-front cost to building standards — especially if you are retrofitting standards into an existing group of software — but the results should provide room to grow.
Figure 12.1 The Telemetry Pipeline Stages touched by logging and event standards. The Emitting and Shipping stages are deeply connected by standards, because that is where the standards are encoded (Emitting) and decoded (Shipping). Also, the concepts of telemetry markup — context-specific telemetry — and telemetry enrichment — extracting details out of existing telemetry — play a key role in event-standard building and implementation. The Presentation Stage merely consumes the results of all of this standards work.)