fix: //orchestrion:ignore is not respected for Echo handlers - #788
fix: //orchestrion:ignore is not respected for Echo handlers#788Trighap52 wants to merge 1 commit into
Conversation
|
Hey @Trighap52 the actual aspect that is used in live applications is in github.com/DataDog/dd-trace-go, what is in this repository is just an example for integrators. |
|
Hi @RomainMuller Thanks, that makes sense. To make sure I move this in the right direction: should the fix live entirely in dd-trace-go’s Echo integration, or would you expect Orchestrion core to expose some generic mechanism for integrations to observe //orchestrion:ignore declarations? |
|
IMHO you'd want to do this fully in the dd-trace-go side… I don't think there would be a clean way to signal arbitrary registrations from "usage-agnostic" orchestrion to "usage-specific" tracer integrations. So in this case we'd probably want to introduce a |
Why is this change being made?
//orchestrion:ignorewas 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?
echo.New()toruntime/echoignore.New().runtime/echoignorehelper package:echotrace.MiddlewarewithWithIgnoreRequest(...)var _ = echoignore.RegisterIgnoredEchoHandlerFunc(...)How was this tested?
go test ./runtime/echoignorego test ./internal/injector/...cd samples && go test -run TestSamples .Fixes: #709