Skip to content

Enable tracing for RabbitMQ Component (v7)#15659

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/enable-tracing-rabbitmq-component
Draft

Enable tracing for RabbitMQ Component (v7)#15659
Copilot wants to merge 2 commits intomainfrom
copilot/enable-tracing-rabbitmq-component

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

RabbitMQ.Client v7 ships built-in OpenTelemetry activity sources (RabbitMQ.Client.Publisher and RabbitMQ.Client.Subscriber). The code to register these sources via AddSource("RabbitMQ.Client.*") was already in place for v7 but lacked conformance tests and documentation.

Changes

ConformanceTests.cs

  • Set ActivitySourceName conditionally: "Aspire.RabbitMQ.Client" for v6, "RabbitMQ.Client.Publisher" for v7
  • Added TracingEnablesTheRightActivitySource / TracingEnablesTheRightActivitySource_Keyed tests (v7 only via #if !RABBITMQ_V6), following the same pattern as Npgsql/MySqlConnector
  • Custom RunActivitySourceTest instead of base class ActivitySourceTest: IConnection creation generates connection activities before TriggerActivity is called, which breaks the base class Assert.Empty check — the custom method clears those before asserting on publisher activities
  • Refactored PopulateConfiguration to use a stored ConnectionString property (required to pass the connection string into the RemoteExecutor subprocess)

README.md

  • Added Observability section documenting the three activity sources (Aspire.RabbitMQ.Client, RabbitMQ.Client.Publisher, RabbitMQ.Client.Subscriber)
  • Fixed Usage example: _AppHost.cs__Program.cs_

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ment activity sources

Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/e76fd16a-3b81-420a-88f1-bc598cf74a4d

Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable tracing for RabbitMQ component with v7 Enable tracing for RabbitMQ Component (v7) Mar 27, 2026
Copilot AI requested a review from maddymontaquila March 27, 2026 23:49
@maddymontaquila
Copy link
Copy Markdown
Collaborator

@eerhardt i thought this might be an easy one but feels like slop lol. are we up to date w rabbitmq and does it have tracing now?

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.

Enable Tracing for RabbitMQ Component when we move to their v7

2 participants