Pyroscope: Annotation support for series queries (#104130)
* Pyroscope: Add annotations frame to series response * Adapt to API change, add tests * Run make lint-go * Fix conflicts after rebase * Add annotation via a separate data frame * Process annotations fully at the datasource * Add mod owner for go-humanize * Pyroscope: Annotations in Query Response can be optional --------- Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
This commit is contained in:
co-authored by
Piotr Jamróz
parent
ea0e49a6e6
commit
0b8252fd7c
@@ -46,7 +46,8 @@ type LabelPair struct {
|
||||
type Point struct {
|
||||
Value float64
|
||||
// Milliseconds unix timestamp
|
||||
Timestamp int64
|
||||
Timestamp int64
|
||||
Annotations []*typesv1.ProfileAnnotation
|
||||
}
|
||||
|
||||
type ProfileResponse struct {
|
||||
@@ -133,8 +134,9 @@ func (c *PyroscopeClient) GetSeries(ctx context.Context, profileTypeID string, l
|
||||
points := make([]*Point, len(s.Points))
|
||||
for i, p := range s.Points {
|
||||
points[i] = &Point{
|
||||
Value: p.Value,
|
||||
Timestamp: p.Timestamp,
|
||||
Value: p.Value,
|
||||
Timestamp: p.Timestamp,
|
||||
Annotations: p.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user