-
Notifications
You must be signed in to change notification settings - Fork 142
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
Clean Up Shim #1260
Clean Up Shim #1260
Conversation
| webInstrumentationConfig | Not currently supported by the shim, but is in Azure Monitor OpenTelemetry as `browserSdkLoaderConfig`. | | ||
| webInstrumentationConfig | Not currently supported by the shim, or Azure Monitor OpenTelemetry. | | ||
| enableAutoCollectPerformance | Not supported in the shim. | | ||
| enableAutoCollectConsole | Not supported in the shim. | |
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.
Should be supported in shim
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 see, performance counters appear to be supported in the shim code, although not via the distro's API any longer.
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.
Yeah but this shim readme not distro
| webInstrumentationConfig | Not currently supported by the shim, or Azure Monitor OpenTelemetry. | | ||
| enableAutoCollectPerformance | Not supported in the shim. | | ||
| enableAutoCollectConsole | Not supported in the shim. | | ||
| enableAutoCollectExternalLoggers | Not supported in the shim. | |
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.
Should be supported in shim
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 see performance counters will be, and Console + Winston are not supported in OTel yet, so I'll keep those instrumentations here. But I believe we need to kill webInstrumentationConfig
since configuring the browser SDK loader is no longer supported in the distro.
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.
Yeah I didn't say anything about webInstrumentationConfig, we should deprecate that one
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.
It's in the highlighted bit in the UI on Github on my side, sorry for the confusion!
| enableAutoCollectPerformance | Not supported in the shim. | | ||
| enableAutoCollectConsole | Not supported in the shim. | | ||
| enableAutoCollectExternalLoggers | Not supported in the shim. | | ||
| enableAutoCollectExceptions | Not supported in the shim. | |
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.
Do you have a task to follow up on this?, it would be good to check if we can support this
winston: { enabled: true }, | ||
bunyan: { enabled: true } | ||
}, | ||
otlpTraceExporterConfig: {}, |
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.
Why removing OTLP configurations here? is it being initialized somewhere else not sure I follow
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.
Ah, this was a reaction to the API change in the distro, looks like I can modify the internal config of the distro from within main.ts
so I'll just transition what used to be configurations passed to the distro via its API to modifying the internal config.
@@ -160,23 +149,13 @@ class Config implements IConfig { | |||
if (this.aadTokenCredential) { | |||
options.azureMonitorExporterOptions.credential = this.aadTokenCredential; | |||
} | |||
if (typeof (this.enableAutoCollectConsole) === "boolean") { | |||
const setting: boolean = this.enableAutoCollectConsole; | |||
options.logInstrumentationOptions = { |
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.
Console OTel instrumentation still doesn't exist, so we cannot remove this
if (typeof (this.enableAutoCollectExternalLoggers) === "boolean") { | ||
options.logInstrumentationOptions = { | ||
...options.logInstrumentationOptions, | ||
winston: { enabled: this.enableAutoCollectExternalLoggers }, |
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.
Same here winston still not collecting logs in OpenTelemetry instrumentation
@@ -245,47 +210,6 @@ class Config implements IConfig { | |||
process.env["APPLICATION_INSIGHTS_NO_STANDARD_METRICS"] = "disable"; | |||
} | |||
} | |||
// NATIVE METRICS | |||
if (typeof (this.enableAutoCollectExtendedMetrics) === "boolean") { |
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.
If you are removing native metrics please remove any related code, including all types, only updating the config is not enough
Cleaning the shim of options no longer supported by the distro API after being updated.
Including
Resolves bug where if enableAutoCollectDependencies/enableAutoCollectRequests was set to false, all other instrumentation options would be false.
Cleans up the unused
configHelper
class.