Skip to content

Activity source split for User/Runtime grain calls #8043

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

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

rwkarg
Copy link
Contributor

@rwkarg rwkarg commented Oct 20, 2022

This allows for selectively choosing activity for runtime grains (like IMembershipTable, IRemoteGrainDirectory, or IDeploymentLoadPublisher) or only user created grains (what the user has created for their system/application).

It is assumed that consumers will primarily want the user grain Activity and not also the runtime/internal grain calls.

Mechanically, this is achieved by looking to see if the namespace of the grain starts with "Orleans". There is the possibility that a user can create their own grain in a namespace starting with "Orleans" (ex. Orleans.MyCompany.MyApp) but this is not an idiomatic pattern for namespace naming so it may be sufficient to document this behavior.

This does introduce a breaking change for current consumers of ActivitySources.
For example, users using OpenTelemetry (and similarly for directly listening with an ActivityListener) currently add the "Microsoft.Orleans" source and get all runtime and user grain Activity.

This PR would require those users to do one of the following in their code:

  • Make no changes and stop getting any Orleans related Activity
  • Add the source as "Microsoft.Orleans.*" instead (note the asterisk/wildcard added) to get the existing set of both user and runtime grain Activity
  • Add the source as "Microsoft.Orleans.User" to get only the user grain Activity
  • Add the source as "Microsoft.Orleans.Runtime" to get only the runtime grain Activity
Microsoft Reviewers: Open in CodeFlow

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@dnfadmin
Copy link

dnfadmin commented Oct 20, 2022

CLA assistant check
All CLA requirements met.

@rwkarg rwkarg changed the title Activity source Activity source split for User/Runtime grain calls Oct 20, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ReubenBond
Copy link
Member

LGTM. This will incur some reflection overhead to get the target's namespace, but perhaps that is acceptable. An alternative might be for us to guarantee a prefix for all internal grains, such as "sys." or "ms."

@ReubenBond ReubenBond merged commit ea7e324 into dotnet:main Oct 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants