Skip to content

Commit c64ffa0

Browse files
committed
Merge branch 'main' into meta/add-sentry-extensions-ai
2 parents 9879c48 + 0e30c90 commit c64ffa0

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,10 @@ jobs:
265265
path: src
266266

267267
- name: Integration test
268-
# # Note that when upgsading .NET versions, linux-musl may need special handling... see comments below
268+
# # Note that when upgrading .NET versions, linux-musl may need special handling... see comments below
269269
# if: ${{ (matrix.rid != 'linux-musl-x64') && (matrix.rid != 'linux-musl-arm64') }}
270+
# TODO: Re-enable once we have resolved https://github.com/getsentry/sentry-dotnet/issues/4788
271+
if: ${{ (matrix.rid != 'linux-musl-x64') }}
270272
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
271273
with:
272274
path: integration-test

samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Program.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
using Microsoft.Extensions.DependencyInjection;
12
using Microsoft.Extensions.Hosting;
23
using Microsoft.Extensions.Logging;
3-
using OpenTelemetry;
44
using OpenTelemetry.Trace;
55
using Sentry.OpenTelemetry;
66

7-
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
8-
.AddSentry() // <-- Configure OpenTelemetry to send traces to Sentry
9-
.AddHttpClientInstrumentation() // From OpenTelemetry.Instrumentation.Http... adds automatic tracing for outgoing HTTP requests
10-
.Build();
11-
127
var host = new HostBuilder()
138
.ConfigureFunctionsWorkerDefaults()
9+
.ConfigureServices(services =>
10+
{
11+
services.AddOpenTelemetry().WithTracing(builder =>
12+
{
13+
builder
14+
.AddSentry() // <-- Configure OpenTelemetry to send traces to Sentry
15+
.AddHttpClientInstrumentation(); // From OpenTelemetry.Instrumentation.Http... adds automatic tracing for outgoing HTTP requests
16+
});
17+
})
1418
.ConfigureLogging(logging =>
1519
{
1620
logging.AddSentry(options =>

samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
1111
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.2.0" />
1212
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
13-
<PackageReference Include="OpenTelemetry" Version="1.13.0" />
14-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.13.0" />
13+
<PackageReference Include="OpenTelemetry" Version="1.14.0" />
14+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
15+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
1516
</ItemGroup>
1617

1718
<ItemGroup>

0 commit comments

Comments
 (0)