Open Kasse-Dembele opened 4 months ago
Hi, thank you for using the library and for the PR. This is some nice work! I think I can accept this change, but first I want to measure the performance overhead.
In the meantime, can you please merge in master
or rebase? I've updated the CI matrix and it'd be good to re-run CI with the latest Elixir and OTP versions.
I can also see that at the moment the telemetry tests are failing with Elixir 1.14 (is it incompatible?), but the good news is that I'm dropping support for Elixir 1.14 (it's removed from CI on master), so that won't be a concern. Still, I'd be curious to know why it's failing there.
I love this idea, I was thinking of building an ad hoc solution to solve this problem
Is there anything pending to be able to add this to the library? Can we help in any way to make this a reality? @tompave
This PR adds instrumentation to FunWithFlags using the
:telemetry
library. This allows users to gain insights into the performance and usage of feature flags in their applications.Key changes:
[:fun_with_flags, :flag_operation]
event nameNew telemetry events:
[:fun_with_flags, :flag_operation]
duration
: Time taken for the operation in native time unitsflag_name
: Name of the flag being operated onoperation
: Type of operation (:enable, :disable, :clear, or :enabled?)options
: Any options passed to the operationresult
: Result of the operationThis change is backwards compatible and does not affect existing functionality. Users can choose to attach handlers to these events to collect metrics or perform logging.
This PR aims to provide better observability for applications using FunWithFlags, allowing for easier debugging, performance monitoring, and usage analytics.
Testing:
Next steps:
Feedback and suggestions are welcome! @tompave