v1.0.34 - #91
Conversation
Add configurable business tracing profile
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Reviewer's GuideIntroduces a global tracing detail level (Business vs Verbose) that controls which spans are produced and exported, wires it into ASP.NET Core telemetry options, filters out pipeline-detail spans in Business mode, suppresses infrastructure diagnostic spans unless Verbose, and adds tests/docs for the behavior. Sequence diagram for telemetry initialization and diagnostic span filteringsequenceDiagram
participant AppConfiguration
participant AddAetherTelemetry
participant AetherTracingRuntime
participant TracerProviderBuilder as TracerProvider
participant BusinessSpanFilterProcessor as BusinessFilter
participant InfrastructureActivitySource as InfraSource
participant DistributedLockService as LockService
AppConfiguration->>AddAetherTelemetry: AddAetherTelemetry(services, configuration)
AddAetherTelemetry->>AetherTracingRuntime: Configure(opts.Tracing.DetailLevel)
alt DetailLevel == Business
AddAetherTelemetry->>TracerProvider: AddProcessor(BusinessSpanFilterProcessor)
else DetailLevel == Verbose
AddAetherTelemetry-->>TracerProvider: AddEntityFrameworkCoreInstrumentation()
end
LockService->>InfraSource: StartDiagnosticActivity("DistributedLock.Release", ActivityKind.Client, Activity.Current.Context)
InfraSource->>AetherTracingRuntime: IsVerbose
alt IsVerbose == true
InfraSource-->>LockService: Activity instance
else IsVerbose == false
InfraSource-->>LockService: null (no diagnostic span)
end
LockService-->>BusinessFilter: OnEnd(Activity) when span completes
BusinessFilter->>BusinessFilter: activity.DisplayName.StartsWith("[")
alt Business profile and pipeline detail
BusinessFilter->>BusinessFilter: activity.ActivityTraceFlags &= ~ActivityTraceFlags.Recorded
else Keep business span
BusinessFilter-->>LockService: span exported normally
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 41 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The global AetherTracingRuntime.DetailLevel is mutated in multiple tests, which can cause flaky results when xUnit runs tests in parallel; consider disabling parallelization for these test classes/assembly or isolating the runtime configuration behind a test-only lock or helper.
- The Dapr-specific HTTP filtering and enrichment logic in ShouldTraceHttpRequest/IsDaprDiagnosticRequest/EnrichHttpClientActivity uses many hard-coded path segments and rules; consider centralising these constants or extracting a dedicated helper to make future Dapr API changes easier to maintain and reason about.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The global AetherTracingRuntime.DetailLevel is mutated in multiple tests, which can cause flaky results when xUnit runs tests in parallel; consider disabling parallelization for these test classes/assembly or isolating the runtime configuration behind a test-only lock or helper.
- The Dapr-specific HTTP filtering and enrichment logic in ShouldTraceHttpRequest/IsDaprDiagnosticRequest/EnrichHttpClientActivity uses many hard-coded path segments and rules; consider centralising these constants or extracting a dedicated helper to make future Dapr API changes easier to maintain and reason about.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|



Summary by Sourcery
Introduce configurable tracing detail levels with business-focused default and align infrastructure diagnostics, HTTP client instrumentation, and aspects with the global tracing profile.
Enhancements:
Documentation:
Tests: