materialized view and a bit better ui
This commit is contained in:
1 parent
26b677154b
commit
49f9bb3458
30 files changed
+2184
-106
No files matched your search
@@ -51,6 +51,13 @@ type Collector struct {
|
||||
sourceMaps *sourcemaps.Resolver
|
||||
kubeWatcher *kube.Watcher
|
||||
prometheus *prometheus.Client
|
||||
|
||||
// Optional capabilities of the configured store (ClickHouse implements
|
||||
// all of them); nil when unsupported, and the API falls back to the
|
||||
// bounded in-memory data.
|
||||
traceQuerier storage.TraceQuerier
|
||||
occStore storage.OccurrenceStore
|
||||
occChan chan storage.Occurrence
|
||||
}
|
||||
|
||||
// New creates a new Collector instance.
|
||||
@@ -72,6 +79,7 @@ func New(broadcaster websocket.Broadcaster, historySize int, store storage.Store
|
||||
}
|
||||
|
||||
if store != nil {
|
||||
c.initOptionalStores(store)
|
||||
// Bounded worker pool prevents concurrent ClickHouse INSERTs from
|
||||
// multiplying query and merge memory under bursty ingest traffic.
|
||||
numWorkers := 4
|
||||
@@ -162,6 +170,12 @@ func (c *Collector) GetIssue(id string) (issues.Issue, bool) {
|
||||
|
||||
func (c *Collector) SetSourceMaps(resolver *sourcemaps.Resolver) { c.sourceMaps = resolver }
|
||||
|
||||
func resolveSamples(samples []issues.Sample, resolver *sourcemaps.Resolver) {
|
||||
for i := range samples {
|
||||
samples[i].ResolvedStacktrace = resolver.ResolveStack(samples[i].Release, samples[i].Stacktrace)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveIssue(issue *issues.Issue, resolver *sourcemaps.Resolver) {
|
||||
for i := range issue.Samples {
|
||||
issue.Samples[i].ResolvedStacktrace = resolver.ResolveStack(issue.Samples[i].Release, issue.Samples[i].Stacktrace)
|
||||
|
||||
Reference in new issue
Block a user