1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-03 22:52:30 +02:00

Decrease indentation

This commit is contained in:
sync-common-bot 2024-01-11 22:47:10 +13:00
parent 875fca6bd0
commit 9e7e7729bf
No known key found for this signature in database
GPG Key ID: D24FB704035BCF0A

View File

@ -439,15 +439,13 @@ func (r observer) ObserveFloat64(o metric.Float64Observable, v float64, opts ...
return
}
if _, registered := r.float64[oImpl.observablID]; !registered {
if !oImpl.dropAggregation {
global.Error(errUnregObserver, "failed to record",
"name", oImpl.name,
"description", oImpl.description,
"unit", oImpl.unit,
"number", fmt.Sprintf("%T", float64(0)),
)
}
if _, registered := r.float64[oImpl.observablID]; !registered && !oImpl.dropAggregation {
global.Error(errUnregObserver, "failed to record",
"name", oImpl.name,
"description", oImpl.description,
"unit", oImpl.unit,
"number", fmt.Sprintf("%T", float64(0)),
)
return
}
c := metric.NewObserveConfig(opts)
@ -474,15 +472,13 @@ func (r observer) ObserveInt64(o metric.Int64Observable, v int64, opts ...metric
return
}
if _, registered := r.int64[oImpl.observablID]; !registered {
if !oImpl.dropAggregation {
global.Error(errUnregObserver, "failed to record",
"name", oImpl.name,
"description", oImpl.description,
"unit", oImpl.unit,
"number", fmt.Sprintf("%T", int64(0)),
)
}
if _, registered := r.int64[oImpl.observablID]; !registered && !oImpl.dropAggregation {
global.Error(errUnregObserver, "failed to record",
"name", oImpl.name,
"description", oImpl.description,
"unit", oImpl.unit,
"number", fmt.Sprintf("%T", int64(0)),
)
return
}
c := metric.NewObserveConfig(opts)