-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cold Start Optimization #10776
base: dev
Are you sure you want to change the base?
Cold Start Optimization #10776
Conversation
|
||
foreach (string substring in ExcludedRequestSubstrings) | ||
{ | ||
if (uri.IndexOf(substring, StringComparison.Ordinal) >= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will need to be made more robust:
- This looks like it might not be cheap to perform on a hotpath like this
- These substrings may have a chance of false-positives.
Possible solutions:
- Is there something besides URI on the
HttpRequestMessage
we can use to identify these calls? - Can we add something to the
HttpRequestMessage
to identify these calls? Such as adding a value to.Options
to indicate this call is to be filtered out. - Can we use an AsyncLocal to suppress Http client telemetry collection?
return loggingBuilder | ||
// These are messages piped back to the host from the worker - we don't handle these anymore if the worker has OpenTelemetry enabled. | ||
// Instead, we expect the user's own code to be logging these where they want them to go. | ||
.AddFilter<OpenTelemetryLoggerProvider>("Function.*", _ => !ScriptHost.WorkerOpenTelemetryEnabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why we explicitly care about WorkerOptenTelemetryEnabled
? What if worker is using app-insights. Don't ask why an app would use OTel in host and AppInsights in the worker, but what if they did?
What I am getting at is, should there be a general flag of worker is managing its own telemetry, and agnostic to exactly how it is doing so?
@@ -7,6 +7,7 @@ internal enum TelemetryMode | |||
{ | |||
None = 0, // or Default | |||
ApplicationInsights = 1, | |||
OpenTelemetry = 2 | |||
OpenTelemetry = 2, | |||
Placeholder = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit: I would put placeholder as 1
. Just feels right...
When the Host gets initialized in placeholder mode, all needed assemblies get JIT compiled during placeholder mode so we will not pay the cost for JIT during Specialization. We want to exercise as much of the code path as we can during placeholder mode to avoid JIT during specialization.
resolves #10453
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md
ditional PR information