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

Added DeliverAt to message header for auditing and metrics #6272

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

TravisNickels
Copy link
Member

@TravisNickels TravisNickels commented Feb 17, 2022

This is related to #5893

Currently, critical time in NServiceBus.Metrics and ServiceControl is being calculated based on the TimeSent header in a message. However, this does not take into account that there could be a delayed delivery set for a message, which can cause the critical time that is displayed in ServicePulse to appear inaccurate especially for messages that could be set far into the future. Critical time should be measured as the time between when a message should be delivered to an endpoint and when the message is finished processing.

This PR adds DeliverAt to the header of a message. The DeliverAt value is calculated by either taking the TimeSent value and adding the DelayDeliveryWith time span or setting DeliverAt to the value of DoNotDeliverBefore DateTimeOffset.

Documentation: https://docs.particular.net/nservicebus/messaging/headers#diagnostic-and-informational-headers-nservicebus-deliverat

@TravisNickels TravisNickels merged commit 4977011 into release-7.7 Feb 17, 2022
@TravisNickels TravisNickels deleted the critical-time-7.7 branch February 17, 2022 21:14
@DavidBoike DavidBoike added this to the 7.7.0 milestone Feb 17, 2022
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