pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

feat(v2): function totals recording rules

Open alsoba13 opened this issue 8 months ago • 0 comments

Adding a stacktrace filter field in the recording rules.

This way, we can define filter for function names and extend it in the future.

Examples of use:

# total cpu per service
- metric_name: 'pyroscope_metric_cpu_total_nanoseconds'
  matchers: ['{__profile_type__="..."}']
  group_by: ['service_name']
# garbage collection total cpu usage per service
- metric_name: 'pyroscope_metric_ingester_cpu_gc_total_nanoseconds'
  matchers: ['{__profile_type__="..."}']
  group_by: ['service_name']
  stacktrace_filter:
    type: 'function_name'
    function_name: 'runtime.gcBgMarkWorker'
    metric_type: total

With this, we should be able to extend it easily to: self function names, and self/total reg_exp function names

alsoba13 avatar Apr 16 '25 08:04 alsoba13