Add configurable business tracing profile - #90
Conversation
Reviewer's GuideIntroduces a global tracing detail level with a new Business default profile, wires it into telemetry configuration/runtime, gates infrastructure diagnostics and HTTP/Dapr spans on this profile, adds a business-span filter processor, and updates docs/tests accordingly. Flow diagram for configurable tracing detail level and Business profileflowchart LR
subgraph Config
A[appsettings.json
Telemetry:Tracing:DetailLevel]
end
subgraph AspNetCore
B[TelemetryOptions
AetherTracingOptions.DetailLevel]
C[AddAetherTelemetry]
D[AetherTracingRuntime.Configure]
E[BusinessSpanFilterProcessor]
end
subgraph Infrastructure
F[InfrastructureActivitySource
StartDiagnosticActivity]
G[EF Core instrumentation
AddEntityFrameworkCoreInstrumentation]
H[HTTP client instrumentation
FilterHttpRequestMessage
EnrichHttpClientActivity]
end
A --> B
B --> C
C --> D
D --> F
D --> G
D --> H
C --> E
D -. IsVerbose false .- E
D -. IsVerbose true .- G
D -. IsVerbose true .- F
D -. IsVerbose true .- H
H -. suppress Dapr diagnostics when Business .- A2[Filtered Dapr diagnostic requests]
E --> A3["Filter spans with DisplayName starting with [ ] (pipeline detail)"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughThe PR adds Business and Verbose tracing profiles. It configures OpenTelemetry instrumentation and filtering by profile, gates infrastructure diagnostic activities, enriches Dapr spans, and adds tests and documentation for the new behavior. ChangesTracing detail profiles
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Configuration
participant AetherTelemetryServiceCollectionExtensions
participant AetherTracingRuntime
participant OpenTelemetry
participant BusinessSpanFilterProcessor
participant InfrastructureActivitySource
Configuration->>AetherTelemetryServiceCollectionExtensions: register tracing options
AetherTelemetryServiceCollectionExtensions->>AetherTracingRuntime: Configure(DetailLevel)
AetherTelemetryServiceCollectionExtensions->>OpenTelemetry: configure profile-specific instrumentation
OpenTelemetry->>BusinessSpanFilterProcessor: process completed activities
BusinessSpanFilterProcessor-->>OpenTelemetry: clear Recorded for bracket-prefixed spans
InfrastructureActivitySource->>AetherTracingRuntime: read IsVerbose
InfrastructureActivitySource-->>OpenTelemetry: create diagnostic activity only in Verbose mode
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. Comment |
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- In
AetherTracingRuntime.Configure, theEnum.IsDefinedcall is using the wrong overload; it should pass the enum type (e.g.,Enum.IsDefined(typeof(AetherTracingDetailLevel), detailLevel)or the genericEnum.IsDefined(detailLevel)overload if available in your target framework) to avoid a compile error. - Consider tightening the Dapr-path detection in
IsDaprDiagnosticRequestby centralizing the path constants or patterns (e.g., precomputedHashSetof suffixes) to make it easier to maintain when new Dapr APIs are added and to avoid missing cases due to manual string lists.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `AetherTracingRuntime.Configure`, the `Enum.IsDefined` call is using the wrong overload; it should pass the enum type (e.g., `Enum.IsDefined(typeof(AetherTracingDetailLevel), detailLevel)` or the generic `Enum.IsDefined(detailLevel)` overload if available in your target framework) to avoid a compile error.
- Consider tightening the Dapr-path detection in `IsDaprDiagnosticRequest` by centralizing the path constants or patterns (e.g., precomputed `HashSet` of suffixes) to make it easier to maintain when new Dapr APIs are added and to avoid missing cases due to manual string lists.
## Individual Comments
### Comment 1
<location path="framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherTelemetryServiceCollectionExtensions.cs" line_range="42" />
<code_context>
}
section.Bind(opts);
+ AetherTracingRuntime.Configure(opts.Tracing.DetailLevel);
// Apply defaults and environment variables
</code_context>
<issue_to_address>
**issue (bug_risk):** Configure tracing detail level after all configuration sources (including environment) are applied.
Currently `AetherTracingRuntime.Configure` is called before defaults and environment-variable overrides are applied, so `AetherTracingRuntime.DetailLevel` may not match the final `opts.Tracing.DetailLevel`. Please move this call to after all configuration sources are applied so the runtime state reflects the effective tracing configuration.
</issue_to_address>
### Comment 2
<location path="framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherTelemetryServiceCollectionExtensions.cs" line_range="336-338" />
<code_context>
+ || path.StartsWith("/v1.0/configuration/", StringComparison.OrdinalIgnoreCase);
+ }
+
+ private static void EnrichHttpClientActivity(Activity activity, HttpRequestMessage request)
+ {
+ var segments = request.RequestUri?.AbsolutePath.Split('/', StringSplitOptions.RemoveEmptyEntries);
+ if (segments is not { Length: >= 5 }
+ || !string.Equals(segments[0], "v1.0", StringComparison.OrdinalIgnoreCase)
</code_context>
<issue_to_address>
**issue (bug_risk):** Guard against null RequestUri to avoid a potential NullReferenceException in the enricher.
Because the null-conditional applies only to `AbsolutePath`, `Split` is still invoked on a null string, which will throw. Please add an explicit guard (e.g., early return when `request.RequestUri` is null or assign `AbsolutePath` to a local variable and null-check before calling `Split`).
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| } | ||
|
|
||
| section.Bind(opts); | ||
| AetherTracingRuntime.Configure(opts.Tracing.DetailLevel); |
There was a problem hiding this comment.
issue (bug_risk): Configure tracing detail level after all configuration sources (including environment) are applied.
Currently AetherTracingRuntime.Configure is called before defaults and environment-variable overrides are applied, so AetherTracingRuntime.DetailLevel may not match the final opts.Tracing.DetailLevel. Please move this call to after all configuration sources are applied so the runtime state reflects the effective tracing configuration.
| private static void EnrichHttpClientActivity(Activity activity, HttpRequestMessage request) | ||
| { | ||
| var segments = request.RequestUri?.AbsolutePath.Split('/', StringSplitOptions.RemoveEmptyEntries); |
There was a problem hiding this comment.
issue (bug_risk): Guard against null RequestUri to avoid a potential NullReferenceException in the enricher.
Because the null-conditional applies only to AbsolutePath, Split is still invoked on a null string, which will throw. Please add an explicit guard (e.g., early return when request.RequestUri is null or assign AbsolutePath to a local variable and null-check before calling Split).
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.
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
`@framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs`:
- Around line 19-29: Reset process-wide tracing state safely in both affected
tests: in TraceDetailLevelTests.cs lines 19-29, save the initial
AetherTracingRuntime.DetailLevel on entry and restore it in finally; in
BusinessSpanFilterTests.cs lines 57-83, save and restore the tracing profile
around AddAetherTelemetry, or prevent that call from mutating the static. If
these mutating tests may run concurrently, place them in a non-parallel test
collection.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ec4d859a-7f11-4b4d-ba0a-f6496afe24cf
📒 Files selected for processing (15)
framework/docs/aspects/README.mdframework/docs/telemetry/README.mdframework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/BusinessSpanFilterProcessor.csframework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/TelemetryOptions.csframework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherTelemetryServiceCollectionExtensions.csframework/src/BBT.Aether.Core/BBT/Aether/Telemetry/AetherTracingProfile.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedCache/Dapr/DaprDistributedCacheService.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedCache/Redis/RedisDistributedCacheService.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Dapr/DaprDistributedLockHandle.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Dapr/DaprDistributedLockService.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Redis/RedisDistributedLockHandle.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Redis/RedisDistributedLockService.csframework/src/BBT.Aether.Infrastructure/BBT/Aether/Telemetry/InfrastructureActivitySource.csframework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.csframework/test/BBT.Aether.Postgres.Tests/BusinessSpanFilterTests.cs
| AetherTracingRuntime.Configure(AetherTracingDetailLevel.Business); | ||
|
|
||
| Assert.False(AetherTracingRuntime.IsVerbose); | ||
|
|
||
| AetherTracingRuntime.Configure(AetherTracingDetailLevel.Verbose); | ||
|
|
||
| Assert.True(AetherTracingRuntime.IsVerbose); | ||
| } | ||
| finally | ||
| { | ||
| AetherTracingRuntime.Configure(AetherTracingDetailLevel.Business); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check whether xUnit parallel execution is disabled or scoped by collections.
rg -n -C 3 'CollectionBehavior|DisableTestParallelization|parallelizeTestCollections|parallelizeAssembly' framework
# Find every process-wide tracing runtime mutation in tests.
rg -n -C 3 'AetherTracingRuntime\.Configure|AddAetherTelemetry\s*\(' framework/testRepository: burgan-tech/aether
Length of output: 156
🏁 Script executed:
#!/bin/bash
set -u
echo "== tracked test files matching targets =="
git ls-files 'framework/test/**/TraceDetailLevelTests.cs' 'framework/test/**/BusinessSpanFilterTests.cs' || true
echo "== all AetherTracingRuntime.Configure occurrences =="
rg -n -C 3 'AetherTracingRuntime\.Configure|AddAetherTelemetry\s*\(' framework/test || true
echo "== xUnit parallelization/collection attributes =="
rg -n -C 3 'CollectionBehavior|DisableTestParallelization|parallelizeTestCollections|parallelizeAssembly|Collection\s*\(' framework || trueRepository: burgan-tech/aether
Length of output: 50374
🏁 Script executed:
#!/bin/bash
set -u
echo "== AetherTracingRuntime definitions/usages =="
rg -n -C 3 'class AetherTracingRuntime|AetherTracingRuntime|AetherTracingDetailLevel|DetailLevel' framework/src framework/test || true
echo "== specific relevant files first 120 lines =="
for f in \
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs \
framework/test/BBT.Aether.Postgres.Tests/BusinessSpanFilterTests.cs \
framework/src/BBT.Aether.TestBase/BBT/Aether/Testing/TestBase.cs
do
echo "--- $f"
wc -l "$f"
sed -n '1,140p' "$f"
done
echo "== xUnit disabling settings in project files =="
rg -n -C 3 'DisableTestParallelization|CollectionBehavior|ParallelizeTestCollections|xunit.runner|ParallelizeAssembly' -g '*.csproj' -g 'Directory.*Props' -g '*.targets' framework || trueRepository: burgan-tech/aether
Length of output: 35911
Reset tracing state on entry and wrap telemetry configuration.
AetherTracingRuntime.Configure(...) changes a process-wide static and can affect later tests. Save the initial AetherTracingRuntime.DetailLevel and restore it in finally, including at framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs#L19-L29. In framework/test/BBT.Aether.Postgres.Tests/BusinessSpanFilterTests.cs#L57-L83, save and restore the tracing profile around AddAetherTelemetry, or make that call not mutate the static. If tests can run in parallel, put mutators in a non-parallel collection.
📍 Affects 2 files
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs#L19-L29(this comment)framework/test/BBT.Aether.Postgres.Tests/BusinessSpanFilterTests.cs#L57-L83
🤖 Prompt for 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.
In
`@framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs`
around lines 19 - 29, Reset process-wide tracing state safely in both affected
tests: in TraceDetailLevelTests.cs lines 19-29, save the initial
AetherTracingRuntime.DetailLevel on entry and restore it in finally; in
BusinessSpanFilterTests.cs lines 57-83, save and restore the tracing profile
around AddAetherTelemetry, or prevent that call from mutating the static. If
these mutating tests may run concurrently, place them in a non-parallel test
collection.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8e151778f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return path.StartsWith("/v1.0/state/", StringComparison.OrdinalIgnoreCase) | ||
| || path.StartsWith("/v1.0-alpha1/state/", StringComparison.OrdinalIgnoreCase) | ||
| || path.StartsWith("/v1.0-alpha1/lock/", StringComparison.OrdinalIgnoreCase) | ||
| || path.StartsWith("/v1.0/secrets/", StringComparison.OrdinalIgnoreCase) | ||
| || path.StartsWith("/v1.0/configuration/", StringComparison.OrdinalIgnoreCase); |
There was a problem hiding this comment.
Restrict Dapr route matching to the sidecar
In the Business profile, every outgoing HTTP request whose path starts with one of these prefixes is suppressed, regardless of its host. Consequently, a normal dependency request such as https://api.example.com/v1.0/state/orders/123 is mistaken for Dapr traffic and loses its service-boundary span. Check that the destination is the configured Dapr sidecar before applying these path-based exclusions.
Useful? React with 👍 / 👎.
| if (segments is not { Length: >= 5 } | ||
| || !string.Equals(segments[0], "v1.0", StringComparison.OrdinalIgnoreCase) | ||
| || !string.Equals(segments[1], "invoke", StringComparison.OrdinalIgnoreCase) | ||
| || !string.Equals(segments[3], "method", StringComparison.OrdinalIgnoreCase)) |
There was a problem hiding this comment.
Enrich Dapr invocations made over gRPC
This recognizes only the Dapr HTTP invocation route, but the framework's DaprExternalService.InvokeAsync calls DaprClient.InvokeMethodAsync (DaprExternalService.cs:25-29), whose sidecar request uses the gRPC path /dapr.proto.runtime.v1.Dapr/InvokeService. Those are the invocation spans produced by the repository's normal Dapr flow, so they pass through without the new display name or rpc.*/dapr.app_id attributes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds a configurable tracing “detail level” so Aether telemetry can default to a quieter, business-focused span set while still allowing full diagnostic output when explicitly enabled. This fits the telemetry stack by centralizing the decision in a process-wide runtime (AetherTracingRuntime) and using it to gate/export instrumentation and diagnostic spans.
Changes:
- Introduces
AetherTracingDetailLevel(Businessdefault,Verboseopt-in) and a process-wideAetherTracingRuntime. - Gates infrastructure diagnostics (cache/lock) and EF Core instrumentation behind the
Verboseprofile, and filters bracket-prefixed pipeline-step spans inBusiness. - Improves Dapr invocation span naming/attributes and adds docs + tests covering the new behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/test/BBT.Aether.Postgres.Tests/BusinessSpanFilterTests.cs | Adds tests verifying the business-span filter behavior across profiles. |
| framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Tracing/TraceDetailLevelTests.cs | Adds tests for global runtime behavior, [Trace] spans, and infra diagnostics gating. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/Telemetry/InfrastructureActivitySource.cs | Adds helper to start infra diagnostic spans only in Verbose. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Redis/RedisDistributedLockService.cs | Routes lock diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Redis/RedisDistributedLockHandle.cs | Routes lock diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Dapr/DaprDistributedLockService.cs | Routes lock diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedLock/Dapr/DaprDistributedLockHandle.cs | Routes lock diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedCache/Redis/RedisDistributedCacheService.cs | Routes cache diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Infrastructure/BBT/Aether/DistributedCache/Dapr/DaprDistributedCacheService.cs | Routes cache diagnostic spans through the new StartDiagnosticActivity gate. |
| framework/src/BBT.Aether.Core/BBT/Aether/Telemetry/AetherTracingProfile.cs | Introduces detail-level enum and process-wide runtime state. |
| framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherTelemetryServiceCollectionExtensions.cs | Applies runtime config, gates EF Core instrumentation, adds business filter processor, and improves Dapr HTTP client span enrichment/filtering. |
| framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/TelemetryOptions.cs | Adds Tracing.DetailLevel option with Business default. |
| framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/BusinessSpanFilterProcessor.cs | Adds export-time filter for bracket-prefixed pipeline-step spans in Business. |
| framework/docs/telemetry/README.md | Documents the new tracing detail level and defaults/behavior. |
| framework/docs/aspects/README.md | Documents [Trace] span behavior across profiles and interaction with detail level. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| private static bool IsDaprDiagnosticRequest(Uri? uri) | ||
| { | ||
| var path = uri?.AbsolutePath; | ||
| if (string.IsNullOrEmpty(path)) | ||
| { | ||
| return false; | ||
| } |
| private static void EnrichHttpClientActivity(Activity activity, HttpRequestMessage request) | ||
| { | ||
| var segments = request.RequestUri?.AbsolutePath.Split('/', StringSplitOptions.RemoveEmptyEntries); | ||
| if (segments is not { Length: >= 5 } |
| using System; | ||
| using System.Diagnostics; | ||
| using OpenTelemetry; | ||
|
|
||
| namespace BBT.Aether.AspNetCore.Telemetry; | ||
|
|
||
| /// <summary> | ||
| /// Removes pipeline-detail spans from the export path when the Business tracing profile is active. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Pipeline steps assign their final display names while the activity is running, so this filter | ||
| /// must run on completion rather than at sampling time. Clearing the recorded flag allows the | ||
| /// standard OpenTelemetry activity export processors to skip the span while preserving its | ||
| /// in-process activity context for any child operations created during execution. | ||
| /// </remarks> | ||
| internal sealed class BusinessSpanFilterProcessor : BaseProcessor<Activity> | ||
| { | ||
| public override void OnEnd(Activity activity) | ||
| { | ||
| ArgumentNullException.ThrowIfNull(activity); | ||
|
|
||
| if (activity.DisplayName.StartsWith("[", StringComparison.Ordinal)) | ||
| { | ||
| activity.ActivityTraceFlags &= ~ActivityTraceFlags.Recorded; | ||
| } | ||
| } | ||
| } |
| private static List<string> ExportTwoActivities(AetherTracingDetailLevel detailLevel) | ||
| { | ||
| var exportedNames = new List<string>(); | ||
| var configuration = new ConfigurationBuilder() | ||
| .AddInMemoryCollection(new Dictionary<string, string?> | ||
| { | ||
| ["Telemetry:ServiceName"] = "business-span-filter-tests", | ||
| ["Telemetry:MetricsEnabled"] = "false", | ||
| ["Telemetry:LoggingEnabled"] = "false", | ||
| ["Telemetry:Tracing:DetailLevel"] = detailLevel.ToString(), | ||
| ["Telemetry:Tracing:EnableAspNetCore"] = "false", | ||
| ["Telemetry:Tracing:EnableHttpClient"] = "false", | ||
| ["Telemetry:Tracing:EnableEntityFrameworkCore"] = "false", | ||
| ["Telemetry:Tracing:EnableConsoleExporter"] = "false", | ||
| ["Telemetry:Tracing:EnableOtlpExporter"] = "false", | ||
| }) | ||
| .Build(); | ||
|
|
||
| var services = new ServiceCollection(); | ||
| services.AddAetherTelemetry( | ||
| configuration, | ||
| configure: builder => builder.ConfigureTracing((_, tracing) => | ||
| { | ||
| tracing.AddSource(ActivitySourceName); | ||
| tracing.AddProcessor( | ||
| new SimpleActivityExportProcessor(new CapturingActivityExporter(exportedNames))); | ||
| })); | ||
|
|
||
| using var serviceProvider = services.BuildServiceProvider(); | ||
| using var tracerProvider = serviceProvider.GetRequiredService<TracerProvider>(); | ||
| using var source = new ActivitySource(ActivitySourceName); | ||
|
|
||
| using (var pipelineStep = source.StartActivity("PipelineStep.ExecuteAsync")) | ||
| { | ||
| Assert.NotNull(pipelineStep); | ||
| pipelineStep.DisplayName = "[20] CreateTransitionRecordStep"; | ||
| } | ||
|
|
||
| using (var transition = source.StartActivity("TransitionExecutor.ExecuteOneAsync")) | ||
| { | ||
| Assert.NotNull(transition); | ||
| transition.DisplayName = "transition/start"; | ||
| } | ||
|
|
||
| return exportedNames; | ||
| } |




Summary
Introduces a configurable tracing detail level for Aether telemetry. The new
Businessprofile becomes the default and keeps service boundaries and[Trace]application spans while suppressing low-level diagnostic noise. Applications that require the previous full-detail behavior can explicitly select theVerboseprofile through configuration.Key Changes
AetherTracingDetailLevel: IntroducesBusinessandVerbosetracing profiles with a process-wideAetherTracingRuntime.Business: BothAetherTracingOptionsand the tracing runtime now default to the business-focused profile when no configuration is provided.[Trace]spans: Application and business spans created through[Trace]remain available in both profiles.Business: Suppresses EF Core instrumentation, distributed cache/lock diagnostic spans, low-level Dapr state/secret/configuration/lock requests, and ordered pipeline-step spans whose final display name starts with[.Verbose: Explicitly selectingVerboserestores all configured diagnostic instrumentation.rpc.system,rpc.service,rpc.method, anddapr.app_idattributes.[Trace]behavior, infrastructure diagnostics, and business span filtering.Implementation Details
The tracing profile can be configured globally through
appsettings.json:{ "Telemetry": { "Tracing": { "DetailLevel": "Business" } } }To enable the complete diagnostic waterfall:
{ "Telemetry": { "Tracing": { "DetailLevel": "Verbose" } } }If
Telemetry:Tracing:DetailLevelis omitted, Aether now usesBusiness.AddAetherTelemetryinitializes the process-wide tracing profile from the bound options. Static infrastructure instrumentation usesAetherTracingRuntime.IsVerbose, while theBusinessSpanFilterProcessorremoves ordered pipeline-step spans after their final display names are known.This is a behavioral default change: applications that previously relied on the implicit verbose behavior should explicitly configure
DetailLevelasVerbose.Validation completed:
TraceDetailLevelTests: 4 passedBusinessSpanFilterTests: 3 passedgit diff --check: cleanSummary by Sourcery
Introduce a configurable tracing detail level with a new default business-focused profile while keeping full diagnostics available via an explicit verbose profile.
New Features:
Enhancements:
Tests:
Summary by CodeRabbit
New Features
Documentation