Skip to content

Conversation

@eliottness
Copy link
Contributor

@eliottness eliottness commented Nov 3, 2025

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:

  • Adds exposureWriter for buffering and flushing exposure events to the Datadog agent via EVP proxy
  • Implements exposureHook that integrates with the OpenFeature SDK to capture evaluation details
  • Introduces ProviderConfig field to allow configuration of exposure flush intervals
  • Adds attribute flattening utilities to ensure subject attributes comply with EVP intake schema
  • Updates documentation with configuration options and environment variables

Out of scope refactoring

Moved the tracer private method udsClient, defaultHTTPClient and defaultDialer to the internal package to simply code between telemetry/tracer/openfeature writers

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@pr-commenter
Copy link

pr-commenter bot commented Nov 3, 2025

Benchmarks

Benchmark execution time: 2025-11-12 14:51:49

Comparing candidate commit 5cd792a in PR branch eliottness/ffe-exposures with baseline commit 49ddb0c in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@eliottness eliottness changed the title feat(openfeature): After Hook Exposure events feat(openfeature): After Hook Exposure event writer Nov 3, 2025
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Nov 3, 2025
@eliottness eliottness force-pushed the eliottness/ffe-exposures branch from 2b6db30 to 2804703 Compare November 3, 2025 15:13
@eliottness eliottness added enhancement quick change/addition that does not need full team approval AI Assisted AI/LLM assistance used in this PR (partially or fully) and removed apm:ecosystem contrib/* related feature requests or bugs labels Nov 3, 2025
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Nov 3, 2025
@eliottness eliottness marked this pull request as ready for review November 3, 2025 15:17
@eliottness eliottness requested a review from a team as a code owner November 3, 2025 15:17
@eliottness
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Nov 3, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5cd792a | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@eliottness
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@eliottness eliottness force-pushed the eliottness/ffe-exposures branch from 2358c60 to 78bf8d9 Compare November 4, 2025 11:39
@eliottness eliottness requested review from a team as code owners November 4, 2025 11:39
@eliottness
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@eliottness eliottness force-pushed the eliottness/ffe-exposures branch from 7dff30e to 11e5b93 Compare November 7, 2025 14:26
@eliottness eliottness requested a review from darccio November 7, 2025 14:26
@ownership-prod ownership-prod bot requested review from a team November 7, 2025 14:47
Copy link
Member

@genesor genesor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, smalls comments/questions


if config.HTTPClient == nil {
config.HTTPClient = defaultHTTPClient
config.HTTPClient = internal.DefaultHTTPClient(5*time.Second, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the change from 30s to 5s expected ?

@eliottness eliottness force-pushed the eliottness/ffe-exposures branch from 11e5b93 to 2316f52 Compare November 7, 2025 15:52
@eliottness eliottness requested review from a team as code owners November 7, 2025 16:50
Signed-off-by: Eliott Bouhana <[email protected]>
@eliottness eliottness force-pushed the eliottness/ffe-exposures branch from 925fc29 to f4b7c3c Compare November 10, 2025 14:28
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
@eliottness
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 12, 2025

View all feedbacks in Devflow UI.

2025-11-12 14:40:07 UTC ℹ️ Start processing command /merge


2025-11-12 14:40:20 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-12 15:12:45 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 18m (p90).


2025-11-12 15:34:53 UTCMergeQueue: The checks failed on this merge request

Tests failed on this commit 4059678:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@eliottness
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 12, 2025

View all feedbacks in Devflow UI.

2025-11-12 15:35:13 UTC ℹ️ Start processing command /merge


2025-11-12 15:35:18 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 18m (p90).


2025-11-12 15:48:08 UTCMergeQueue: The checks failed on this merge request

Tests failed on this commit 4dafad1:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@eliottness eliottness merged commit bce309f into main Nov 12, 2025
361 of 369 checks passed
@eliottness eliottness deleted the eliottness/ffe-exposures branch November 12, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Assisted AI/LLM assistance used in this PR (partially or fully) apm:ecosystem contrib/* related feature requests or bugs enhancement quick change/addition that does not need full team approval mergequeue-status: rejected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants