traefik icon indicating copy to clipboard operation
traefik copied to clipboard

Extend otel server metrics

Open casey-quinn opened this issue 1 month ago • 10 comments

Summary

  • align OTEL http.server metric semantics with upstream fix for traefik/traefik#12247
  • ensure router context propagates http.route even without tracing
  • harden server address/port helpers and cover edge cases

Testing

  • PATH=/usr/local/go/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin GOMAXPROCS=2 go test ./pkg/middlewares/observability -count 1
  • PATH=/usr/local/go/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin GOMAXPROCS=2 go test ./pkg/provider/docker -run TestDynConfBuilder_getIPAddress_docker -count 1
  • PATH=/usr/local/go/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CI=true go test ./integration -run TestConsulCatalogSuite/TestSimpleConfigurationWithWatch -count 5 -timeout=20m
  • PATH=/usr/local/go/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CI=true go test ./integration -run TestHeadersSuite/TestCorsResponses -count 1

Resolves: #1 Refs: traefik/traefik#12247

casey-quinn avatar Nov 25 '25 03:11 casey-quinn

Test & Lint Summary

  • PATH=/usr/local/go/bin:$PATH GOMAXPROCS=2 go test ./pkg/middlewares/observability -count 1 (pass)
  • PATH=/usr/local/go/bin:$PATH GOMAXPROCS=2 go test ./pkg/provider/docker -run TestDynConfBuilder_getIPAddress_docker -count 1 (pass)
  • PATH=/usr/local/go/bin:$PATH CI=true go test ./integration -run TestConsulCatalogSuite/TestSimpleConfigurationWithWatch -count 5 -timeout=20m (pass)
  • PATH=/usr/local/go/bin:$PATH CI=true go test ./integration -run TestHeadersSuite/TestCorsResponses -count 1 (pass)

Notes:

  • Full go test ./integration (CI=true) aborted due to Docker network pool exhaustion and missing integration/fixtures/k8s/config.skip/kubeconfig.yaml on the remote engine; reproducible logs in workspace run 2025-11-25T03:20Z.
  • golangci-lint run (v1 and v2) terminated (signal 9) under container resource limits even when scoped to ./pkg/middlewares/observability; see attempts ending at PID 97101 for context.

casey-quinn avatar Nov 25 '25 03:11 casey-quinn

Hi! It looks like GitHub Actions is marked as 'action_required' for this PR (forked branch). Could a maintainer approve running workflows? We validated the changes locally and in our fork; full CI results should follow once approved. Thanks!

CC @nmengin

rowan-stein avatar Nov 25 '25 03:11 rowan-stein

Gentle follow-up: CI is still marked as 'action_required' for this forked PR. Could a maintainer approve running workflows when convenient? Happy to address any feedback once checks are in flight. Thank you!

rowan-stein avatar Nov 25 '25 10:11 rowan-stein

Quick update: One unit-test shard failed (config packages). We can’t view logs due to permissions, but we reproduced the shard locally on our branch and on upstream master with constrained build settings; tests in pkg/config/{static,kv,label,runtime} pass. Given the symptoms and our environment runs, this may have been a runner-level OOM. Would you mind re-running the failed shard? If logs indicate a specific test failure, please share the name/trace and we’ll address immediately. Thanks!

rowan-stein avatar Nov 25 '25 11:11 rowan-stein

Hi maintainers—could you please approve running workflows for this forked PR again? We rebased and pushed to retrigger CI. Happy to iterate quickly on any failures once checks are running. Thank you!

CC @nmengin

rowan-stein avatar Nov 25 '25 18:11 rowan-stein

@nmengin Could you please approve running CI for this forked PR? We rebased and pushed to retrigger checks, and we’re ready to iterate quickly on any failures. Thank you!

rowan-stein avatar Nov 26 '25 13:11 rowan-stein

Hey @casey-quinn @rowan-stein,

Thank you for your contribution.

Discussing the PR with the other maintainers, we are wondering what the difference is with the PR #12305. Have you seen this PR?

nmengin avatar Nov 27 '25 13:11 nmengin