fix(cloud-tasks): restore gRPC server trace spans - #548
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughCloud Tasks adds Micrometer gRPC server observation instrumentation and verifies OpenTelemetry server spans from a real health-check request. Test dependencies and runtime port capture are updated, while JWT helpers use URI-based URL conversion. ChangesgRPC tracing
JWT URL conversion
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant HealthGrpc as HealthGrpc client
participant GrpcServer as actuator gRPC server
participant Interceptor as ObservationGrpcServerInterceptor
participant ObservationRegistry
participant SpanCapture as captured spans
HealthGrpc->>GrpcServer: Send Health check
GrpcServer->>Interceptor: Process inbound RPC
Interceptor->>ObservationRegistry: Record server observation
ObservationRegistry->>SpanCapture: Export RPC span
SpanCapture-->>HealthGrpc: Assert service, method, and status
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
🛡️ CodeQL Analysis🚨 Found 3 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-07-29 21:54:39 UTC | Commit: b02acff |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/control-plane-services/cloud-tasks/nvct-core/src/test/java/com/nvidia/nvct/actuator/ActuatorTracingIntegrationTest.java`:
- Around line 125-133: Add a per-RPC deadline to the HealthGrpc blocking stub
before invoking check in ActuatorTracingIntegrationTest, using
withDeadlineAfter(...) with an appropriate short timeout and time unit so a
stalled local server fails fast while preserving the existing channel shutdown
behavior.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 91ba64e4-b4db-4211-92e4-6e8aa9778265
📒 Files selected for processing (5)
src/control-plane-services/cloud-tasks/nvct-core/BUILD.bazelsrc/control-plane-services/cloud-tasks/nvct-core/src/main/java/com/nvidia/nvct/configuration/GrpcConfiguration.javasrc/control-plane-services/cloud-tasks/nvct-core/src/test/java/com/nvidia/nvct/actuator/ActuatorTracingIntegrationTest.javasrc/control-plane-services/cloud-tasks/nvct-core/src/test/java/com/nvidia/nvct/actuator/ActuatorTracingTestConfiguration.javasrc/control-plane-services/cloud-tasks/nvct-core/src/test/java/com/nvidia/nvct/util/NotaryServiceResponseTransformer.java
ec4d4d9 to
208c699
Compare
208c699 to
8b6bd88
Compare
Register a global Micrometer observation interceptor so inbound gRPC requests produce OpenTelemetry server spans. Add integration coverage for the RPC service, method, status code, and server span kind attributes. Fixes #547 Signed-off-by: Sanjay Saxena <sasaxena@nvidia.com>
8b6bd88 to
932c2d5
Compare
TL;DR
Restore gRPC server trace spans for Cloud Tasks by registering Micrometer's
OpenTelemetry-compatible observation interceptor and adding regression coverage
for the exported RPC attributes.
Additional Details
ObservationGrpcServerInterceptoras a global gRPC serverinterceptor using the application's existing
ObservationRegistry.not create duplicate spans.
exported span kind, RPC service, RPC method, and gRPC status code.
does not depend on a fixed port.
dependencies; no third-party dependency or version was added.
URL(String)calls found during test compilation withURI.create(...).toURL().For the Reviewer
Please pay particular attention to:
GrpcConfiguration.rpc.service,rpc.method, andgrpc.status_code.For QA
Validated locally with Bazel 9.1.1:
bazel build //src/control-plane-services/cloud-tasks/nvct-core:nvct_core //src/control-plane-services/cloud-tasks/nvct-core:testspasses.bazel test //src/control-plane-services/cloud-tasks/nvct-core:tests --test_filter=ActuatorTracingIntegrationTestpasses.git diff --checkpasses.No additional QA is needed.
Issues
Fixes #547
Checklist
Summary by CodeRabbit