chore(gomod): update otel to 1.0.0 (#2414)

This commit is contained in:
Silvan
2021-09-23 12:50:17 +02:00
committed by GitHub
parent a17a6263b4
commit 30153cff39
7 changed files with 66 additions and 65 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"net/http"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
)
@@ -20,7 +21,7 @@ type Metrics interface {
GetExporter() http.Handler
GetMetricsProvider() metric.MeterProvider
RegisterCounter(name, description string) error
AddCount(ctx context.Context, name string, value int64, labels map[string]interface{}) error
AddCount(ctx context.Context, name string, value int64, labels map[string]attribute.Value) error
RegisterUpDownSumObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
RegisterValueObserver(name, description string, callbackFunc metric.Int64ObserverFunc) error
}
@@ -52,7 +53,7 @@ func RegisterCounter(name, description string) error {
return M.RegisterCounter(name, description)
}
func AddCount(ctx context.Context, name string, value int64, labels map[string]interface{}) error {
func AddCount(ctx context.Context, name string, value int64, labels map[string]attribute.Value) error {
if M == nil {
return nil
}