Add OpenTelemetry sample and update deps#637
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates centrally-managed dependencies (Microsoft.Extensions, gRPC/Protobuf, System.Text.Json, etc.) and adds a new sample demonstrating OpenTelemetry distributed tracing with the Durable Task SDK, including local infra via Docker Compose.
Changes:
- Bumped multiple central package versions (Microsoft.Extensions.*, gRPC/Protobuf, System.Text.Json, AsyncInterfaces) and removed a duplicate package entry.
- Added a new
DistributedTracingSampledemonstrating fan-out/fan-in orchestration tracing with OpenTelemetry + Jaeger. - Updated solution/projects to include the new sample and align Protobuf versions.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
Directory.Packages.props |
Updates central dependency versions (Extensions, gRPC/Protobuf, System.*). |
src/Worker/Grpc/Worker.Grpc.csproj |
Updates Google.Protobuf version override. |
src/InProcessTestHost/InProcessTestHost.csproj |
Adds conditional Grpc.AspNetCore.Server version pin for net6.0. |
samples/Directory.Packages.props |
Adds OpenTelemetry package versions; removes old Functions sample package entries (leaving an empty group). |
samples/AzureFunctionsApp/AzureFunctionsApp.csproj |
Updates Google.Protobuf version override. |
samples/DistributedTracingSample/DistributedTracingSample.csproj |
Introduces new sample project (net10.0) with OTel package references and p2p refs. |
samples/DistributedTracingSample/Program.cs |
Implements OTel wiring and a fan-out/fan-in orchestration + activities. |
samples/DistributedTracingSample/README.md |
Documents how to run the tracing sample with Jaeger + DTS emulator. |
samples/DistributedTracingSample/docker-compose.yml |
Adds Jaeger + DTS emulator compose services for local testing. |
Microsoft.DurableTask.sln |
Adds the new sample project and introduces additional solution configurations (x64/x86). |
…ing sample - Updated Google.Protobuf package version from 3.33.2 to 3.33.5 in AzureFunctionsApp and Worker.Grpc projects. - Removed outdated package references in Directory.Packages.props for Functions sample. - Added OpenTelemetry packages for distributed tracing in Directory.Packages.props. - Introduced a new DistributedTracingSample project demonstrating OpenTelemetry integration with Durable Task SDK. - Implemented a fan-out/fan-in orchestration pattern in the DistributedTracingSample. - Created a README.md for the DistributedTracingSample with setup instructions and usage details. - Added a docker-compose.yml for running Jaeger and the DTS emulator for testing the sample.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4c8c470 to
55f978f
Compare
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.2" /> | ||
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" /> |
There was a problem hiding this comment.
Google.Protobuf is centrally versioned (and already updated to 3.33.5). This VersionOverride matches the central version, so it's redundant—consider removing it and letting central package management control the version.
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" /> | |
| <PackageReference Include="Google.Protobuf" /> |
| The sample connects to the DTS emulator by default using the connection string: | ||
| ``` | ||
| Endpoint=http://localhost:8080;Authentication=None;TaskHub=default | ||
| ``` | ||
|
|
||
| To override, set the `DURABLE_TASK_SCHEDULER_CONNECTION_STRING` environment variable: |
There was a problem hiding this comment.
This section states the sample connects to the DTS emulator by default using a localhost connection string, but the current Program.cs requires DURABLE_TASK_SCHEDULER_CONNECTION_STRING to be set and will fail otherwise. Please align the instructions with the actual startup behavior (either document the requirement or change the code to have a default).
| The sample connects to the DTS emulator by default using the connection string: | |
| ``` | |
| Endpoint=http://localhost:8080;Authentication=None;TaskHub=default | |
| ``` | |
| To override, set the `DURABLE_TASK_SCHEDULER_CONNECTION_STRING` environment variable: | |
| Before running, configure the DTS emulator connection string using the `DURABLE_TASK_SCHEDULER_CONNECTION_STRING` environment variable. For the local emulator started via Docker Compose, use: |
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.2" /> | ||
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" /> |
There was a problem hiding this comment.
Google.Protobuf is already centrally versioned in Directory.Packages.props (currently 3.33.5). Since this VersionOverride matches the central version, it's redundant and adds maintenance overhead—consider removing the VersionOverride and relying on central package management.
| <PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" /> | |
| <PackageReference Include="Google.Protobuf" /> |
This pull request updates several package dependencies in the
Directory.Packages.propsfile to newer versions. The changes mainly focus on upgrading Microsoft.Extensions, gRPC/Protobuf, and other supporting libraries to improve compatibility, security, and stability.Summary
What changed?
Dependency upgrades:
Microsoft.Extensions.Caching.Memory,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.Hosting, etc.) from version 10.0.x to 10.0.2 for consistency and potential bug fixes.Google.Protobufto 3.33.5,Grpc.Net.Clientto 2.76.0,Grpc.Toolsto 2.78.0, andGrpc.AspNetCore.Serverto 2.76.0, ensuring use of the latest stable versions.Supporting library updates:
Microsoft.Bcl.AsyncInterfacesandSystem.Text.Json: Upgraded to 10.0.2 for improved async support and JSON serialization.Testing and analysis packages:
BenchmarkDotNetentry and ensured version 0.15.8 is used.…ing sampleWhy is this change needed?
Issues / work items
Project checklist
release_notes.mdAI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
AI verification (required if AI was used):
Testing
Automated tests
Manual validation (only if runtime/behavior changed)
Environment (OS, .NET version, components): OSX .NET 10
Evidence (optional):
Notes for reviewers