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

Structured Logging for Delayed Retry Warnings #7108

Open
atruskot opened this issue Jul 17, 2024 · 1 comment
Open

Structured Logging for Delayed Retry Warnings #7108

atruskot opened this issue Jul 17, 2024 · 1 comment

Comments

@atruskot
Copy link

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

Aggregation and reporting of the following warning log message is difficult as the message template isn't formatted as expected.

Logger.Warn($"Delayed Retry will reschedule message '{message.MessageId}' after a delay of {Delay} because of an exception:", exception);

Describe the suggested solution

Define fields for use in structured logs to be rendered like:

{
    "MessageTemplate": "Delayed Retry will reschedule message '{@MessageId}' after a delay of {@Delay} because of an exception: {@Exception}",
    "RenderedMessage": "Delayed Retry will reschedule message '54376023-b96f-4555-9777-b1b000ea062a' after a delay of 00:00:11.9860000 because of an exception: exception text..",
    "MessageId": "54376023-b96f-4555-9777-b1b000ea062a",
    "Delay": "00:00:11.9860000",
    "Exception": "exception text..."
}

rather than:

{
    "MessageTemplate": "Delayed Retry will reschedule message '54376023-b96f-4555-9777-b1b000ea062a' after a delay of 00:00:11.9860000 because of an exception:",
    "RenderedMessage": "Delayed Retry will reschedule message '54376023-b96f-4555-9777-b1b000ea062a' after a delay of 00:00:11.9860000 because of an exception:",
    "Exception": "exception text..."
}

Describe alternatives you've considered

None.

Additional Context

No response

@tmasternak
Copy link
Member

Hi @atruskot, thank you for your feedback. We will consider this during our upcoming enhancement releases.

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

No branches or pull requests

2 participants