OpenTelemetry#443
Conversation
[build image]
# Conflicts: # backend/src/main/resources/application.properties
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
WalkthroughReplaces Micrometer/Prometheus observability with OpenTelemetry: swaps POM dependency to Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 32 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@charts/cryptomator-hub/README.md`:
- Line 32: Update the Quick Start sentence that mentions "contour" to reference
"nginx" so it matches the command flag ingress.controller=nginx shown in the
diff; locate the README.md Quick Start paragraph and replace the word "contour"
(or any reference to Contour) with "nginx" to ensure the description and the
--set ingress.controller=nginx flag are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1df676fb-17f4-4249-a718-078ffb28538b
📒 Files selected for processing (17)
backend/pom.xmlbackend/src/main/java/org/cryptomator/hub/metrics/SystemUsageMetrics.javabackend/src/main/java/org/cryptomator/hub/metrics/VaultUnlockMetrics.javabackend/src/main/resources/application.propertiescharts/cryptomator-hub/README.mdcharts/cryptomator-hub/templates/NOTES.txtcharts/cryptomator-hub/templates/_helpers.tplcharts/cryptomator-hub/templates/hub-configmap.yamlcharts/cryptomator-hub/templates/hub-deployment.yamlcharts/cryptomator-hub/templates/hub-metrics-secret.yamlcharts/cryptomator-hub/templates/hub-secret.yamlcharts/cryptomator-hub/templates/ingress-contour.yamlcharts/cryptomator-hub/templates/ingress-nginx.yamlcharts/cryptomator-hub/templates/ingress-traefik.yamlcharts/cryptomator-hub/templates/keycloak-secret.yamlcharts/cryptomator-hub/templates/postgres-secret.yamlcharts/cryptomator-hub/values.yaml
💤 Files with no reviewable changes (4)
- charts/cryptomator-hub/templates/ingress-nginx.yaml
- charts/cryptomator-hub/templates/ingress-contour.yaml
- charts/cryptomator-hub/templates/_helpers.tpl
- charts/cryptomator-hub/templates/ingress-traefik.yaml
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@charts/cryptomator-hub/values-prod.yaml`:
- Around line 11-16: The production Helm values set the Hub pod resources to
cpu: 50m, memory requests: 16Mi and limits: 32Mi which is far too low for a JVM
service; update the resources block (resources -> requests.memory and resources
-> limits.memory) for the Hub to realistic values (suggest at least
requests.memory: 256Mi and limits.memory: 512Mi or align with Keycloak’s
512Mi/1Gi) and confirm these are intentional rather than a typo (e.g.,
160Mi/320Mi); keep cpu as needed and ensure the changes appear in the same
resources/requests and resources/limits keys so they apply correctly.
In `@charts/cryptomator-hub/values.yaml`:
- Around line 39-49: The chart disables telemetry by default causing
QUARKUS_OTEL_SDK_DISABLED to be set and breaking observability; update
charts/cryptomator-hub/values.yaml so metrics.enabled defaults to true (i.e. set
metrics.enabled: true) and ensure any related defaults or templating that sets
QUARKUS_OTEL_SDK_DISABLED honor metrics.enabled (check templates that reference
hub.metrics.enabled or QUARKUS_OTEL_SDK_DISABLED) so fresh installs/exporters
remain active unless explicitly turned off.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dc49c902-1232-48f6-b68b-fa01b1c9d4ac
📒 Files selected for processing (4)
charts/cryptomator-hub/Chart.yamlcharts/cryptomator-hub/values-dev.yamlcharts/cryptomator-hub/values-prod.yamlcharts/cryptomator-hub/values.yaml
💤 Files with no reviewable changes (1)
- charts/cryptomator-hub/values-dev.yaml
✅ Files skipped from review due to trivial changes (1)
- charts/cryptomator-hub/Chart.yaml
There was a problem hiding this comment.
Pull request overview
This PR migrates the Hub backend and Helm chart from Micrometer/Prometheus scraping (/q/metrics) to OpenTelemetry (OTel) with OTLP push-based telemetry (metrics/traces/logs), and updates chart/docs accordingly.
Changes:
- Replaced Micrometer/Prometheus dependencies and instrumentation with OpenTelemetry metrics API and added span annotations to key operations.
- Updated Helm chart to remove the metrics ingress/scrape endpoint and configure OTLP exporter settings + optional Basic Auth headers.
- Updated chart documentation and defaults to reflect the new telemetry model.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| charts/cryptomator-hub/values.yaml | Replaces metrics scrape settings with OTLP telemetry configuration; adjusts default resource requests/limits. |
| charts/cryptomator-hub/values-prod.yaml | Updates production resource requests/limits to match new defaults. |
| charts/cryptomator-hub/values-dev.yaml | Removes dev postgres resource overrides. |
| charts/cryptomator-hub/templates/postgres-secret.yaml | Adds helm.sh/resource-policy: keep annotation to secret. |
| charts/cryptomator-hub/templates/keycloak-secret.yaml | Adds helm.sh/resource-policy: keep annotation to secret. |
| charts/cryptomator-hub/templates/hub-secret.yaml | Adds helm.sh/resource-policy: keep annotation to secret. |
| charts/cryptomator-hub/templates/hub-metrics-secret.yaml | Changes to OTLP Basic Auth secret + derived OTLP headers value; adds keep policy. |
| charts/cryptomator-hub/templates/hub-deployment.yaml | Injects OTLP headers env var and secret checksum when Basic Auth is configured. |
| charts/cryptomator-hub/templates/hub-configmap.yaml | Switches from Micrometer env var to OTel OTLP exporter/env configuration. |
| charts/cryptomator-hub/templates/ingress-traefik.yaml | Removes metrics ingress/middleware for /q/metrics. |
| charts/cryptomator-hub/templates/ingress-nginx.yaml | Removes metrics ingress/auth for /q/metrics. |
| charts/cryptomator-hub/templates/ingress-contour.yaml | Removes metrics routing for /q/metrics. |
| charts/cryptomator-hub/templates/_helpers.tpl | Removes helper for auto-generated metrics password (no longer needed). |
| charts/cryptomator-hub/templates/NOTES.txt | Removes metrics endpoint/credentials output; adds telemetry output. |
| charts/cryptomator-hub/README.md | Updates chart docs from scrape-based metrics to OTLP telemetry configuration. |
| charts/cryptomator-hub/Chart.yaml | Updates appVersion (image tag source) to a short SHA. |
| backend/src/main/resources/application.properties | Removes Micrometer config; enables OTel metrics/logs and disables OTel SDK in tests. |
| backend/src/main/java/org/cryptomator/hub/metrics/VaultUnlockMetrics.java | Replaces Micrometer counter/gauges with OTel instruments. |
| backend/src/main/java/org/cryptomator/hub/metrics/SystemUsageMetrics.java | Replaces scheduled Micrometer gauges with OTel observable gauges and callbacks. |
| backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java | Adds @WithSpan to key license flows. |
| backend/src/main/java/org/cryptomator/hub/keycloak/KeycloakAuthorityPuller.java | Adds @WithSpan to scheduled sync. |
| backend/src/main/java/org/cryptomator/hub/keycloak/KeycloakAdminService.java | Adds @WithSpan to key admin operations. |
| backend/src/main/java/org/cryptomator/hub/entities/EffectiveVaultAccess.java | Adds @WithSpan to a repository query method. |
| backend/src/main/java/org/cryptomator/hub/entities/EffectiveGroupMembership.java | Adds @WithSpan to repository update methods. |
| backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java | Adds @WithSpan to audit log endpoint handler. |
| backend/pom.xml | Replaces Micrometer dependencies with quarkus-opentelemetry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
to avoid unnecessary pod restarts
This pull request migrates the Cryptomator Hub backend and Helm chart from Micrometer/Prometheus metrics to OpenTelemetry (OTel) for metrics, traces, and logs. It removes the
/q/metricsscrape endpoint and all related configuration, replacing it with OTLP push-based telemetry. The Helm chart and documentation are updated to reflect these changes, including new configuration options for OTLP endpoints and authentication.Backend migration to OpenTelemetry:
quarkus-opentelemetry) inpom.xmland updated all metric instrumentation inSystemUsageMetricsandVaultUnlockMetricsto use the OTel API instead of Micrometer. [1] [2] [3] [4] [5] [6]application.propertiesto remove Micrometer/Prometheus settings and enable OTel metrics/logs.Helm chart and deployment changes:
/q/metricsendpoint, ingress, and secret management for Prometheus scraping; added configuration for OTLP endpoint, protocol, resource attributes, and authentication headers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Documentation updates:
README.mdto document the migration from metrics scraping to push-based OTel telemetry, including new configuration options and removal of legacy endpoints. [1] [2]Other:
contourtonginx.helm.sh/resource-policy: keepannotation to secrets for improved resource management. [1] [2]These changes modernize telemetry support, improve compatibility with observability platforms, and simplify metrics configuration and deployment.