Skip to content

fix: //orchestrion:ignore is not respected for Echo handlers#788

Open
Trighap52 wants to merge 1 commit intoDataDog:mainfrom
Trighap52:fix-709-echo-ignore
Open

fix: //orchestrion:ignore is not respected for Echo handlers#788
Trighap52 wants to merge 1 commit intoDataDog:mainfrom
Trighap52:fix-709-echo-ignore

Conversation

@Trighap52
Copy link

Why is this change being made?

//orchestrion:ignore was not effective for Echo routes because tracing was injected at router level (echo.New -> e.Use(echotrace.Middleware())), so ignored handlers were still traced.

This caused high-volume endpoints (for example readiness/liveness probes) to emit traces even when explicitly marked with //orchestrion:ignore.

What is the change?

  • Added a built-in aspect that rewrites echo.New() to runtime/echoignore.New().
  • Added runtime/echoignore helper package:
    • creates Echo router
    • installs echotrace.Middleware with WithIgnoreRequest(...)
    • skips tracing when matched route handler is registered as ignored
  • Added injector pre-pass to register ignored Echo handlers by injecting:
    • var _ = echoignore.RegisterIgnoredEchoHandlerFunc(...)
  • Added runtime tests for ignore handler registration and request-ignore matching.
  • Added a samples regression case for ignored Echo handlers and updated snapshots.

How was this tested?

  • go test ./runtime/echoignore
  • go test ./internal/injector/...
  • cd samples && go test -run TestSamples .

Fixes: #709

@Trighap52 Trighap52 requested a review from a team as a code owner February 13, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] //orchestrion:ignore directive not respected for Echo router handlers

1 participant

Comments