Repository navigation
refactor(flags): share provider telemetry across context changes - #1307
Conversation
Keep this branch's provider-owned telemetry design for conflicted Flags files and apply the three #1297 commits that landed after this branch's stack point: strict context switching export, empty-string targeting keys, and internal __dd_ metadata keys.
…metry - Abort a retired context's pending assignment fetch. The cancel token exposes an abort trigger, and the fetcher sends an AbortableRequest. This raises the http dependency floor to ^1.5.0. - Make a concurrent shutdown wait for work that an earlier call started. - Add tests for re-initialization after shutdown, concurrent shutdown, and fetch abort on context retirement. - Share repository construction through FlagsRepository.forRuntime. - Document telemetry ownership and clarify provider names.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd089ec562
ℹ️ 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".
There was a problem hiding this comment.
More details
Static review found no actionable defects in telemetry ownership, context retirement, cancellation, or shutdown. Native integration validation at the reviewed head remains outstanding.
🤖 Bits Code Review · Commit bd089ec
Replace the handwritten _CountingClient and _AbortRecordingClient fakes with the existing _MockHttpClient, as AGENTS.md requires. Verify close and upload counts with mocktail.
Keep the README at the develop version. The send requirement and the http ^1.5.0 floor belong in the release notes.
|
|
fuzzybinary
left a comment
There was a problem hiding this comment.
This mostly looks good and definitely simplifies the backoff. I do think the set is overkill though and worth looking into taking it out.
Once #1314 is merged here we can look at merging in.
There was a problem hiding this comment.
The PR shares provider telemetry across context changes; the latest commit simplifies concurrent shutdown and clarifies draining behavior. One edge-case regression remains: a failed shutdown persists across reinitialization, causing later successful teardowns to rethrow the old error.
🤖 Bits Code Review · Commit be48c21
There was a problem hiding this comment.
More details
The PR shares telemetry across context changes while retaining per-context assignment repositories and draining uploads at shutdown. The latest commit clears settled shutdown futures without disturbing newer concurrent operations, fixing the earlier failure-retention regression; no findings remain open, while CI and native integration validation remain outstanding.
🤖 Bits Code Review · Commit 3e373ad
What and why?
The provider created a new exposure logger, evaluation aggregator, and HTTP client for each evaluation context. Context changes needed a telemetry handoff layer between clients. This PR removes that layer (follow-up from #1297).
How?
inheritTelemetry, successor chains, inherited uploads, and timer bookkeeping.http.AbortableRequestthroughsend. This requireshttp: ^1.5.0.shutdown()waits for work that an earlier call started.FlagsRepository.forRuntimebuilds repositories for the provider andDatadogFlags.Validation
bd089ec56223fdd271660e07d341fb2f78d72a9fdatadog_flagsunit testsbd089ec56223fdd271660e07d341fb2f78d72a9fdatadog_flags_flutterunit tests1674e2c7bd93c360820be4c3d30167ad77b68865Review checklist