You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the existing //dd:span directive in the orchestrion component to automatically handle functions that have an echo.Context parameter.
This upgrade should automatically extract the context from echo.Context via its Request() method, similar to how *net/http.Request is handled, so that users of the Echo framework can benefit from automatic instrumentation without having to manually add tracing logic.
Is your feature request related to a problem?
Yes. Currently, when using Echo—whose handler functions accept echo.Context—manual tracing must be added, as the //dd:span directive does not automatically handle echo.Context. This creates an inconsistency in instrumentation and requires extra effort from developers when using non-standard context types.
Describe alternatives you've considered
The alternative would be to keep the current behavior, where manual instrumentation is required for echo.Context in Echo-based applications.
Additional context
The proposed change focuses on modifying the orchestrion template (specifically, DataDog/dd-trace-go@a153c0d/ddtrace/tracer/orchestrion.yml, lines 69–123) to include an additional check for echo.Context. If found, it should extract the underlying *http.Request context (using the Request() method) and update the echo.Context’s request with the new context. This enhancement would allow for seamless integration with Echo framework applications and maintain backward compatibility with existing functionality.
However, I do not believe that this approach is scalable. If you are considering extending the support of //dd:span to a broader range of function signatures, I would appreciate it if alternative methods could be discussed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Package Name
No response
Package Version(s)
No response
Describe the feature you'd like
Extend the existing
//dd:spandirective in the orchestrion component to automatically handle functions that have an echo.Context parameter.This upgrade should automatically extract the context from
echo.Contextvia itsRequest()method, similar to how*net/http.Requestis handled, so that users of the Echo framework can benefit from automatic instrumentation without having to manually add tracing logic.Is your feature request related to a problem?
Yes. Currently, when using Echo—whose handler functions accept
echo.Context—manual tracing must be added, as the//dd:spandirective does not automatically handleecho.Context. This creates an inconsistency in instrumentation and requires extra effort from developers when using non-standard context types.Describe alternatives you've considered
The alternative would be to keep the current behavior, where manual instrumentation is required for
echo.Contextin Echo-based applications.Additional context
The proposed change focuses on modifying the orchestrion template (specifically, DataDog/dd-trace-go@a153c0d/ddtrace/tracer/orchestrion.yml, lines 69–123) to include an additional check for
echo.Context. If found, it should extract the underlying*http.Requestcontext (using the Request() method) and update theecho.Context’s requestwith the new context. This enhancement would allow for seamless integration with Echo framework applications and maintain backward compatibility with existing functionality.However, I do not believe that this approach is scalable. If you are considering extending the support of //dd:span to a broader range of function signatures, I would appreciate it if alternative methods could be discussed.
Beta Was this translation helpful? Give feedback.
All reactions