Conversation
…ase, and Cache services Instrument the following high-value methods with spans following the existing tracing pattern (otel.Tracer + defer span.End + span.RecordError): - StorageService: Upload, Download, CreateBucket, DeleteBucket - FunctionService: CreateFunction, InvokeFunction, GetFunctionLogs - DatabaseService: CreateDatabase, RestoreDatabase, doRotateCredentials - CacheService: CreateCache, GetCacheStats Uses tracer name constants (e.g. "storage-service") for consistency with existing otelgin middleware and pkg/tracing infrastructure. Closes #339.
|
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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ 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 9 minutes and 40 seconds.Comment |
Summary
Instrument StorageService, FunctionService, DatabaseService, and CacheService with OpenTelemetry spans for improved observability. Closes #339.
This supersedes PR #369 (now closed — it accidentally included unrelated resource-limit changes).
Changes
storage-service):Upload,Download,CreateBucket,DeleteBucketfunction-service):CreateFunction,InvokeFunction,GetFunctionLogsdatabase-service):CreateDatabase,RestoreDatabase,doRotateCredentialscache-service):CreateCache,GetCacheStatsImplementation
Each method follows the established OTel pattern:
Uses
_for the span-wrapped context to avoid propagating trace context into repo/mock calls (which would break mock equality assertions in unit tests).Test Plan
go build ./internal/core/services/...go test ./internal/core/services/... -count=1(all pass)Verification
With
TRACING_ENABLED=trueand Jaeger running locally, traces will appear athttp://localhost:16686.