New metrics generator processor to store a local copy of traces - #2368
Conversation
…ance instead of inside the processor
|
Will we need to update the metrics-generator docs for this? |
… goroutines to exit
zalegrala
left a comment
There was a problem hiding this comment.
Approved with a couple comments. Nice work.
| walBlocks: map[uuid.UUID]common.WALBlock{}, | ||
| completeBlocks: map[uuid.UUID]common.BackendBlock{}, | ||
| liveTraces: newLiveTraces(), | ||
| closeCh: make(chan struct{}), |
There was a problem hiding this comment.
Just thinking outloud, not blocking; do we prefer a close chan over a context cancellation?
There was a problem hiding this comment.
I like the chose channel for simplicity, but you make a good point that they have different behaviors. Right now the processor would finish any in-progress flush or block conversion before shutting down, whereas context cancellation would immediately break out because it would be passed along to the i/o operations.
@knylander-grafana Yes we will need new docs for this processor and the API coming in later PRs. |
…ana#2368) * First draft to flush traces to wal * Add local block completion and retention * Move traces wal to central configuration, create sharded wal per instance instead of inside the processor * lint * filter only kind=server, fully flush to disk on shutdown and wait for goroutines to exit * rename field
What this PR does:
This PR is part of a wider initiative to perform on-demand metrics calculations. It adds a new processor
local-blocksthat stores a copy of all received traces on disk. It works almost identically to an ingester with a live traces map, wal, local blocks, retention period, and with similar configuration. Currently this serves no purpose but more functionality will be added in later PRs.The metrics generator config looks like:
Notes:
Additional changes:
Which issue(s) this PR fixes:
Fixes n/a
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]