Skip to content

removing instrumentor call for azure monitor samples#41068

Merged
M-Hietala merged 6 commits intomainfrom
m-hietala/removing_instrumentor_call_from_samples_for_azure_monitor_tracing
May 14, 2025
Merged

removing instrumentor call for azure monitor samples#41068
M-Hietala merged 6 commits intomainfrom
m-hietala/removing_instrumentor_call_from_samples_for_azure_monitor_tracing

Conversation

@M-Hietala
Copy link
Contributor

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings May 13, 2025 19:03
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 pull request removes the usage of AIAgentsInstrumentor in the Azure Monitor tracing samples to simplify telemetry initialization and reduce overhead.

  • Removed try-except blocks that called AIAgentsInstrumentor.instrument() from all relevant sample files.
  • Updated multiple sample files by omitting the instrumentation call in favor of directly configuring Azure Monitor.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py Removed redundant instrumentation call
sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_stream_eventhandler_with_azure_monitor_tracing.py Removed redundant instrumentation call
sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_with_azure_monitor_tracing.py Removed redundant instrumentation call
sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py Removed redundant instrumentation call
sdk/ai/azure-ai-agents/samples/agents_multiagent/utils/agent_trace_configurator.py Removed redundant instrumentation call

@github-actions
Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-agents

@M-Hietala M-Hietala merged commit 41db3b2 into main May 14, 2025
20 checks passed
@M-Hietala M-Hietala deleted the m-hietala/removing_instrumentor_call_from_samples_for_azure_monitor_tracing branch May 14, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants