Skip to content

DotNet SDK docs incorrect re EnableTracing overrides #9619

Open
@ericsampson

Description

@ericsampson

Core or SDK?

Platform/SDK

Which part? Which one?

dotnet

Description

EnableTracing
A boolean value, if true, transactions and trace data will be generated and captured. This will set the traces-sample-rate to the recommended default of 1.0 if traces-sample-rate is not defined. Note that traces-sample-rate and traces-sampler take precedence over this option.

The last sentence of this paragraph is incorrect from a technical standpoint.

In the current SDK code, it is clear that EnableTracing takes precedence over traces-sample-rate and traces-sampler; which is both what I'd expect, and the opposite of what the docs currently say:

    /// <summary>
    /// Indicates whether the performance feature is enabled, via any combination of
    /// <see cref="EnableTracing"/>, <see cref="TracesSampleRate"/>, or <see cref="TracesSampler"/>.
    /// </summary>
    internal bool IsPerformanceMonitoringEnabled => EnableTracing switch
    {
        false => false,
        null => TracesSampler is not null || TracesSampleRate is > 0.0,
        true => TracesSampler is not null || TracesSampleRate is > 0.0 or null
    };

Suggested Solution

Reword to match the code implementation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Status

    Waiting for: Support

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions