Skip to content

Commit

Permalink
Update ActivitySource in OpenTelemetry sample (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
bachuv authored Sep 27, 2023
1 parent 20aed32 commit 3bf0031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/DistributedTraceSample/OpenTelemetry/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static async Task Main(string[] args)
{
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("MySample"))
.AddSource("DurableTask")
.AddSource("DurableTask.Core")
.AddConsoleExporter()
.AddZipkinExporter()
.AddAzureMonitorTraceExporter(options =>
Expand Down
4 changes: 2 additions & 2 deletions samples/DistributedTraceSample/OpenTelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ The following package references are added to OpenTelemetrySample.csproj so that

## Tracer Provider

The following startup code is added to create a tracer provider. This code is necessary to add at startup to ensure that the traces are collected and emitted to the correct telemetry exporters. It specifies the service name for the app, which source that the traces should be collected from, and the telemetry exporters where the traces get emitted. "DurableTask" is the service name that will emit the Durable Task related traces.
The following startup code is added to create a tracer provider. This code is necessary to add at startup to ensure that the traces are collected and emitted to the correct telemetry exporters. It specifies the service name for the app, which source that the traces should be collected from, and the telemetry exporters where the traces get emitted. "DurableTask.Core" is the service name that will emit the Durable Task related traces.

```
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("MySample"))
.AddSource("DurableTask")
.AddSource("DurableTask.Core")
.AddConsoleExporter()
.AddZipkinExporter()
.AddAzureMonitorTraceExporter(options =>
Expand Down

0 comments on commit 3bf0031

Please sign in to comment.