github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/metrics-export/pyroscope/server.yml (about)

     1  ---
     2  log-level: debug
     3  
     4  metrics-export-rules:
     5    # The metrics is a sum of all observed CPU samples of 'slowFunction'
     6    # of production app instance.
     7    app_slow_function_prod_cpu_seconds_total:
     8      expr: simple.golang.app.cpu{env="prod"}
     9      node: slowFunction
    10  
    11    # The metrics is a sum of all observed CPU samples of 'slowFunction'
    12    # with break down by 'env' tag.
    13    app_slow_function_env_cpu_seconds_total:
    14      expr: simple.golang.app.cpu
    15      node: slowFunction
    16      group_by: [env]
    17  
    18    # The metrics below are listed for demonstration purpose.
    19    # It's better to collect them via runtime instrumentation,
    20    # for example, using Prometheus.
    21  
    22    app_cpu_seconds_total:
    23      expr: simple.golang.app.cpu
    24  
    25    app_alloc_space_bytes:
    26      expr: simple.golang.app.alloc_space
    27  
    28    app_alloc_objects_total:
    29      expr: simple.golang.app.alloc_objects
    30  
    31    app_inuse_space_bytes:
    32      expr: simple.golang.app.inuse_space
    33  
    34    app_inuse_objects_total:
    35      expr: simple.golang.app.inuse_objects