mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:52:25 -05:00
[chore] update otel libraries (#3740)
* chore: update otel dependencies * refactor: combine tracing & metrics in observability package * chore: update example tracing compose file
This commit is contained in:
parent
baed591a1d
commit
dd094e4012
217 changed files with 6873 additions and 2734 deletions
40
vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go
generated
vendored
Normal file
40
vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
)
|
||||
|
||||
// Reservoir holds the sampled exemplar of measurements made.
|
||||
type Reservoir interface {
|
||||
// Offer accepts the parameters associated with a measurement. The
|
||||
// parameters will be stored as an exemplar if the Reservoir decides to
|
||||
// sample the measurement.
|
||||
//
|
||||
// The passed ctx needs to contain any baggage or span that were active
|
||||
// when the measurement was made. This information may be used by the
|
||||
// Reservoir in making a sampling decision.
|
||||
//
|
||||
// The time t is the time when the measurement was made. The val and attr
|
||||
// parameters are the value and dropped (filtered) attributes of the
|
||||
// measurement respectively.
|
||||
Offer(ctx context.Context, t time.Time, val Value, attr []attribute.KeyValue)
|
||||
|
||||
// Collect returns all the held exemplars.
|
||||
//
|
||||
// The Reservoir state is preserved after this call.
|
||||
Collect(dest *[]Exemplar)
|
||||
}
|
||||
|
||||
// ReservoirProvider creates new [Reservoir]s.
|
||||
//
|
||||
// The attributes provided are attributes which are kept by the aggregation, and
|
||||
// are exclusive with attributes passed to Offer. The combination of these
|
||||
// attributes and the attributes passed to Offer is the complete set of
|
||||
// attributes a measurement was made with.
|
||||
type ReservoirProvider func(attr attribute.Set) Reservoir
|
||||
Loading…
Add table
Add a link
Reference in a new issue