Skip to content

Commit

Permalink
feat(utils): configure open telemetry tracing for masstransit in aspn…
Browse files Browse the repository at this point in the history
…et package (#1344)

<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue(s)

- #1262 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

---------

Co-authored-by: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com>
  • Loading branch information
arealmaas and MagnusSandgren authored Oct 24, 2024
1 parent fa3157a commit 5ec3b84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Digdir.Library.Utils.AspNet/AspNetUtilitiesExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace Digdir.Library.Utils.AspNet;

public static class AspNetUtilitiesExtensions
{
private const string MassTransitSource = "MassTransit";

public static IServiceCollection AddAspNetHealthChecks(this IServiceCollection services, Action<AspNetUtilitiesSettings, IServiceProvider>? configure = null)
{
var optionsBuilder = services.AddOptions<AspNetUtilitiesSettings>();
Expand Down Expand Up @@ -67,6 +69,7 @@ public static WebApplicationBuilder ConfigureTelemetry(this WebApplicationBuilde

tracing.AddHttpClientInstrumentation();
tracing.AddNpgsql();
tracing.AddSource(MassTransitSource); // MassTransit ActivitySource
})
.WithMetrics(metrics =>
{
Expand Down

0 comments on commit 5ec3b84

Please sign in to comment.