-
Notifications
You must be signed in to change notification settings - Fork 487
feat(openfeature): After Hook Exposure event writer #4094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # openfeature/provider.go
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
2b6db30 to
2804703
Compare
Signed-off-by: Eliott Bouhana <[email protected]>
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Eliott Bouhana <[email protected]>
2358c60 to
78bf8d9
Compare
Signed-off-by: Eliott Bouhana <[email protected]>
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return &exposureWriter{ | ||
| buffer: make([]exposureEvent, 1<<8), // Initial capacity of 256 | ||
| flushInterval: cmp.Or(config.ExposureFlushInterval, defaultExposureFlushInterval), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid sending 256 empty exposure events on startup
The exposure writer initializes its buffer with make([]exposureEvent, 1<<8). That creates a slice with length 256, not just capacity, so before any flag is evaluated the periodic flush sees 256 entries and pushes them to the agent as zero‑valued exposures. On the first tick this will POST 256 bogus events (likely rejected by the agent and logged as errors) even though no exposures occurred. The buffer should start with length 0 and capacity 256 instead.
Useful? React with 👍 / 👎.
What does this PR do?
This PR implements feature flag exposure tracking for the Datadog OpenFeature provider. It adds the ability to automatically capture and report
feature flag evaluations to Datadog's Event Platform Intake, providing visibility into which feature flags are being evaluated and by which users.
Key changes:
exposureWriterfor buffering and flushing exposure events to the Datadog agent via EVP proxyexposureHookthat integrates with the OpenFeature SDK to capture evaluation detailsProviderConfigfield to allow configuration of exposure flush intervalsOut of scope refactoring
Moved the tracer private method
udsClient,defaultHTTPClientanddefaultDialerto theinternalpackage to simply code between telemetry/tracer/openfeature writersReviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!