Skip to content

Enable tracing for RabbitMQ Component (v7)#15659

Merged
eerhardt merged 4 commits intomainfrom
copilot/enable-tracing-rabbitmq-component
Apr 13, 2026
Merged

Enable tracing for RabbitMQ Component (v7)#15659
eerhardt merged 4 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.

Description

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

  • Fixed Usage example: _AppHost.cs__Program.cs_

src/Components/Telemetry.md

  • Added RabbitMQ.Client.Publisher and RabbitMQ.Client.Subscriber to the Aspire.RabbitMQ.Client entry (noting they are RabbitMQ.Client v7+ only)

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
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

✨ 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
Contributor

@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?

Comment thread tests/Aspire.RabbitMQ.Client.Tests/ConformanceTests.cs
Comment thread tests/Aspire.RabbitMQ.Client.Tests/ConformanceTests.cs
Comment thread src/Components/Aspire.RabbitMQ.Client/README.md Outdated
Comment thread tests/Aspire.RabbitMQ.Client.Tests/ConformanceTests.cs
@maddymontaquila
Copy link
Copy Markdown
Contributor

@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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 6, 2026

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:

  • dnceng.pkgs.visualstudio.com
    • Triggering command: /home/REDACTED/work/aspire/aspire/.dotnet/dotnet /home/REDACTED/work/aspire/aspire/.dotnet/dotnet build tests/Aspire.RabbitMQ.Client.Tests/Aspire.RabbitMQ.Client.Tests.csproj /p:TreatWarningsAsErrors=false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@eerhardt eerhardt marked this pull request as ready for review April 6, 2026 20:56
Copilot AI review requested due to automatic review settings April 6, 2026 20:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15659

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15659"

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 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 ActivitySourceName for 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>
@github-actions
Copy link
Copy Markdown
Contributor

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.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@eerhardt eerhardt merged commit 7892900 into main Apr 13, 2026
551 of 555 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 69 recordings uploaded (commit 54e39a3)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24357511315

@sebastienros sebastienros deleted the copilot/enable-tracing-rabbitmq-component branch April 13, 2026 19:22
@joperezr joperezr added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 14, 2026
* 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>
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

6 participants