Skip to content

Add OpenTelemetry sample and update deps#637

Merged
torosent merged 8 commits intomainfrom
torosent/add-otel-sample
Feb 27, 2026
Merged

Add OpenTelemetry sample and update deps#637
torosent merged 8 commits intomainfrom
torosent/add-otel-sample

Conversation

@torosent
Copy link
Member

@torosent torosent commented Feb 7, 2026

This pull request updates several package dependencies in the Directory.Packages.props file 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.* packages: Upgraded all related packages (such as 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.
  • gRPC and Protobuf packages: Updated Google.Protobuf to 3.33.5, Grpc.Net.Client to 2.76.0, Grpc.Tools to 2.78.0, and Grpc.AspNetCore.Server to 2.76.0, ensuring use of the latest stable versions.

Supporting library updates:

  • Microsoft.Bcl.AsyncInterfaces and System.Text.Json: Upgraded to 10.0.2 for improved async support and JSON serialization.

Testing and analysis packages:

  • Removed duplicate BenchmarkDotNet entry and ensured version 0.15.8 is used.…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.

Why is this change needed?

  • Adding sample

Issues / work items

  • Resolves #
  • Related #

Project checklist

  • Release notes are not required for the next release
    • Otherwise: Notes added to release_notes.md
  • Backport is not required
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • All required tests have been added/updated (unit tests, E2E tests)
  • Breaking change?
    • If yes:
      • Impact:
      • Migration guidance:

AI-assisted code disclosure (required)

Was an AI tool used? (select one)

  • No
  • Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
  • Yes, an AI agent generated most of this PR

If AI was used:

  • Tool(s): Copilot CLI - Opus 4.6
  • AI-assisted areas/files: All

AI verification (required if AI was used):

  • I understand the code and can explain it
  • I verified referenced APIs/types exist and are correct
  • I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
  • I reviewed concurrency/async behavior
  • I checked for unintended breaking or behavior changes

Testing

Automated tests

  • Result: Passed

Manual validation (only if runtime/behavior changed)

  • Environment (OS, .NET version, components): OSX .NET 10

  • Evidence (optional):

image image

Notes for reviewers

  • N/A

Copilot AI review requested due to automatic review settings February 7, 2026 03:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DistributedTracingSample demonstrating 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).

Copilot AI review requested due to automatic review settings February 7, 2026 03:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

torosent and others added 4 commits February 27, 2026 11:52
…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>
@torosent torosent force-pushed the torosent/add-otel-sample branch from 4c8c470 to 55f978f Compare February 27, 2026 19:52
@torosent
Copy link
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 27, 2026

@torosent I've opened a new pull request, #649, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI review requested due to automatic review settings February 27, 2026 19:58
Copy link
Contributor

Copilot AI commented Feb 27, 2026

@torosent I've opened a new pull request, #650, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 27, 2026 20:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


<ItemGroup>
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.2" />
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" />
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" />
<PackageReference Include="Google.Protobuf" />

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +46
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:
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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:

Copilot uses AI. Check for mistakes.

<ItemGroup>
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.2" />
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" />
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.5" />
<PackageReference Include="Google.Protobuf" />

Copilot uses AI. Check for mistakes.
@torosent torosent merged commit 838ca21 into main Feb 27, 2026
7 checks passed
@torosent torosent deleted the torosent/add-otel-sample branch February 27, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants