Files
traces/modules/generator/processor/interface.go
Koenraad VerheydenandGitHub 520c0add87 metrics-generator: add custom registry (#1340)
* metrics-generator: add custom registry

* Redesign how series are stored, optimize writes over scrapes

* lint & minor fixes

* span-metrics: preallocate slice with label values

* histogram: don't bother adding 0 to buckets

* Introduce LabelValues to cache hashes; create dedicated counter and histogram types

* Rename scrape -> metrics collection

* fix e2e config

* Tweak shutdown order of instance components

* Add clarifying comment about max_active_series being a local limit

* Replace __name__ with labels.MetricName

* Extract duplicated logic when updating a series

* Set onAddSeries and onRemoveSeries in the newX function

* Remove commented code
2022-03-25 17:12:00 +01:00

20 lines
504 B
Go

package processor
import (
"context"
"github.com/grafana/tempo/pkg/tempopb"
)
type Processor interface {
// Name returns the name of the processor.
Name() string
// PushSpans processes a batch of spans and updates the metrics registered in RegisterMetrics.
PushSpans(ctx context.Context, req *tempopb.PushSpansRequest)
// Shutdown releases any resources allocated by the processor. Once the processor is shut down,
// PushSpans should not be called anymore.
Shutdown(ctx context.Context)
}