The four signals
Logs
Discrete events with a body, a severity and a timestamp. Answers what
happened, in the words your code chose.
Metrics
Numeric samples over time, with labels. Answers how much, how often, how
slow — cheaply, over long windows.
Traces
A causally-linked tree of spans across services. Answers where the time
went and which hop failed.
Synthetic results
Outcomes of checks run against your endpoints from outside. Answers is it
up, from somewhere that is not inside your network.
The two attributes that join them
Correlation is not automatic. It works because records carry matching values, and the values come from your instrumentation.1
service.name — the join across signals
The name your service reports itself as. It appears on logs, spans and
metrics, and it is what the service inventory, the service map, and every
“show me everything for this service” view are built on.
2
trace_id — the join across services
Propagated from caller to callee on every hop. It is what turns twelve
unrelated spans into one trace, and what lets a log line link to the
request that produced it.
Resource attributes versus record attributes
Two levels, and the distinction decides both what you can filter on and what you pay for.- Resource attributes describe the emitter and are attached to every
record it produces:
service.name,service.version,deployment.environment,host.name,k8s.pod.name. - Record attributes describe one event:
http.method,http.status_code,db.system,exception.type.
level,
service, body, trace_id, host, version and their aliases — are
promoted columns; anything else you write falls through to an attribute lookup.
That is why http.status_code:>=500 works without anything being declared in
advance.
An unrecognised field name is not an error, it is an attribute lookup that
matches nothing.
levle:error is a perfectly valid query for an attribute
called levle. Re-read a zero-result query for a typo before concluding the
data is missing. Attribute keys are case-sensitive.Cardinality is the cost you cannot see
A metric’s cost is driven by the number of distinct label combinations, not by the number of samples.Derived data you did not send
Some of what you see is computed rather than received. It is worth knowing which, because it explains why some things appear a minute late and why some survive longer than the data behind them.Next
Resource attributes
The attributes worth setting, and the ones that cost you.
Searching logs
The full query syntax and the complete field list.
Platform architecture
Which store answers which question.