Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit fcdbc87

Browse files
committed
Adds another tracing source
1 parent d29a64a commit fcdbc87

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

src/Solid.Identity.Protocols.Saml2p/Factories/AuthnRequestFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public AuthnRequestFactory(TimeProvider time, IOptions<Saml2pOptions> options)
5353
/// <returns>An awaitable <see cref="Task{TResult}"/> of type <see cref="AuthnRequest"/>.</returns>
5454
public async Task<AuthnRequest> CreateAuthnRequestAsync(HttpContext context, ISaml2pIdentityProvider idp)
5555
{
56+
using var activity = Saml2pConstants.Tracing.Factories.StartActivity($"{nameof(AuthnRequestFactory)}.{nameof(CreateAuthnRequestAsync)}");
5657
var request = new AuthnRequest
5758
{
5859
Id = $"_{Guid.NewGuid()}",

src/Solid.Identity.Protocols.Saml2p/Factories/SamlResponseFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public SamlResponse Create(ISaml2pServiceProvider partner, string authnRequestId
2525

2626
public SamlResponse Create(ISaml2pServiceProvider partner, Status status, string authnRequestId = null, string relayState = null, Saml2SecurityToken token = null)
2727
{
28+
using var activity = Saml2pConstants.Tracing.Factories.StartActivity($"{nameof(SamlResponseFactory)}.{nameof(Create)}");
2829
var destination = new Uri(partner.BaseUrl, partner.AssertionConsumerServiceEndpoint);
2930
if (token != null)
3031
{

src/Solid.Identity.Protocols.Saml2p/Factories/SecurityTokenDescriptorFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public SecurityTokenDescriptorFactory(
5757

5858
public async ValueTask<SecurityTokenDescriptor> CreateSecurityTokenDescriptorAsync(ClaimsIdentity identity, ISaml2pServiceProvider partner)
5959
{
60+
using var activity = Saml2pConstants.Tracing.Factories.StartActivity($"{nameof(SecurityTokenDescriptorFactory)}.{nameof(CreateSecurityTokenDescriptorAsync)}");
6061
var issuedAt = GetUtcNow();
6162
var instant = issuedAt;
6263
if (identity.TryParseAuthenticationInstant(out var parsed))

src/Solid.Identity.Protocols.Saml2p/Saml2pConstants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,14 @@ public static class Tracing
162162
private static readonly string AssemblyVersion = GenerateAssemblyVersion();
163163
public static ActivitySource Saml2p { get; } = new (Names.Saml2p, AssemblyVersion);
164164
public static ActivitySource Cache { get; } = new (Names.Cache, AssemblyVersion);
165+
public static ActivitySource Factories { get; } = new (Names.Factories, AssemblyVersion);
165166
public static ActivitySource Providers { get; } = new (Names.Providers, AssemblyVersion);
166167
public static ActivitySource Validation { get; } = new (Names.Validation, AssemblyVersion);
167168
public static class Names
168169
{
169170
public const string Saml2p = "Solid.Identity.Protocols.Saml2p";
170171
public const string Cache = Saml2p + ".Cache";
172+
public const string Factories = Saml2p + ".Factories";
171173
public const string Providers = Saml2p + ".Providers";
172174
public const string Validation = Saml2p + ".Validation";
173175
}

0 commit comments

Comments
 (0)