Skip to content

[azsdk-cli] Add open telemetry#11934

Merged
benbp merged 2 commits into
Azure:mainfrom
benbp:benbp/azsdk-cli-otl
Sep 5, 2025
Merged

[azsdk-cli] Add open telemetry#11934
benbp merged 2 commits into
Azure:mainfrom
benbp:benbp/azsdk-cli-otl

Conversation

@benbp
Copy link
Copy Markdown
Member

@benbp benbp commented Sep 3, 2025

No description provided.

@benbp benbp changed the title Add open telemetry [azsdk-cli] Add open telemetry Sep 3, 2025
@benbp benbp self-assigned this Sep 3, 2025
@benbp benbp added Central-EngSys This issue is owned by the Engineering System team. azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli labels Sep 3, 2025
@benbp benbp moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 3, 2025
@benbp benbp marked this pull request as ready for review September 4, 2025 20:35
Copilot AI review requested due to automatic review settings September 4, 2025 20:35
@benbp
Copy link
Copy Markdown
Member Author

benbp commented Sep 4, 2025

Going to update the console exporter to only log out for debug mode (or even hide it behind another flag), then I'll merge

Copy link
Copy Markdown
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 adds OpenTelemetry instrumentation to the azsdk-cli tool to enable distributed tracing and observability. The implementation replaces the existing custom TelemetryService with proper OpenTelemetry activities and spans.

Key changes:

  • Replaced custom TelemetryService with OpenTelemetry activities and instrumentation
  • Added OpenTelemetry package dependencies and configuration
  • Implemented activity-based tracing for tool invocations with proper error handling

Reviewed Changes

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

Show a summary per file
File Description
TelemetryWrapper.cs Replaced custom telemetry calls with OpenTelemetry activities and span instrumentation
ExampleTool.cs Fixed namespace reference for Azure.Core.TokenRequestContext
TelemetryService.cs Removed entire custom telemetry service implementation
Program.cs Added OpenTelemetry service registration and configuration
TelemetryProcessor.cs Added custom telemetry processor for post-processing activities
Constants.cs Added activity source constant and removed unused import
Azure.Sdk.Tools.Cli.csproj Added OpenTelemetry package references

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/HostServer/TelemetryWrapper.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Core/TelemetryProcessor.cs
@benbp benbp merged commit 46f1ad1 into Azure:main Sep 5, 2025
13 checks passed
@benbp benbp deleted the benbp/azsdk-cli-otl branch September 5, 2025 18:53
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli Central-EngSys This issue is owned by the Engineering System team.

Projects

Development

Successfully merging this pull request may close these issues.

4 participants