-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Telemetry client with data outlined in spec (#3737)
* Add cache details to token cache notification args * Change code to make it more readable. * Address comments * Address comments * Remove unused imports * Change from dictionary to class * Update comments and CacheUsed enum values * Removing the enum as this can be inferred from Latencies * Adding api event for credential type. * Updating telemetry Data * Adding tests for new telemetry datapoints. Refactoring * Adding telemetry cache test. Adding Pop test * Refactoring * Refactoring * Adding scopes, resources and error message to telemetry * Apply suggestions from code review Co-authored-by: Bogdan Gavril <[email protected]> Co-authored-by: Peter M <[email protected]> * Updating scope parsing logic. Refactoring. * Refactoring * Updating telemetry data points Refactoring. * Test update * Fix typo * Test Fixes * Apply suggestions from code review Co-authored-by: Peter M <[email protected]> * Adding additional test Refactoring --------- Co-authored-by: trwalke <[email protected]> Co-authored-by: Travis Walker <[email protected]> Co-authored-by: Bogdan Gavril <[email protected]> Co-authored-by: Peter M <[email protected]>
- Loading branch information
1 parent
e661354
commit c99a106
Showing
26 changed files
with
775 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,7 +159,6 @@ public X509Certificate2 ClientCredentialCertificate | |
return null; | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region Region | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.Identity.Client.Cache | ||
{ | ||
/// <summary> | ||
/// Identifies the type of cache that the token was read from. Cache implementations must provide this. | ||
/// </summary> | ||
public enum CacheLevel | ||
{ | ||
/// <summary> | ||
/// Specifies that the cache level used is None. | ||
/// Token was retrieved from ESTS | ||
/// </summary> | ||
None = 0, | ||
/// <summary> | ||
/// Specifies that the cache level used is unknown. | ||
/// Token was retrieved from cache but the token cache implementation didn't specify which cache level was used. | ||
/// </summary> | ||
Unknown = 1, | ||
/// <summary> | ||
/// Specifies if the L1 cache is used. | ||
/// </summary> | ||
L1Cache = 2, | ||
/// <summary> | ||
/// Specifies if the L2 cache is used. | ||
L2Cache = 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/client/Microsoft.Identity.Client/TelemetryCore/AssertionType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.Identity.Client.TelemetryCore | ||
{ | ||
internal enum AssertionType | ||
{ | ||
None = 0, | ||
CertificateWithoutSni = 1, | ||
CertificateWithSni = 2, | ||
Secret = 3, | ||
ClientAssertion = 4, | ||
ManagedIdentity = 5 | ||
} | ||
} |
Oops, something went wrong.