Skip to content

fix(otel): notification per-handler spans resolve the concrete subscr… - #10

Merged
yandersr merged 1 commit into
mainfrom
1.3.0
Jul 3, 2026
Merged

fix(otel): notification per-handler spans resolve the concrete subscr…#10
yandersr merged 1 commit into
mainfrom
1.3.0

Conversation

@yandersr

@yandersr yandersr commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

InstrumentedHandler stamped the per-handler span name and mediator.handler.type from inner.GetType(). When a transparent handler decorator wraps the subscriber (e.g. a timing/profiling wrapper), that returned the decorator's type — not the concrete handler — so the span carried a wrapper's (often compiler-mangled) name and, because such a wrapper's generic is parameterized by the notification, every subscriber collapsed to one type.

Resolve the concrete handler through IPipelineHandlerTypeAccessor — the same seam the request (MediatorDispatchTracingObserver) and stream (MediatorStreamTracingBehavior) paths already use — for both the span name and the handler.type tag.

Bump DSoftStudio.Mediator.OpenTelemetry to 1.1.0-rc.4.

…iber via IPipelineHandlerTypeAccessor

InstrumentedHandler stamped the per-handler span name and mediator.handler.type from
inner.GetType(). When a transparent handler decorator wraps the subscriber (e.g. a
timing/profiling wrapper), that returned the decorator's type — not the concrete
handler — so the span carried a wrapper's (often compiler-mangled) name and, because
such a wrapper's generic is parameterized by the notification, every subscriber
collapsed to one type.

Resolve the concrete handler through IPipelineHandlerTypeAccessor — the same seam the
request (MediatorDispatchTracingObserver) and stream (MediatorStreamTracingBehavior)
paths already use — for both the span name and the handler.type tag.

Bump DSoftStudio.Mediator.OpenTelemetry to 1.1.0-rc.4.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Summary
Generated on: 07/03/2026 - 12:51:21
Coverage date: 07/03/2026 - 12:50:57 - 07/03/2026 - 12:51:14
Parser: MultiReport (8x Cobertura)
Assemblies: 6
Classes: 69
Files: 63
Line coverage: 93.2% (3526 of 3781)
Covered lines: 3526
Uncovered lines: 255
Coverable lines: 3781
Total lines: 8971
Branch coverage: 81.4% (1414 of 1736)
Covered branches: 1414
Total branches: 1736
Method coverage: Feature is only available for sponsors
Tag: 145_28661661425

Coverage

