Skip to content

feat(observability): OpenTelemetry metrics (Prometheus) + tracing (OTLP)#32

Merged
kashkoool merged 1 commit into
mainfrom
feat/observability
Jun 3, 2026
Merged

feat(observability): OpenTelemetry metrics (Prometheus) + tracing (OTLP)#32
kashkoool merged 1 commit into
mainfrom
feat/observability

Conversation

@kashkoool

Copy link
Copy Markdown
Owner

What

Production observability via OpenTelemetry.

  • Metrics: ASP.NET Core + HttpClient + .NET runtime instrumentation plus custom business counters (payments succeeded/failed, bookings confirmed) over a Meter, exposed at GET /metrics for Prometheus. Gated by Observability:Metrics:Enabled (default on) and intended to be reached only from the internal network — firewall/proxy it (documented).
  • Tracing: ASP.NET Core + HttpClient spans, exported via OTLP only when Observability:Otlp:Endpoint is configured (no noisy export failures when unset).
  • IAppMetrics (Application abstraction) → AppMetrics (API Meter) wired into the payment webhook handler so payment/booking outcomes are recorded.
  • Packages pinned in Directory.Packages.props (OpenTelemetry 1.15.x). Config in appsettings.json + .env.example. Serilog request logging stays.

Tests

ObservabilityTests: /metrics serves Prometheus text (OpenTelemetry boots OK). 53 unit + 33 integration green; 0 warnings.

Final phase of the roadmap (indexes ✅ → Google OAuth ✅ → staff ✅ → payments ✅ → notifications/real-time ✅ → reports/demand ✅ → observability). Cloud hosting/IaC remains deferred by decision.

Production observability via OpenTelemetry.

- Metrics: ASP.NET Core + HttpClient + .NET runtime instrumentation plus custom
  business counters (payments succeeded/failed, bookings confirmed) over a Meter,
  exposed at GET /metrics for Prometheus. Gated by Observability:Metrics:Enabled
  (default on); intended to be reached only from the internal network (firewall /
  proxy it — documented).
- Tracing: ASP.NET Core + HttpClient spans, exported via OTLP only when
  Observability:Otlp:Endpoint is configured (no noisy export failures when unset).
- IAppMetrics (Application abstraction) → AppMetrics (Api Meter) wired into the
  payment webhook handler so payment/booking outcomes are recorded.
- Packages pinned in Directory.Packages.props (OpenTelemetry 1.15.x). Config in
  appsettings + .env.example. Serilog request logging stays.

53 unit + 33 integration green (/metrics serves Prometheus text); 0 warnings.
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kashkoool, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d94cc2b-8b79-44a4-960e-1c0874864797

📥 Commits

Reviewing files that changed from the base of the PR and between 274ddae and 54fea98.

📒 Files selected for processing (10)
  • .env.example
  • Directory.Packages.props
  • src/TransportPlatform.Api/Observability/AppMetrics.cs
  • src/TransportPlatform.Api/Observability/ObservabilityExtensions.cs
  • src/TransportPlatform.Api/Program.cs
  • src/TransportPlatform.Api/TransportPlatform.Api.csproj
  • src/TransportPlatform.Api/appsettings.json
  • src/TransportPlatform.Application/Abstractions/IAppMetrics.cs
  • src/TransportPlatform.Application/Payments/ProcessPaymentWebhook.cs
  • tests/TransportPlatform.IntegrationTests/ObservabilityTests.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/observability

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.

@kashkoool kashkoool merged commit 279b2a9 into main Jun 3, 2026
9 checks passed
@kashkoool kashkoool deleted the feat/observability branch June 3, 2026 03:06
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.

1 participant