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
In Otel Dotnet, the sampler runs immediately after an Activity (span) is started. This is before any instrumentation happens on the activity which means that important information such as the URLPath and the HttpMethod are not yet available to the sampler.
Currently, to get the xray sampler to work as expected, we run it a second time when we have http request information in the plugin. This is a short term solution. For a long term solution, we need to update the sampler itself instead of this package to be more robust and run only once according to spec.
For ASP.NET Core, we should have access to HttpContext.Current using Dependency Injection where we can extract the request as soon the activity starts and thus have access to required information for the sampler.
For ASP.NET (Framework/non core), the Otel upstream team has pushed code changes to make URLPath available right when the activity starts and there's another PR for HttpMethod. Once that PR is merged and released, we can update the sampler.
Creating this issue to track this change.
The text was updated successfully, but these errors were encountered:
In Otel Dotnet, the sampler runs immediately after an Activity (span) is started. This is before any instrumentation happens on the activity which means that important information such as the URLPath and the HttpMethod are not yet available to the sampler.
Currently, to get the xray sampler to work as expected, we run it a second time when we have http request information in the plugin. This is a short term solution. For a long term solution, we need to update the sampler itself instead of this package to be more robust and run only once according to spec.
For ASP.NET Core, we should have access to HttpContext.Current using Dependency Injection where we can extract the request as soon the activity starts and thus have access to required information for the sampler.
For ASP.NET (Framework/non core), the Otel upstream team has pushed code changes to make URLPath available right when the activity starts and there's another PR for HttpMethod. Once that PR is merged and released, we can update the sampler.
Creating this issue to track this change.
The text was updated successfully, but these errors were encountered: