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-07 14:45:12

Comparing candidate commit 11e5b93 in PR branch eliottness/ffe-exposures with baseline commit 1557bbd in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 6 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

⚠️ Warnings

❄️ 7 New flaky tests detected

    TestReportAbandonedSpans from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer

    TestReportAbandonedSpans/wait from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer

    TestStructLiteral from github.com/DataDog/dd-trace-go/v2/internal/orchestrion/_integration/aws.v2

View all

🧪 12 Tests failed

    Test from github.com/DataDog/dd-trace-go/v2/internal/orchestrion/_integration/aws.v1

    Test from github.com/DataDog/dd-trace-go/v2/internal/orchestrion/_integration/confluent-kafka-go.v1

    Test from github.com/DataDog/dd-trace-go/v2/internal/orchestrion/_integration/confluent-kafka-go.v2

View all
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 11e5b93 | 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".

# 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]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
Signed-off-by: Eliott Bouhana <[email protected]>
@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 ?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants