Skip to content

Commit

Permalink
yayyay
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas committed Dec 10, 2024
1 parent ad6852e commit df8825f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
18 changes: 1 addition & 17 deletions src/Digdir.Library.Utils.AspNet/AspNetUtilitiesExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public static WebApplicationBuilder ConfigureTelemetry(
return true;
};
})
.AddEntityFrameworkCoreInstrumentation()
.AddNpgsql()
.AddFusionCacheInstrumentation();
});
Expand All @@ -165,20 +166,3 @@ public static WebApplicationBuilder ConfigureTelemetry(
return builder;
}
}

public class TelemetrySettings
{
private const string MassTransitSource = "MassTransit";
private const string AzureSource = "Azure.*";

public string? ServiceName { get; set; }
public string? Endpoint { get; set; }
public string? Protocol { get; set; }
public string? AppInsightsConnectionString { get; set; }
public string? ResourceAttributes { get; set; }
public HashSet<string> TraceSources { get; set; } = new()
{
AzureSource,
MassTransitSource
};
}
17 changes: 17 additions & 0 deletions src/Digdir.Library.Utils.AspNet/AspNetUtilitiesSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,20 @@ public sealed class HealthCheckSettings
{
public List<string> HttpGetEndpointsToCheck { get; set; } = [];
}

public sealed class TelemetrySettings
{
private const string MassTransitSource = "MassTransit";
private const string AzureSource = "Azure.*";

public string? ServiceName { get; set; }
public string? Endpoint { get; set; }
public string? Protocol { get; set; }
public string? AppInsightsConnectionString { get; set; }
public string? ResourceAttributes { get; set; }
public HashSet<string> TraceSources { get; set; } = new()
{
AzureSource,
MassTransitSource
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.10.0-beta.1" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="8.0.0" />
Expand Down

0 comments on commit df8825f

Please sign in to comment.