Enable tracing for RabbitMQ Component (v7)#15659
Conversation
…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>
|
@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? |
|
@copilot Can you tag eric erhardt to review this PR? |
…d sources to Telemetry.md Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/aeb55942-93e5-44aa-b450-be5dee804b2b Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15659Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15659" |
There was a problem hiding this comment.
Pull request overview
This PR updates the RabbitMQ client integration to align tracing conformance tests and documentation with RabbitMQ.Client v7’s built-in OpenTelemetry ActivitySources, ensuring the correct source(s) are enabled and documented.
Changes:
- Updated RabbitMQ conformance tests to validate the correct
ActivitySourceNamefor v6 vs v7 and added v7-only activity source conformance tests (including keyed registrations). - Refactored test configuration setup to persist and pass the connection string into the RemoteExecutor subprocess.
- Updated component docs to correctly reference usage in
_Program.cs_and expanded Telemetry.md to list RabbitMQ.Client v7+ activity sources.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Aspire.RabbitMQ.Client.Tests/ConformanceTests.cs | Adds v7 tracing conformance tests and fixes remote execution/configuration to validate correct activity sources. |
| src/Components/Telemetry.md | Documents additional RabbitMQ.Client v7+ activity sources (Publisher/Subscriber) alongside the Aspire source. |
| src/Components/Aspire.RabbitMQ.Client/README.md | Fixes usage guidance to reference _Program.cs_ rather than _AppHost.cs_. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
🎬 CLI E2E Test Recordings — 69 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24357511315 |
* Initial plan * Enable tracing for RabbitMQ Component: add conformance tests and document 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> * Address review feedback: remove Observability section from README, add sources to Telemetry.md Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/aeb55942-93e5-44aa-b450-be5dee804b2b Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
RabbitMQ.Client v7 ships built-in OpenTelemetry activity sources (
RabbitMQ.Client.PublisherandRabbitMQ.Client.Subscriber). The code to register these sources viaAddSource("RabbitMQ.Client.*")was already in place for v7 but lacked conformance tests and documentation.Description
Changes
ConformanceTests.csActivitySourceNameconditionally:"Aspire.RabbitMQ.Client"for v6,"RabbitMQ.Client.Publisher"for v7TracingEnablesTheRightActivitySource/TracingEnablesTheRightActivitySource_Keyedtests (v7 only via#if !RABBITMQ_V6), following the same pattern as Npgsql/MySqlConnectorRunActivitySourceTestinstead of base classActivitySourceTest:IConnectioncreation generates connection activities beforeTriggerActivityis called, which breaks the base classAssert.Emptycheck — the custom method clears those before asserting on publisher activitiesPopulateConfigurationto use a storedConnectionStringproperty (required to pass the connection string into theRemoteExecutorsubprocess)README.md_AppHost.cs_→_Program.cs_src/Components/Telemetry.mdRabbitMQ.Client.PublisherandRabbitMQ.Client.Subscriberto theAspire.RabbitMQ.Cliententry (noting they are RabbitMQ.Client v7+ only)Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue:✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.