mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Fix bug: backend won't store empty strings.
This commit is contained in:
parent
85b33f1bfb
commit
be70bbfed2
1 changed files with 7 additions and 0 deletions
|
|
@ -148,6 +148,13 @@ func (d *DiagnosticsCollector) encode() ([]byte, error) {
|
|||
|
||||
// Set adds a key value metric.
|
||||
func (d *DiagnosticsCollector) Set(name string, value interface{}) {
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
if v == "" {
|
||||
// Do not set empty string
|
||||
return
|
||||
}
|
||||
}
|
||||
d.mu.Lock()
|
||||
defer d.mu.Unlock()
|
||||
d.metrics[name] = value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue