Skip to content

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

Closed
github-actions[bot] wants to merge 2 commits intorelease/9.0from
backport/pr-6725-to-release/9.0
Closed

[release/9.0] Fix error adding log entry with no body#6762
github-actions[bot] wants to merge 2 commits intorelease/9.0from
backport/pr-6725-to-release/9.0

Conversation

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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.

@adamint adamint closed this Jan 23, 2025
@adamint
Copy link
Copy Markdown
Member

adamint commented Jan 23, 2025

Hasn't been merged after 2 months.

@github-actions github-actions Bot locked and limited conversation to collaborators Feb 23, 2025
@RussKie RussKie deleted the backport/pr-6725-to-release/9.0 branch March 30, 2025 23:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants