Interview Prep/Monitoring & Observability/Logging: ELK/EFK, Loki & Log Shippers

What is an index template and mapping, and what is a mapping explosion?

AdvancedConceptLogging: ELK/EFK, Loki & Log Shippers
Answer

An index template defines settings (shards, ILM policy) and mappings (field types) for indexes matching a pattern. With dynamic mapping, every new JSON key becomes a new field. If apps log arbitrary keys (user IDs as keys, nested maps), the field count explodes, hitting Limit of total fields [1000] has been exceeded and bloating cluster state.

Fixes: explicit mappings with "dynamic": "strict" or false, flattened field type for arbitrary maps, and agreeing on a schema such as Elastic Common Schema (ECS) or OpenTelemetry semantic conventions.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: ELK/EFK, Loki & Log Shippers