Skip to content

Add WithOtlpExporter() to infrastructure resources in Boilerplate AppHost (#12336)#12337

Merged
yasmoradi merged 1 commit into
developfrom
12336
May 16, 2026
Merged

Add WithOtlpExporter() to infrastructure resources in Boilerplate AppHost (#12336)#12337
yasmoradi merged 1 commit into
developfrom
12336

Conversation

@yasmoradi
Copy link
Copy Markdown
Member

@yasmoradi yasmoradi commented May 16, 2026

closes #12336

Summary

Infrastructure resources in Boilerplate.Server.AppHost/Program.cs were missing .WithOtlpExporter(), so their telemetry (traces, metrics, logs) was not exported to the Aspire dashboard.

This PR adds .WithOtlpExporter() to:

  • redis-cache and redis-persistent
  • sqlserver (SqlServer)
  • postgresserver (PostgreSQL)
  • mysqlserver (MySQL)
  • s3 (Minio)
  • keycloak

Summary by CodeRabbit

  • Chores
    • Enhanced infrastructure observability with OpenTelemetry OTLP exporting enabled for Redis caching, database services, object storage, and authentication components, providing improved system monitoring and visibility.

Review Change Stack

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 830ee9fb-c28b-4859-976c-1b01e640dc84

📥 Commits

Reviewing files that changed from the base of the PR and between aa89337 and 5f5aa87.

📒 Files selected for processing (1)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Program.cs

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting


Walkthrough

This PR enables OpenTelemetry OTLP exporting for infrastructure resources in the Aspire app host by adding .WithOtlpExporter() to Redis cache, persistent Redis, PostgreSQL, MySQL, S3/MinIO, and Keycloak service builders. SQL Server configuration is updated to include .WithDbGate(config => config.WithDataVolume()) alongside the new OTLP exporter method.

Changes

Infrastructure OTLP Exporting

Layer / File(s) Summary
Compiler directive update
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Program.cs
Minor update to top-level compiler directive marker.
Cache infrastructure OTLP exporting
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Program.cs
.WithOtlpExporter() added to Redis cache and persistent Redis service chains to export telemetry to the Aspire dashboard.
Database infrastructure OTLP exporting and SQL Server gate config
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Program.cs
.WithOtlpExporter() added to SQL Server, PostgreSQL, and MySQL service builders; SQL Server configuration refactored to include .WithDbGate(config => config.WithDataVolume()) for data volume handling.
External services OTLP exporting
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Program.cs
.WithOtlpExporter() added to S3/MinIO and Keycloak service builders to enable observability data visibility in the dashboard.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through telemetry streams,
Adding exporters to infrastructure dreams,
Redis, databases, and services bright,
Now all talk to Aspire in OpenTel sight!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 12336

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yasmoradi yasmoradi merged commit 51ac3a5 into develop May 16, 2026
6 of 7 checks passed
@yasmoradi yasmoradi deleted the 12336 branch May 16, 2026 11:04
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.

Add WithOtlpExporter() to infrastructure resources in Boilerplate AppHost

1 participant