-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
communityTo tag external issues and PRsTo tag external issues and PRs
Description
Is your feature request related to a problem? Please describe.
When trying to register NewRelic's IAgent to use with DI I was told that Singleton is not the correct lifestyle. Apparently there was an incident and NR engineers advised to use Scoped/Transient to avoid any telemetry issues when agents refresh on the box.
This is not mentioned anywhere in the docs and when inspecting decompiled nuget package it does look like it's safe to inject IAgent as a Singleton.
Feature Description
Update readme docs and clarify how IAgent is meant to be injected and which lifestyle to use. Alternatively make it safe to inject IAgent into Singleton services or retrieve it somehow.
Additional context
There is a question on StackOverflow suggesting the wrong behaviour too which can cause more issues with NR https://stackoverflow.com/a/66543642.
Priority
Must Have
Metadata
Metadata
Assignees
Labels
communityTo tag external issues and PRsTo tag external issues and PRs