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

Azure.Monitor.OpenTelemetry.AspNetCore.Internals.AzureSdkCompat.AzureEventSourceLogForwarder double formats event messages #44028

Open
christothes opened this issue May 14, 2024 · 1 comment · May be fixed by #44048
Labels
Client This issue points to a problem in the data-plane of the library. Monitor - Distro Monitor OpenTelemetry Distro Service Attention This issue is responsible by Azure service team.

Comments

@christothes
Copy link
Member

_listener ??= new AzureEventSourceListener((e, s) => LogEvent(e), EventLevel.Verbose);

calls LogEvent, but ignores the formatted string coming from the s parameter.

LogEvent then calls _formatMessage here:

logger.Log(MapLevel(eventData.Level), new EventId(eventData.EventId, eventData.EventName), new EventSourceEvent(eventData), null, _formatMessage);

which is defined as:

private static string FormatMessage(EventSourceEvent eventSourceEvent, Exception _) => eventSourceEvent.Format();

Then EventSource.Format() calls:

return EventSourceEventFormatting.Format(EventData);

This seems to effectively calls EventSourceEventFormatting.Format twice.

(related to #43947 (comment))

@github-actions github-actions bot added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label May 14, 2024
@jsquire jsquire added Service Attention This issue is responsible by Azure service team. Client This issue points to a problem in the data-plane of the library. Monitor - Distro Monitor OpenTelemetry Distro and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 15, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @rajkumar-rangaraj @reyang @TimothyMothra @vishweshbankwar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Monitor - Distro Monitor OpenTelemetry Distro Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants