Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Should IScope expose FinishSpanOnDispose property? #95

@ndrwrbgs

Description

@ndrwrbgs

Per the API exposed, there is no way to produce an IScope that does not involve setting FinishSpanOnDispose (explicitly or implicitly). This makes me feel like this is a genuine first-class property of an IScope.

The problem that I hit with this property not being exposed is demonstrated here. To explain it briefly, IScopeManager.Active allows a user to retrieve an IScope, but the IScope interface itself does not provide enough information to properly write a wrapper/decorator around an underlying IScopeManager and maintain the exact calls that are being passed in (e.g. actually calling underlyingScopeManager.Active, because to intercept all calls as a wrapper a new type must be returned, and it is unknown at IScopeManager.Active call time whether the returned value should interpret a call to IScope.Dispose as an implicit call to ISpan.Finish or not).

Perhaps I am vastly misunderstanding the flow here, but personally I feel if it's impossible to create something with a specific property, then that property should be exposed from the thing for wrappers to take advantage of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions