Semconv OTLP stable HTTP metrics
This commit is contained in:
parent
709ff6fb09
commit
6c9687f410
44 changed files with 803 additions and 432 deletions
|
@ -34,11 +34,11 @@ func (s *ThrottlingSuite) TestThrottleConfReload() {
|
|||
s.traefikCmd(withConfigFile("fixtures/throttling/simple.toml"))
|
||||
|
||||
// wait for Traefik
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("rest@internal"))
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.BodyContains("rest@internal"))
|
||||
require.NoError(s.T(), err)
|
||||
|
||||
// Expected a 404 as we did not configure anything.
|
||||
err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound))
|
||||
err = try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound))
|
||||
require.NoError(s.T(), err)
|
||||
|
||||
config := &dynamic.Configuration{
|
||||
|
|
|
@ -15,6 +15,17 @@
|
|||
[entryPoints.web]
|
||||
address = ":8000"
|
||||
|
||||
# Adding metrics to confirm that there is no wrong interaction with tracing.
|
||||
[metrics]
|
||||
{{if .IsHTTP}}
|
||||
[metrics.otlp.http]
|
||||
endpoint = "http://{{.IP}}:4318"
|
||||
{{else}}
|
||||
[metrics.otlp.grpc]
|
||||
endpoint = "{{.IP}}:4317"
|
||||
insecure = true
|
||||
{{end}}
|
||||
|
||||
[tracing]
|
||||
servicename = "tracing"
|
||||
sampleRate = 1.0
|
||||
|
|
|
@ -302,7 +302,7 @@ func (s *TracingSuite) TestOpentelemetryRetry() {
|
|||
s.traefikCmd(withConfigFile(file))
|
||||
|
||||
// wait for traefik
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth"))
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("basic-auth"))
|
||||
require.NoError(s.T(), err)
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8000/retry", 500*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway))
|
||||
|
@ -425,7 +425,7 @@ func (s *TracingSuite) TestNoInternals() {
|
|||
s.traefikCmd(withConfigFile(file))
|
||||
|
||||
// wait for traefik
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth"))
|
||||
err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("basic-auth"))
|
||||
require.NoError(s.T(), err)
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue