< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Diagnostics.PipelineMetricsOptions
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Diagnostics/PipelineMetricsOptions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 46
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_MeterName()100%11100%
get_ActivitySourceName()100%11100%
get_ResolvedActivitySourceName()100%22100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Diagnostics/PipelineMetricsOptions.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Diagnostics;
 2
 3/// <summary>
 4/// Configuration options for pipeline-shape OpenTelemetry metrics emitted by
 5/// <see cref="IPipelineMetrics"/>. Sibling of
 6/// <see cref="AgentFrameworkMetricsOptions"/> — that type scopes the
 7/// per-agent-run meter; this one scopes the pipeline-runner meter.
 8/// </summary>
 9/// <remarks>
 10/// <para>
 11/// Configure via the syringe:
 12/// </para>
 13/// <code>
 14/// .UsingAgentFramework(af => af
 15///     .ConfigurePipelineMetrics(o =>
 16///     {
 17///         o.MeterName = "MyApp.Pipelines";
 18///         o.ActivitySourceName = "MyApp.Pipelines";
 19///     }))
 20/// </code>
 21/// <para>
 22/// When unconfigured, <see cref="IPipelineMetrics"/> resolves to
 23/// <see cref="NoOpPipelineMetrics"/> — observability is opt-in with zero overhead
 24/// by default. Same posture as <see cref="AgentFrameworkMetricsOptions"/>.
 25/// </para>
 26/// </remarks>
 27[DoNotAutoRegister]
 28public sealed class PipelineMetricsOptions
 29{
 30    /// <summary>
 31    /// The name used for the <see cref="System.Diagnostics.Metrics.Meter"/> that
 32    /// emits pipeline-shape counters and histograms (<c>pipeline.run.*</c>,
 33    /// <c>pipeline.stage.*</c>). Defaults to
 34    /// <c>"NexusLabs.Needlr.AgentFramework.Pipelines"</c>.
 35    /// </summary>
 14036    public string MeterName { get; set; } = "NexusLabs.Needlr.AgentFramework.Pipelines";
 37
 38    /// <summary>
 39    /// The name used for the <see cref="System.Diagnostics.ActivitySource"/> that
 40    /// emits the parent <c>pipeline.run</c> span and child <c>pipeline.stage</c>
 41    /// spans. Defaults to <see cref="MeterName"/> when <see langword="null"/>.
 42    /// </summary>
 4543    public string? ActivitySourceName { get; set; }
 44
 3445    internal string ResolvedActivitySourceName => ActivitySourceName ?? MeterName;
 46}