grafana / grafana/pyroscope

Reduce confusion with profile types in Pyroscope

Open
#3,319 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
11.7k
Forks
802
Avg merge
1d 19h
Merged PRs (30d)
80

Description

Pyroscope uses profile types as a quite prominent feature in API and UI. The same time we are hiding the full profile type many times. The full profile type contains:

```
::::
```

* `` is a user supplied name and is set by the external label with name `__name__`. It is set on a per profile (pprof) basis.
Examples:
* `memory`
* `godeltaprof_memory`
* `block`
* `mutex`
* `` is the type and unit of the actual samples at play.
Examples:
* `contentions:count`
* `delay:nanoseconds`
* `cpu:nanoseconds`
* `alloc_space:nanoseconds`
* `` is the type and unit for the whole profile (aka pprof). AFAIK we don't expose this anywhere and it should be ignored all together.
Examples:
* `contentions:count`
* `cpu:nanoseconds`
* `space:bytes`

Here is a list of full profile types in GL largest cells:

```
block contentions count contentions count
block delay nanoseconds contentions count
godeltaprof_block contentions count contentions count
godeltaprof_block delay nanoseconds contentions count
godeltaprof_memory alloc_objects count space bytes
godeltaprof_memory alloc_space bytes space bytes
godeltaprof_memory inuse_objects count space bytes
godeltaprof_memory inuse_space bytes space bytes
godeltaprof_mutex contentions count contentions count
godeltaprof_mutex delay nanoseconds contentions count
goroutine goroutine count goroutine count
goroutines goroutine count goroutine count
memory alloc_in_new_tlab_bytes bytes space bytes
memory alloc_in_new_tlab_objects count space bytes
memory alloc_objects count space bytes
memory alloc_space bytes space bytes
memory inuse_objects count space bytes
memory inuse_space bytes space bytes
mutex contentions count contentions count
mutex contentions count mutex count
mutex delay nanoseconds contentions count
mutex delay nanoseconds mutex count
process_cpu alloc_samples count cpu nanoseconds
process_cpu alloc_size bytes cpu nanoseconds
process_cpu cpu nanoseconds cpu nanoseconds
process_cpu exception count cpu nanoseconds
process_cpu lock_count count cpu nanoseconds
process_cpu lock_time nanoseconds cpu nanoseconds
process_cpu samples count milliseconds
process_cpu samples count cpu nanoseconds
```

In order to simplify this I propose that we implement:

```[tasklist]
### Tasks
- [ ] Support 4 part `__profile_type__` as `block:contentions:count`, which ignores period unit/type.
- [ ] Rewrite `__name__` during ingestion to ensure consistency
- [ ] Deprecate ProfileType call and arguments in favour of LabelValues / Series and LabelSelectors
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.