Skip to content

Conversation

@hey-pebble
Copy link

@hey-pebble hey-pebble bot commented Jun 12, 2025

Description

This PR updates the Agent to use the latest Azure ServiceBus library (v7.14.2) to match the implementation in APIm-Backend-Taskqueues' browser-agent. The update includes:

  • Upgrading azure-servicebus to version 7.14.2 in requirements.in/requirements.txt
  • Refactoring ServiceBus usage in apimetrics_agent/command_line.py from deprecated QueueClient/old APIs to the new ServiceBusClient and modern receiver iteration methods.
  • No changes required to configuration handling.
  • Ensured parity in queue consumption with the APIm-Backend-Taskqueues browser-agent.

Testing

  • Manual test instructions: Run the agent as normal against a ServiceBus queue (with known messages). Ensure agent starts, registers, and processes queue items as expected. No API/config changes required.
  • CI will confirm requirements installation and basic packaging integrity.

Reviewer notes

  • All dead/legacy patterns were left intact per contribution guidelines; changes focused only on ServiceBus/requirements modernization.
  • Please see browser-agent in APIm-Backend-Taskqueues for the matching usage pattern.

Closes DS-4619.

…dern ServiceBusClient

- Update requirements.in and requirements.txt to require azure-servicebus >= 7.14.2
- Refactor apimetrics_agent/command_line.py to use ServiceBusClient and Receiver API instead of deprecated QueueClient.
- Update configs and environment usage as appropriate (no config logic change was needed).
- This matches ServiceBus usage in APIm-Backend-Taskqueues browser-agent for parity.
- Testing instructions and notes provided in PR body for reviewer convenience.
import argparse
from azure.servicebus import QueueClient

from azure.servicebus import ServiceBusClient

Choose a reason for hiding this comment

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

These changes are in the wrong repository. Can you do this in APIm-Agent instead?

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.

2 participants