mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* 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]>
24 lines
665 B
Go
24 lines
665 B
Go
package store
|
|
|
|
type Side string
|
|
|
|
const (
|
|
Client Side = "client"
|
|
Server Side = "server"
|
|
)
|
|
|
|
type Callback func(e *Edge)
|
|
|
|
// Store is an interface for building service graphs.
|
|
type Store interface {
|
|
// UpsertEdge inserts or updates an edge.
|
|
UpsertEdge(key string, side Side, update Callback) (isNew bool, err error)
|
|
// AddDroppedSpanSide adds a dropped span side key and returns true if an
|
|
// existing buffered counterpart edge was removed.
|
|
AddDroppedSpanSide(key string, side Side) bool
|
|
// HasDroppedSpanSide checks if a dropped span side key exists.
|
|
HasDroppedSpanSide(key string, side Side) bool
|
|
// Expire evicts expired edges from the store.
|
|
Expire()
|
|
}
|