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

[release/9.0] Fix error adding log entry with no body #6762

Open
wants to merge 2 commits into
base: release/9.0
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 22, 2024

Backport of #6725 to release/9.0

/cc @JamesNK

Customer Impact

It is possible to send an OTEL log entry without a body. For example, a customer at #6703 configured OpenAPI instrumentation to not send a body. This caused an error in Aspire and the telemetry wasn't loaded.

Aspire assumes there is always a body and errors when attempting to access it and convert to the log entry message. The log entry won't be visible in Aspire.

The fix is to set the message to an empty string when there is no body present.

Note: One customer has raised this issue but it could be more widespead. Aspire doesn't give a notification that telemetry failed to load, it just won't be present in the UI.

Testing

Unit test.

Manual testing by creating OTLP log entry manually without body:

image

Risk

Low

Regression?

No

Microsoft Reviewers: Open in CodeFlow

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for servicing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants