Skip to content

ISupportExternalScope enrichment #251

@pavel-faltynek

Description

@pavel-faltynek

Is it intended that the code utilizing scopes provided by IExternalScopeProvider is modifying the SerilogLoggerProvider's current scope chain via creating (and not disposing) SerilogLoggerScope every time a LogEvent is enriched?

Does not feel correct at first sight. It captures provider's current source and replaces it by itself, which seems to be intended to reverse on Dispose() (which is never called). Should it even manipulate the provider's scope chain at all? Shouldn't it just enrich the LogEvent via scopes from external source without performing any side effects?

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