Giter Club home page Giter Club logo

Comments (8)

jimmyca15 avatar jimmyca15 commented on July 27, 2024 1

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.

amis92 avatar amis92 commented on July 27, 2024 1

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.

amis92 avatar amis92 commented on July 27, 2024 1

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.

kevinv53 avatar kevinv53 commented on July 27, 2024

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.

jimmyca15 avatar jimmyca15 commented on July 27, 2024

Added in preview branch

#259

#281

from featuremanagement-dotnet.

jimmyca15 avatar jimmyca15 commented on July 27, 2024

@amis92

Can't an implementation of ITelemetryPublisher be made to satsify what you have suggested?

from featuremanagement-dotnet.

amis92 avatar amis92 commented on July 27, 2024

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.

jimmyca15 avatar jimmyca15 commented on July 27, 2024

@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:

builder.Services.AddFeatureManagement()
    .AddTelemetryPublisher<ApplicationInsightsTelemetryPublisher>();

I appreciate any thoughts you have on the topic.

from featuremanagement-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.