mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* 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
20 lines
504 B
Go
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)
|
|
}
|