Files
Joe Elliottandzeekay e94374166e [Tempo 3.0] Remove compactor and v2 block encoding code (#6273)
* o7 compactor

Signed-off-by: Joe Elliott <[email protected]>

* wip: o7 v2

Signed-off-by: Joe Elliott <[email protected]>

* test cleanup

Signed-off-by: Joe Elliott <[email protected]>

* remove compactor from jsonnet

Signed-off-by: Joe Elliott <[email protected]>

* changelog

Signed-off-by: Joe Elliott <[email protected]>

* gen manifest

Signed-off-by: Joe Elliott <[email protected]>

* config cleanup

Signed-off-by: Joe Elliott <[email protected]>

* docs

Signed-off-by: Joe Elliott <[email protected]>

* jsonnet

Signed-off-by: Joe Elliott <[email protected]>

* remove encoding

Signed-off-by: Joe Elliott <[email protected]>

* remove data encoding

Signed-off-by: Joe Elliott <[email protected]>

* lint and cleanup

Signed-off-by: Joe Elliott <[email protected]>

* unflake TestWorker\?

Signed-off-by: Joe Elliott <[email protected]>

---------

Signed-off-by: Joe Elliott <[email protected]>
2026-02-22 00:55:18 -08:00

33 lines
1.3 KiB
Go

package overrides
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
const discardReasonLabel = "reason"
// Exported reasons for discarded spans to be shared across packages.
const (
// ReasonRateLimited indicates that the tenant's spans/second exceeded their limits.
ReasonRateLimited = "rate_limited"
// ReasonTraceTooLarge indicates that a single trace has too many spans.
ReasonTraceTooLarge = "trace_too_large"
// ReasonLiveTracesExceeded indicates Tempo is already tracking too many live traces for this tenant.
ReasonLiveTracesExceeded = "live_traces_exceeded"
// ReasonUnknown indicates an unknown error when pushing spans.
ReasonUnknown = "unknown_error"
// ReasonTraceTooLargeToCompact indicates a trace is too large for the backend-worker to combine/compact.
ReasonCompactorDiscardedSpans = "trace_too_large_to_compact"
)
var metricDiscardedSpans = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "tempo",
Name: "discarded_spans_total",
Help: "The total number of samples that were discarded.",
}, []string{discardReasonLabel, "tenant"})
func RecordDiscardedSpans(spansDiscarded int, reason string, tenant string) {
metricDiscardedSpans.WithLabelValues(reason, tenant).Add(float64(spansDiscarded))
}