pyroscope
pyroscope copied to clipboard
Separate endpoint for listing applications
Currently /label-values
endpoint is used to list the applications. This is inconvenient by number of reasons, first of all due to the fact that the cloud storage accesses the data differently, and use of storage.LabelValuesGetter
interface is confusing.
We already have a storage method implementing the logic: https://github.com/pyroscope-io/pyroscope/blob/f8dd42c047276bf1d2046c1576b2e94dfd38c47f/pkg/storage/storage_labels.go#L87
This also relates to https://github.com/pyroscope-io/pyroscope/pull/1239, which adds /apps
endpoint.
Implementation note: it makes sense to return an array of objects, as we may want to add some extra app details in future:
[
{
"name": "application-a.cpu",
},
{
"name": "application-a.mem",
}
]
So, later we can add more fields, for example:
[
{
"name": "application-a",
"profileTypes": [
"cpu",
"mem"
],
"language": "clang"
"tags": [ "owner:me" ]
}
]
/cc @korniltsev