Skip to content

Additional statistics when a ServiceProvider is created#57753

Merged
eerhardt merged 1 commit into
dotnet:mainfrom
allantargino:issue-52364
Aug 24, 2021
Merged

Additional statistics when a ServiceProvider is created#57753
eerhardt merged 1 commit into
dotnet:mainfrom
allantargino:issue-52364

Conversation

@allantargino

Copy link
Copy Markdown
Contributor

Adds the following statistics to the existing ServiceProviderBuilt event:

  • Number of open generics
  • Number of closed generics

fix #52364

* Number of open generics
* Number of closed generics

fix dotnet#52364
@ghost ghost added area-Extensions-DependencyInjection community-contribution Indicates that the PR has been added by a community member labels Aug 19, 2021
@ghost

ghost commented Aug 19, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Adds the following statistics to the existing ServiceProviderBuilt event:

  • Number of open generics
  • Number of closed generics

fix #52364

Author: allantargino
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@allantargino

allantargino commented Aug 19, 2021

Copy link
Copy Markdown
Contributor Author

Most of the required statistics were already implemented by #56809.
Also, I haven't implemented - Number of descriptors in the collection because it can be derived by clients from the sum of singleton, scoped and transient services. Let me know if it would be best to have it as part of the event :)

@eerhardt eerhardt requested a review from davidfowl August 19, 2021 18:32

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The implementation looks good.

I'd like @davidfowl to sign off that these new values are useful.

@davidfowl davidfowl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@eerhardt

Copy link
Copy Markdown
Member

@davidfowl - do you want this in 6.0? Or is it OK to just merge it for 7.0.

@davidfowl

Copy link
Copy Markdown
Member

6.0.0 would be nice. Feels low risk.

@maryamariyan maryamariyan added this to the 6.0.0 milestone Aug 19, 2021
@eerhardt eerhardt merged commit 4ab31fa into dotnet:main Aug 24, 2021
@eerhardt

Copy link
Copy Markdown
Member

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1163217720

@allantargino allantargino deleted the issue-52364 branch August 24, 2021 20:13
@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-DependencyInjection community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add EventSource event for service registration statistics

4 participants