Align OpenTelemetry tracing and metrics configurations

Co-authored-by: Michael <michael.matur@gmail.com>
This commit is contained in:
Romain 2024-02-06 10:04:05 +01:00 committed by GitHub
parent d7ec0cedbf
commit bb6cd581a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 587 additions and 341 deletions

View file

@ -8,7 +8,6 @@ import (
"io"
"net/http"
"net/http/httptest"
"net/url"
"regexp"
"strconv"
"testing"
@ -316,14 +315,12 @@ func TestOpenTelemetry(t *testing.T) {
ts.Close()
})
sURL, err := url.Parse(ts.URL)
require.NoError(t, err)
var cfg types.OpenTelemetry
var cfg types.OTLP
(&cfg).SetDefaults()
cfg.AddRoutersLabels = true
cfg.Address = sURL.Host
cfg.Insecure = true
cfg.HTTP = &types.OtelHTTP{
Endpoint: ts.URL,
}
cfg.PushInterval = ptypes.Duration(10 * time.Millisecond)
registry := RegisterOpenTelemetry(context.Background(), &cfg)