Files
72cfe1b4c3 feat: allow span filtering in service graph processor (#6453)
* added spanfilter to filter out spans

* return the error if the filters are not correctly formatted

* add filters to the userconfigurable overrides

* add core logic for drop items cache

* wired up everything

* some tweaks

* refactor

* fmt and manifest

* tighten names

* rename metric

* drop already buffered counterparts when a span is filter out

* add a new test and documentation

* Update docs/sources/tempo/operations/manage-advanced-systems/user-configurable-overrides.md

Co-authored-by: Suraj Nath <[email protected]>

* Update docs/sources/tempo/configuration/_index.md

Co-authored-by: Suraj Nath <[email protected]>

* Update docs/sources/tempo/configuration/_index.md

Co-authored-by: Suraj Nath <[email protected]>

* bail early when the span kind is not client or server

* Update docs/sources/tempo/operations/manage-advanced-systems/user-configurable-overrides.md

Co-authored-by: Suraj Nath <[email protected]>

---------

Co-authored-by: Suraj Nath <[email protected]>
2026-02-22 00:55:24 -08:00

54 lines
2.9 KiB
Go

package generator
import (
"time"
"github.com/grafana/tempo/modules/generator/registry"
"github.com/grafana/tempo/modules/generator/storage"
"github.com/grafana/tempo/modules/overrides"
"github.com/grafana/tempo/modules/overrides/histograms"
"github.com/grafana/tempo/pkg/sharedconfig"
filterconfig "github.com/grafana/tempo/pkg/spanfilter/config"
"github.com/grafana/tempo/tempodb/backend"
)
type metricsGeneratorOverrides interface {
registry.Overrides
storage.Overrides
MetricsGeneratorGenerateNativeHistograms(userID string) histograms.HistogramMethod
MetricsGeneratorIngestionSlack(userID string) time.Duration
MetricsGeneratorProcessors(userID string) map[string]struct{}
MetricsGeneratorProcessorServiceGraphsHistogramBuckets(userID string) []float64
MetricsGeneratorProcessorServiceGraphsDimensions(userID string) []string
MetricsGeneratorProcessorServiceGraphsPeerAttributes(userID string) []string
MetricsGeneratorProcessorServiceGraphsFilterPolicies(userID string) []filterconfig.FilterPolicy
MetricsGeneratorProcessorSpanMetricsHistogramBuckets(userID string) []float64
MetricsGeneratorProcessorSpanMetricsDimensions(userID string) []string
MetricsGeneratorProcessorSpanMetricsIntrinsicDimensions(userID string) map[string]bool
MetricsGeneratorProcessorSpanMetricsFilterPolicies(userID string) []filterconfig.FilterPolicy
MetricsGeneratorProcessorLocalBlocksMaxLiveTraces(userID string) uint64
MetricsGeneratorProcessorLocalBlocksMaxBlockDuration(userID string) time.Duration
MetricsGeneratorProcessorLocalBlocksMaxBlockBytes(userID string) uint64
MetricsGeneratorProcessorLocalBlocksTraceIdlePeriod(userID string) time.Duration
MetricsGeneratorProcessorLocalBlocksFlushCheckPeriod(userID string) time.Duration
MetricsGeneratorProcessorLocalBlocksCompleteBlockTimeout(userID string) time.Duration
MetricsGeneratorProcessorSpanMetricsDimensionMappings(userID string) []sharedconfig.DimensionMappings
MetricsGeneratorProcessorSpanMetricsEnableTargetInfo(userID string) (bool, bool)
MetricsGeneratorProcessorServiceGraphsEnableClientServerPrefix(userID string) bool
MetricsGeneratorProcessorServiceGraphsEnableMessagingSystemLatencyHistogram(userID string) (bool, bool)
MetricsGeneratorProcessorServiceGraphsEnableVirtualNodeLabel(userID string) (bool, bool)
MetricsGeneratorProcessorSpanMetricsTargetInfoExcludedDimensions(userID string) []string
MetricsGeneratorProcessorSpanMetricsEnableInstanceLabel(userID string) (bool, bool)
MetricsGeneratorProcessorHostInfoHostIdentifiers(userID string) []string
MetricsGeneratorProcessorHostInfoMetricName(userID string) string
MetricsGeneratorProcessorServiceGraphsSpanMultiplierKey(userID string) string
MetricsGeneratorProcessorSpanMetricsSpanMultiplierKey(userID string) string
DedicatedColumns(userID string) backend.DedicatedColumns
MaxLocalTracesPerUser(userID string) int
MaxBytesPerTrace(userID string) int
UnsafeQueryHints(userID string) bool
}
var _ metricsGeneratorOverrides = (overrides.Interface)(nil)