Skip to content

Commit c68f365

Browse files
committed
Update
1 parent ea86186 commit c68f365

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

src/Identity/Core/src/SignInManagerMetrics.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ public SignInManagerMetrics(IMeterFactory meterFactory)
3131
{
3232
_meter = meterFactory.Create(MeterName);
3333

34-
_authenticateCounter = _meter.CreateCounter<long>(AuthenticateCounterName, "count", "The number of authenticate and sign-in attempts.");
34+
_authenticateCounter = _meter.CreateCounter<long>(AuthenticateCounterName, "count", "The number of authenticate and sign in attempts.");
3535
_rememberTwoFactorClientCounter = _meter.CreateCounter<long>(RememberTwoFactorCounterName, "count", "The number of two factor clients remembered.");
3636
_forgetTwoFactorCounter = _meter.CreateCounter<long>(ForgetTwoFactorCounterName, "count", "The number of two factor clients forgotten.");
3737
_refreshCounter = _meter.CreateCounter<long>(RefreshCounterName, "count", "The number of refresh sign-in attempts.");
3838
_checkPasswordCounter = _meter.CreateCounter<long>(CheckPasswordCounterName, "count", "The number of check password attempts.");
39-
_signInUserPrincipalCounter = _meter.CreateCounter<long>(SignInUserPrincipalCounterName, "count", "The number of check password attempts.");
40-
_signOutUserPrincipalCounter = _meter.CreateCounter<long>(SignOutUserPrincipalCounterName, "count", "The number of check password attempts.");
39+
_signInUserPrincipalCounter = _meter.CreateCounter<long>(SignInUserPrincipalCounterName, "count", "The number of user principals signed in.");
40+
_signOutUserPrincipalCounter = _meter.CreateCounter<long>(SignOutUserPrincipalCounterName, "count", "The number of user principals signed out.");
4141
}
4242

4343
internal void CheckPasswordSignIn(string userType, SignInResult? result, Exception? exception = null)

src/Identity/Extensions.Core/src/UserManagerMetrics.cs

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,13 @@ internal sealed class UserManagerMetrics : IDisposable
3434
public UserManagerMetrics(IMeterFactory meterFactory)
3535
{
3636
_meter = meterFactory.Create(MeterName);
37-
_createCounter = _meter.CreateCounter<long>(
38-
CreateCounterName,
39-
"count",
40-
"The number of user creation attempts.");
41-
_updateCounter = _meter.CreateCounter<long>(
42-
UpdateCounterName,
43-
"count",
44-
"The number of user update attempts.");
45-
_deleteCounter = _meter.CreateCounter<long>(
46-
DeleteCounterName,
47-
"count",
48-
"The number of user deletion attempts.");
49-
_checkPasswordCounter = _meter.CreateCounter<long>(
50-
CheckPasswordCounterName,
51-
"count",
52-
"The number of password check attempts.");
53-
_verifyPasswordCounter = _meter.CreateCounter<long>(
54-
VerifyPasswordCounterName,
55-
"count",
56-
"The number of password verification attempts.");
57-
_verifyTokenCounter = _meter.CreateCounter<long>(
58-
VerifyTokenCounterName,
59-
"count",
60-
"The number of token verification attempts.");
61-
_generateTokenCounter = _meter.CreateCounter<long>(
62-
GenerateTokenCounterName,
63-
"count",
64-
"The number of token generation attempts.");
37+
_createCounter = _meter.CreateCounter<long>(CreateCounterName, "count", "The number of users created.");
38+
_updateCounter = _meter.CreateCounter<long>(UpdateCounterName, "count", "The number of user updates.");
39+
_deleteCounter = _meter.CreateCounter<long>(DeleteCounterName, "count", "The number of users deleted.");
40+
_checkPasswordCounter = _meter.CreateCounter<long>(CheckPasswordCounterName, "count", "The number of check password attempts.");
41+
_verifyPasswordCounter = _meter.CreateCounter<long>(VerifyPasswordCounterName, "count", "The number of password verification attempts.");
42+
_verifyTokenCounter = _meter.CreateCounter<long>(VerifyTokenCounterName, "count", "The number of token verification attempts.");
43+
_generateTokenCounter = _meter.CreateCounter<long>(GenerateTokenCounterName, "count", "The number of token generation attempts.");
6544
}
6645

6746
internal void CreateUser(string userType, IdentityResult? result, Exception? exception = null)

0 commit comments

Comments
 (0)