You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable applications to report what features are being used, what were the states during a request, etc... #3
Currently feature management can be used to gate application functionality behind features. An important part of this flow is measuring how often these features are being used, and whether these features are healthy. The feature management interfaces lack the ability to extrapolate data such as what features were accessed during their request and what are their states. This should be added.
Hello kevinv53 this is the issue that we are currently designing a solution for. The current line of thought is to have an interface that is internally invoked whenever a flag is evaluated.
Exact interface and naming TBD, but something along the lines of the following:
I am excited for the work done in this area, however seeing the ITelemetryPublisher I couldn't help but wonder, why was DiagnosticSource not used? It seems like a perfect fit for this purpose. I'd even consider ActivitySource usage since some feature evaluations can be complex and even hit external dependencies, and having distributed tracing support for such cases could be very helpful. And these are native, runtime built-in solutions for exactly that purpose. ApplicationInsights integration with DiagnosticSource would be a breeze (it's how appins creates RequestTelemetry), and it'd also make it easy to integrate with any and all other OTel-based components nearly out of the box.
I think this was essentially what was asked for in #219
Would you still consider working in that direction, or is ITelemetryPublisher definitely your last word in this area?
It can, but that doesn't make a lot of sense to me - as I see it, the TelemetryPublisher is a custom solution duplicating existing framework component. I don't see what's the benefit doing it this way instead of framework-standard. As a bonus, there'd be less public API surface, less maintenance, and more possible optimizations from using framework code.
From my understanding DiagnosticSource doesn't play as well as we'd like with DI to put us where we want to be for this enhancement. I'm not aware of any patterns to have diagnostic source listeners be DI aware. This makes it a bit difficult to work with in our case given the libraries focus on DI usage.
See current proposed usage in Application Insights publisher example:
Activity
kevinv53 commentedon May 7, 2023
Is there any update on this?
There is Azure Monitoring and Cost Analysis but I'm not sure that those cover what is requested on this ticket.
jimmyca15 commentedon May 8, 2023
Hello kevinv53 this is the issue that we are currently designing a solution for. The current line of thought is to have an interface that is internally invoked whenever a flag is evaluated.
Exact interface and naming TBD, but something along the lines of the following:
It allows one to implement ITelemetryPublisher and emit/persist feature flag evaluations wherever desired.
jimmyca15 commentedon Oct 13, 2023
Added in preview branch
#259
#281
amis92 commentedon Oct 25, 2023
I am excited for the work done in this area, however seeing the
ITelemetryPublisherI couldn't help but wonder, why wasDiagnosticSourcenot used? It seems like a perfect fit for this purpose. I'd even considerActivitySourceusage since some feature evaluations can be complex and even hit external dependencies, and having distributed tracing support for such cases could be very helpful. And these are native, runtime built-in solutions for exactly that purpose. ApplicationInsights integration with DiagnosticSource would be a breeze (it's how appins creates RequestTelemetry), and it'd also make it easy to integrate with any and all other OTel-based components nearly out of the box.I think this was essentially what was asked for in #219
Would you still consider working in that direction, or is
ITelemetryPublisherdefinitely your last word in this area?jimmyca15 commentedon Oct 25, 2023
Amadeusz Sadowski (@amis92)
Can't an implementation of ITelemetryPublisher be made to satsify what you have suggested?
amis92 commentedon Oct 25, 2023
It can, but that doesn't make a lot of sense to me - as I see it, the TelemetryPublisher is a custom solution duplicating existing framework component. I don't see what's the benefit doing it this way instead of framework-standard. As a bonus, there'd be less public API surface, less maintenance, and more possible optimizations from using framework code.
jimmyca15 commentedon Oct 27, 2023
Amadeusz Sadowski (@amis92)
From my understanding DiagnosticSource doesn't play as well as we'd like with DI to put us where we want to be for this enhancement. I'm not aware of any patterns to have diagnostic source listeners be DI aware. This makes it a bit difficult to work with in our case given the libraries focus on DI usage.
See current proposed usage in Application Insights publisher example:
I appreciate any thoughts you have on the topic.
amis92 commentedon Nov 30, 2023
It seems there's now
IMeterFactorywhich satisfies the Dependency Injection scenario :) https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.imeterfactory?view=net-8.0It'd be helpful if the framework-based solutions could work more-or-less out of the box, instead of depending on an Azure-focused extension.