Skip to content
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

[FEATURE REQ] Enable AzureSdkLogForwarder in Azure Monitor OTel distro #41373

Closed
lmolkova opened this issue Jan 17, 2024 · 4 comments · Fixed by #42374
Closed

[FEATURE REQ] Enable AzureSdkLogForwarder in Azure Monitor OTel distro #41373

lmolkova opened this issue Jan 17, 2024 · 4 comments · Fixed by #42374
Labels
Monitor - Distro Monitor OpenTelemetry Distro OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific)

Comments

@lmolkova
Copy link
Member

Library name

Azure.Monitor.OpenTelemetry.AspNetCore

Please describe the feature.

Azure SDKs emit logs using EventSources. EventSources can be forwarded to ILogger using AzureEventSourceLogForwarder

Some SDKs like CosmosDB leverage this to emit essential diagnostic information and currently have to ask users to enable it explicitly:

https://github.com/Azure/azure-cosmos-dotnet-v3/blob/8af055c68e01af1df9d530d3b716437c68ee5579/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs#L67-L68

AzMon distro should support Azure SDK logs by default.

@lmolkova lmolkova added OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific) Monitor - Distro Monitor OpenTelemetry Distro labels Jan 17, 2024
@lmolkova lmolkova changed the title [FEATURE REQ] Enable AzureSdkLogForwarder -> ILogger in Azure Monitor OTel distro [FEATURE REQ] Enable AzureSdkLogForwarder in Azure Monitor OTel distro Jan 17, 2024
@TimothyMothra
Copy link
Contributor

Should this be an opt-in feature?
I'm imagining users would only want this enabled if there's an issue.
Currently we're not sending the Exporter's internal logs to the AI Resource.

@TimothyMothra
Copy link
Contributor

Cijo commented that this sounds like the same feature that was added to the AI SDK:

Long term, is there a plan for Azure SDKs to migrate to ILogger natively?

@lmolkova
Copy link
Member Author

lmolkova commented Jan 23, 2024

Long term, is there a plan for Azure SDKs to migrate to ILogger natively?

No, we won't add a dependency on ILogger and we will keep using EventSource to write our logs.
We can however bake in log forwarder into the distro (to avoid adding a dependency).

I'm imagining users would only want this enabled if there's an issue.

Users enable error/warn SDK logs by default because these logs provide observability. Some users enable info logs, some use them instead of traces - these logs are for users.
Verbose logs are mostly for us to debug things - we don't expect users to enable verbose logs from us..

Opt-in mechanism is already part of ILogger, but the distro should allow opt-in to happen.

@jcocchi
Copy link

jcocchi commented Feb 27, 2024

+1, the user should still be able to control their own log level/ sampling. The ask is for the capability for logging to wired up by default

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Monitor - Distro Monitor OpenTelemetry Distro OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants