Comments (8)
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:
ITelemetryPublisher
{
ValueTask Publish(EvaluationResult result, CancellationToken cancellationToken);
}
public class EvaluationResult
{
string FeatureName { get; set; }
bool Enabled { get; set; }
}
It allows one to implement ITelemetryPublisher and emit/persist feature flag evaluations wherever desired.
from featuremanagement-dotnet.
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?
from featuremanagement-dotnet.
It seems there's now IMeterFactory
which satisfies the Dependency Injection scenario :) https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.imeterfactory?view=net-8.0
It'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.
from featuremanagement-dotnet.
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.
from featuremanagement-dotnet.
Added in preview branch
from featuremanagement-dotnet.
Can't an implementation of ITelemetryPublisher be made to satsify what you have suggested?
from featuremanagement-dotnet.
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 featuremanagement-dotnet.
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:
builder.Services.AddFeatureManagement()
.AddTelemetryPublisher<ApplicationInsightsTelemetryPublisher>();
I appreciate any thoughts you have on the topic.
from featuremanagement-dotnet.
Related Issues (20)
- Targeting evaluation is CPU dependent. HOT 4
- Remove the support for variants and telemetry from the .NET feature flag schema HOT 14
- Include Targeting Information on outgoing telemetry HOT 2
- Support .NET 8 Targeting framework in Microsoft.FeatureManagement.Telemetry.ApplicationInsights.AspNetCore
- Target netstandard2.* in Microsoft.FeatureManagement.Telemetry.ApplicationInsights
- The approach to telemetry (using custom `ITelemetryPublisher`) seems overengineered and counter to modern OpenTelemetry abstractions HOT 37
- Add Default Http Targeting Context Accessor
- Consider moving `TargetingHttpContextMiddleware` to the App Insights package HOT 2
- No instance of ITargetingContextAccessor is available for variant assignment. HOT 6
- FeatureManagerSnapshot should snapshot TargetingContext as well
- EvaluationDataToApplicationInsights example
- Can't Set FeatureFilters In FeatureManager In .NET Framework Application HOT 10
- Update Package metadata
- Add a link to preview on main readme HOT 1
- Cannot use the TargetingFilter in .NET class library project HOT 3
- Nuget "Microsoft.FeatureManagement.AspNetCore" Version 3.3.0 - Multiple feature filters match the configured filter named 'Microsoft.TimeWindow' HOT 8
- Consider using `TimeProvider` using Microsoft.Bcl.TimeProvider nuget package HOT 2
- Bug 4.0.0-preview: NullReferenceException when TargetingContext.UserId is null and TargetingEvaluationOption.IgnoreCase = true
- Consider the ability to allocate variants based on custom filters HOT 5
- Version 3.5.0 release notes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from featuremanagement-dotnet.