Skip to content

Commit

Permalink
updatet to track http!
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Sep 3, 2024
1 parent a9875af commit f706a3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MigrationTools/MigrationTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<PackageReference Include="Newtonsoft.Json.Schema" Version="4.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.6" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
<PackageReference Include="Serilog" Version="4.0.1" />
Expand Down
2 changes: 2 additions & 0 deletions src/MigrationTools/Services/ActivitySourceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v
.AddSource(ActivitySourceProvider.ActivitySourceName) // Register your custom ActivitySource
//.AddConsoleExporter() // Export traces to console
.AddProcessor(new ActivitySourceProvider.ActivityFilteringProcessor())
.AddHttpClientInstrumentation()
.SetErrorStatusOnException()
.AddAzureMonitorTraceExporter(options =>
{
Expand All @@ -159,6 +160,7 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v
{
builder
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(entryAssemblyName, serviceVersion: versionString))
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation()
.AddProcessInstrumentation()
//.AddConsoleExporter() // Export metrics to console
Expand Down

0 comments on commit f706a3b

Please sign in to comment.