Closed TimothyMothra closed 5 years ago
@Dmitry-Matveev can I get you to review this? If you're okay with these changes, I'll release alpha5 today
@MS-TimothyMothra Is this how its going to work:
In the long term (second half of 2019) this problem is intended to be solved with sampling on Activity level: https://github.com/dotnet/corefx/issues/36349
We need to make sampling decision on request when we start processing it and set it on Acitivity.Current.Recording. Then we can always rely on Activity.Current.Recording when we need to set expensive properties.
In this case there is no need in extra flags and telemetry module, but we might need to expose sampling APIs in base SDK. Also it does not seem right to use HttpContext.Current in processors which make the whole approach error-prone and unreliable.
If this change is not time critical I propose to postpone it and make things better without introducing new things that also subject to break.
@cijothomas Yes, that is the plan. I already have a branch with the config required for codeless attach.
@lmolkova This is to fix a problem we're actively having. Codeless attach is using a forked version of the SDK which is creating a maintenance nightmare. We need these changes in the SDK and hidden behind a feature flag.
This is to fix a problem we're actively having. Codeless attach is using a forked version of the SDK which is creating a maintenance nightmare. We need these changes in the SDK and hidden behind a feature flag.
My point is, relying on HttpContext.Current surviving to a processor is not a good idea and I'm afraid we are moving nightmare inside the SDK and exposing feature flags/APIs that are not going to be used in the long term, but will have to maintain them forever. Have we evaluated options to avoid this?
Have we evaluated options to avoid this?
@lmolkova We're very open to suggestions, but I don't think waiting until the end of this year is good enough.
Yes, HttpContext.Current will be a problem if the processor is run on a different thread, but I've been assured that this doesn't happen in the SDK today.
Per offline conversation, I will work on these requested changes Friday.
Fix Issue #1173
RequestTelemetry.Url
from `RequestTrackingTelemetryModule.RequestTelemetry.Source
from `RequestTrackingTelemetryModule.PostSamplingTelemetryProcessor
to populate the previously removed properties. (Defered execution)RequestTelemetry.Url
toQuickPulseTelemetryProcessor