Last active
October 6, 2025 10:17
-
-
Save uzbekdev1/9b04e17507420a8e5912270bed98b624 to your computer and use it in GitHub Desktop.
open telementry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ItemGroup> | |
| <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" /> | |
| <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" /> | |
| <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1" /> | |
| </ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run --name jaeger -p 13133:13133 -p 16686:16686 -p 4317:4317 -d --restart=unless-stopped jaegertracing/opentelemetry-all-in-one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builder = WebApplication.CreateBuilder(args); | |
| builder.Services.AddOpenTelemetry().WithTracing(a => | |
| { | |
| a.SetResourceBuilder( | |
| ResourceBuilder.CreateDefault().AddService(builder.Environment.ApplicationName)) | |
| .AddAspNetCoreInstrumentation() | |
| .AddOtlpExporter(b => | |
| { | |
| b.Endpoint = new Uri("http://localhost:4317"); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment