cilium / tetragon

eBPF-based Security Observability and Runtime Enforcement
https://tetragon.io
Apache License 2.0
3.53k stars 340 forks source link

metrics: add tags support #2464

Open tixxdz opened 3 months ago

tixxdz commented 3 months ago

Tracing policies now support optional 'tags' https://tetragon.io/docs/concepts/tracing-policy/tags/, https://tetragon.io/docs/reference/grpc-api/#processkprobe including tracepoint and uprobes.

Tags are used to categorize generated events. Right now we give some examples of tags in the docs, and we will soon start to add tags to our tracing policies something like:

tags are more stable hence we want to generate metrics as an example the context of 'cves' 'cve.x' or 'observability.privilege_escalation' , etc.

Note: the metrics should work even if we do redaction filters or field filters as they need to be calculate before.

lambdanis commented 3 months ago

IIRC tags can be arbitrary, but if we're putting them in metrics then ideally we should constrain the possible values. Is there a list of standard tag values?

tixxdz commented 3 months ago

IIRC tags can be arbitrary, but if we're putting them in metrics then ideally we should constrain the possible values. Is there a list of standard tag values?

We can define our list, next release I think we will start adding tags to our tracing policies. For arbitrary tags, yes that's the aim we should allow users to set their proper tags to build nicely on top of tetragon, so how about: