Better Azure Functions consumption plan behavior#2397
Conversation
6662e35 to
8f2a8f9
Compare
| public static class ExecuteAdvice { | ||
| @Advice.OnMethodExit(suppress = Throwable.class) | ||
| public static void methodExit() { | ||
| AzureFunctions.configureOnce(); |
There was a problem hiding this comment.
do we need to check any env vars before configure if i recalled correctly from the meeting with function team?
There was a problem hiding this comment.
I believe those are the env vars that are checked inside of configureOnce()?
| return; | ||
| } | ||
| if (instrumentation.removeTransformer(transformer)) { | ||
| ClassFileTransformerHolder.setClassFileTransformer(null); |
There was a problem hiding this comment.
this does the magic of shutting down bytecode instrumentation?
There was a problem hiding this comment.
ya, I initially thought removeTransformer was enough, but otel javaagent also uses ClassFileTransformerHolder.getClassFileTransformer() to transform lambda classes (which don't go through normal bytecode instrumentation process), so that's why also need to set that to null
| void lazyLoad(); | ||
| public static void configureOnce() { | ||
| if (configure != null) { | ||
| if (!hasConnectionString.get()) { |
There was a problem hiding this comment.
might just reuse the method: !hasConnectionString()
| if (DiagnosticsHelper.useFunctionsRpIntegrationLogging()) { | ||
| if (DiagnosticsHelper.isOsWindows()) { | ||
| // TODO (trask) is there a preference where this should go? | ||
| return DEFAULT_NAME; |
There was a problem hiding this comment.
String tempDirectory = System.getProperty("java.io.tmpdir"),
tempDirectory + "/applicationinsights/applicationinsights.log"?
|
This pull request introduces 1 alert when merging ab9d25a into f0d550e - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging f26c2a1 into 18be244 - view on LGTM.com new alerts:
|
No description provided.