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

Surpress Azure Monitor Log writting to StdErr #38624

Closed
johnkattenhorn opened this issue Nov 20, 2024 · 3 comments
Closed

Surpress Azure Monitor Log writting to StdErr #38624

johnkattenhorn opened this issue Nov 20, 2024 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@johnkattenhorn
Copy link

johnkattenhorn commented Nov 20, 2024

Is your feature request related to a problem? Please describe.
Azure Monitor Open Telemetry to Console write log entries destined for Azure Monitor to the Console using StdErr which makes the output noisy.

Describe the solution you'd like
Like to be able to suppress the output of Azure Monitor so that it doesn't write to StdErr

Describe alternatives you've considered
Tried to find a way to redirect the output to dummy file using alternative stream but this seemed to have undesired side-effects.

Additional context
Any logs that we want outputted to the console are being managed through another logger using structlog

Image

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 20, 2024
@xiangyan99 xiangyan99 added Monitor Monitor, Monitor Ingestion, Monitor Query Service Attention Workflow: This issue is responsible by Azure service team. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Nov 21, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 21, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @gulopesd @Haiying-MSFT @jairmyree @joshfree @KarishmaGhiya @KevinBlasko @kurtzeborn @nisha-bhatia @pvaneck @sarangan12 @scottaddie @srnagar @ToddKingMSFT.

@lzchen
Copy link
Member

lzchen commented Nov 21, 2024

Could you paste your pip freeze as well as a code snippet of how you are instrumenting with Azure monitor OpenTelemetry SDK. Also, which logs specifically are noisy? The INFO logs?

@johnkattenhorn
Copy link
Author

Hi,

Thanks for coming back to me, in the end I took a different approach and wrote a processor for structlog which allow me to post to Azure Monitor via the REST API so I could keep the structured logging and console output and also achieve a push to Azure Monitor.

Just some other feedback, since migration away from OpenCensus to OpenTelemetry I found it quite difficult to just push logs, no spans or anything just yet.

I know the Azure Log Handler is there and it might be just my use case but integrating with structlog which is quite popular was tricker than I hoped.

If you would like to see the code for this please let me know else I'll close this issue and thank you again for your time.

John

@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants