Skip to content

Missing documentation about the usage of the DogStatsdService with Microsoft DI #202

@EnricoMassone

Description

@EnricoMassone

By reading through the available documentation I wasn't able to find any sample of guidance about how to use the DogStatsdService with Microsoft DI.
Most of the time .NET core applications are written by delegating the service creation and lifetime management to the Microsoft DI container.

Can you please add an example or some guidance about the intended lifetime for the service ? I have seen some people registering it as a singleton service in the DI container, but I have also found this question on Stackoverflow which seems to suggest there are issues in doing that.
Moreover, the samples in the repo README file seems to suggest a usage of DogStatsdService as a short-living object, which seems to suggest a transient or scoped lifetime.

Can you please clarify this point ?

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