DSoftStudio.Mediator - 98.4%
Name Line Branch
DSoftStudio.Mediator 98.4% 92.8%
DSoftStudio.Mediator.BehaviorHandlerAdapter`2 100% 100%
DSoftStudio.Mediator.HandlerCache`2 100% 100%
DSoftStudio.Mediator.HandlerLifetimeOptimizer 100% 90.4%
DSoftStudio.Mediator.Mediator 100% 91.6%
DSoftStudio.Mediator.MediatorBuilder 100% 100%
DSoftStudio.Mediator.NotificationCachedDispatcher 100% 100%
DSoftStudio.Mediator.NotificationDispatch`1 100%
DSoftStudio.Mediator.NotificationHandlerCache`1 100% 100%
DSoftStudio.Mediator.NotificationObjectDispatch 90.4% 75%
DSoftStudio.Mediator.NotificationPublisherFlag 100% 100%
DSoftStudio.Mediator.ParallelNotificationPublisher 100% 100%
DSoftStudio.Mediator.PipelineChainCache`2 100% 100%
DSoftStudio.Mediator.PipelineChainHandler`2 98.4% 91.8%
DSoftStudio.Mediator.RequestDispatch`2 100%
DSoftStudio.Mediator.RequestObjectDispatch 90.9% 50%
DSoftStudio.Mediator.SequentialNotificationPublisher 100% 100%
DSoftStudio.Mediator.ServiceCollectionExtensions 100%
DSoftStudio.Mediator.StreamBehaviorHandlerAdapter`2 100% 100%
DSoftStudio.Mediator.StreamDispatch`2 100%
DSoftStudio.Mediator.StreamHandlerCache`2 100% 100%
DSoftStudio.Mediator.StreamPipelineChainCache`2 100% 100%
DSoftStudio.Mediator.StreamPipelineChainHandler`2 92.8% 75%
DSoftStudio.Mediator.StreamPipelineInvoker 100% 100%
DSoftStudio.Mediator.Abstractions - 91.3%
Name Line Branch
DSoftStudio.Mediator.Abstractions 91.3% ****
DSoftStudio.Mediator.Abstractions.HandlerLifetimeAttribute 0%
DSoftStudio.Mediator.Abstractions.MediatorHandlerRegistrationAttribute 100%
DSoftStudio.Mediator.Abstractions.RequestExceptionHandlerState`1 100%
DSoftStudio.Mediator.Abstractions.Unit 100%
DSoftStudio.Mediator.FluentValidation - 100%
Name Line Branch
DSoftStudio.Mediator.FluentValidation 100% 87.5%
DSoftStudio.Mediator.FluentValidation.FluentValidationServiceCollectionExte
nsions
100%
DSoftStudio.Mediator.FluentValidation.MediatorValidationException 100% 83.3%
DSoftStudio.Mediator.FluentValidation.ValidationBehavior`2 100% 90%
DSoftStudio.Mediator.Generators - 91.9%
Name Line Branch
DSoftStudio.Mediator.Generators 91.9% 76.9%
DSoftStudio.Mediator.Generators.BehaviorTypeInfo 100% 100%
DSoftStudio.Mediator.Generators.CqrsSemanticAnalyzer 86.3% 61.5%
DSoftStudio.Mediator.Generators.DependencyInjectionGenerator 89.8% 78.1%
DSoftStudio.Mediator.Generators.DiagnosticDescriptors 100%
DSoftStudio.Mediator.Generators.EquatableArray`1 100% 92.8%
DSoftStudio.Mediator.Generators.HandlerDiscovery 97.1% 84%
DSoftStudio.Mediator.Generators.InterceptorHelpers 84.2% 55.8%
DSoftStudio.Mediator.Generators.MediatorExtensionsGenerator 93.4% 69.3%
DSoftStudio.Mediator.Generators.MediatorPipelineGenerator 93.4% 78.2%
DSoftStudio.Mediator.Generators.MixedRegistrationApiAnalyzer 91.1% 74.5%
DSoftStudio.Mediator.Generators.MockDetectionAnalyzer 100% 100%
DSoftStudio.Mediator.Generators.NotificationGenerator 92.5% 77.7%
DSoftStudio.Mediator.Generators.PublishInterceptorGenerator 90.4% 67.2%
DSoftStudio.Mediator.Generators.ReferencedAssemblyScanner 85.8% 81.6%
DSoftStudio.Mediator.Generators.SelfHandlerDetail 100% 83.3%
DSoftStudio.Mediator.Generators.SelfHandlerParam 100% 83.3%
DSoftStudio.Mediator.Generators.SendInterceptorGenerator 91.6% 75%
DSoftStudio.Mediator.Generators.StreamGenerator 94.9% 81%
DSoftStudio.Mediator.Generators.StreamInterceptorGenerator 90.9% 73.3%
DSoftStudio.Mediator.HybridCache - 100%
Name Line Branch
DSoftStudio.Mediator.HybridCache 100% 100%
DSoftStudio.Mediator.HybridCache.CachingBehavior`2 100% 100%
DSoftStudio.Mediator.HybridCache.HybridCacheServiceCollectionExtensions 100%
DSoftStudio.Mediator.HybridCache.ICachedRequest 100%
DSoftStudio.Mediator.OpenTelemetry - 96.8%
Name Line Branch
DSoftStudio.Mediator.OpenTelemetry 96.8% 90.3%
DSoftStudio.Mediator.OpenTelemetry.ActivityHelper 100% 100%
DSoftStudio.Mediator.OpenTelemetry.DatabaseSpanEnrichmentProcessor 95% 92.3%
DSoftStudio.Mediator.OpenTelemetry.InstrumentedNotificationPublisher 97.4% 89.5%
DSoftStudio.Mediator.OpenTelemetry.MediatorDispatchTracingObserver 100% 93.7%
DSoftStudio.Mediator.OpenTelemetry.MediatorInstrumentation 100% 50%
DSoftStudio.Mediator.OpenTelemetry.MediatorInstrumentationOptions 100%
DSoftStudio.Mediator.OpenTelemetry.MediatorMetrics 100%
DSoftStudio.Mediator.OpenTelemetry.MediatorMetricsBehavior`2 100% 100%
DSoftStudio.Mediator.OpenTelemetry.MediatorNotificationMetadata`1 100%
DSoftStudio.Mediator.OpenTelemetry.MediatorStreamMetadata`2 100%
DSoftStudio.Mediator.OpenTelemetry.MediatorStreamMetricsBehavior`2 100% 85.7%
DSoftStudio.Mediator.OpenTelemetry.MediatorStreamTracingBehavior`2 100% 83.3%
DSoftStudio.Mediator.OpenTelemetry.MediatorTelemetryMetadata`2 100% 100%
DSoftStudio.Mediator.OpenTelemetry.OpenTelemetryServiceCollectionExtensions 86.8% 77.2%
DSoftStudio.Mediator.OpenTelemetry.SqlStatementParser 95.2% 94.2%
OpenTelemetry.Metrics.MediatorMeterProviderBuilderExtensions 100%
OpenTelemetry.Trace.MediatorTracerProviderBuilderExtensions 100%

@yandersr
yandersr merged commit d24b394 into main Jul 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant