mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 15:21:02 +00:00
Remove extraneous stat tags to improve prometheus performance
This commit is contained in:
parent
bc98d5418e
commit
9fb6d84d80
4 changed files with 4 additions and 4 deletions
2
api.go
2
api.go
|
|
@ -418,7 +418,7 @@ func (api *API) DeleteAvailableShard(_ context.Context, indexName, fieldName str
|
|||
api.server.logger.Printf("problem sending DeleteAvailableShard message: %s", err)
|
||||
return errors.Wrap(err, "sending DeleteAvailableShard message")
|
||||
}
|
||||
api.holder.Stats.CountWithCustomTags("deleteAvailableShard", 1, 1.0, []string{fmt.Sprintf("index:%s", indexName), fmt.Sprintf("field:%s", fieldName)})
|
||||
api.holder.Stats.CountWithCustomTags("deleteAvailableShard", 1, 1.0, []string{fmt.Sprintf("index:%s", indexName)})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
2
field.go
2
field.go
|
|
@ -820,7 +820,7 @@ func (f *Field) newView(path, name string) *view {
|
|||
view := newView(path, f.index, f.name, name, f.options)
|
||||
view.logger = f.logger
|
||||
view.rowAttrStore = f.rowAttrStore
|
||||
view.stats = f.Stats.WithTags(fmt.Sprintf("view:%s", name))
|
||||
view.stats = f.Stats
|
||||
view.broadcaster = f.broadcaster
|
||||
return view
|
||||
}
|
||||
|
|
|
|||
2
index.go
2
index.go
|
|
@ -405,7 +405,7 @@ func (i *Index) newField(path, name string) (*Field, error) {
|
|||
return nil, err
|
||||
}
|
||||
f.logger = i.logger
|
||||
f.Stats = i.Stats.WithTags(fmt.Sprintf("field:%s", name))
|
||||
f.Stats = i.Stats
|
||||
f.broadcaster = i.broadcaster
|
||||
f.rowAttrStore = i.newAttrStore(filepath.Join(f.path, ".data"))
|
||||
return f, nil
|
||||
|
|
|
|||
2
view.go
2
view.go
|
|
@ -267,7 +267,7 @@ func (v *view) newFragment(path string, shard uint64) *fragment {
|
|||
frag.CacheType = v.cacheType
|
||||
frag.CacheSize = v.cacheSize
|
||||
frag.Logger = v.logger
|
||||
frag.stats = v.stats.WithTags(fmt.Sprintf("shard:%d", shard))
|
||||
frag.stats = v.stats
|
||||
if v.fieldType == FieldTypeMutex {
|
||||
frag.mutexVector = newRowsVector(frag)
|
||||
} else if v.fieldType == FieldTypeBool {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue