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

Improve traceability of ITimerMsg #7262

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Jun 23, 2024

Changes

This is mostly a Phobos-oriented improvement, aimed at making it easier to keep track of scheduled metrics in systems that use IWithTimer heavily. Specifically, we now include the content of the message being scheduled inside the payload so we can answer the question "what was scheduled?" without a lot of overhead.

This doesn't affect the public API of Akka.NET at all.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

This is mostly a Phobos-oriented improvement, aimed at making it easier to keep track of scheduled metrics in systems that use `IWithTimer` heavily.
@Aaronontheweb Aaronontheweb added this to the 1.5.26 milestone Jun 23, 2024
Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Detailed my changes - going to do a local POC with Phobos and see if this resolves my issue there.

@@ -41,36 +41,39 @@ public Timer(object key, object msg, bool repeat, int generation, ICancelable ta
}
}

public interface ITimerMsg
public interface ITimerMsg : IWrappedMessage, INoSerializationVerificationNeeded
Copy link
Member Author

Choose a reason for hiding this comment

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

IWrappedMessage is how we can get access to the contents of the timer and record it via Phobos metrics.

Key = key;
Generation = generation;
Owner = owner;
Message = message;
Copy link
Member Author

Choose a reason for hiding this comment

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

We're not even going to access this value directly in the main timer use-case, so none of that code path is affected.

All of these messages types are internal so there's no public API impact.

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) June 24, 2024 15:54
@Aaronontheweb Aaronontheweb merged commit 0fd7ca0 into akkadotnet:dev Jun 24, 2024
3 of 11 checks passed
@Aaronontheweb Aaronontheweb deleted the fix-IWithTimer-nastiness branch June 24, 2024 15:55
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