open-feature / open-feature/java-sdk-contrib

[flagd] ContextEnrichment for inprocess improvements by extracting logic onto the channelmonitor

Open
#1,231 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Triage
Dominant language
Java
Stars
49
Forks
81
Avg merge
20h 3m
Merged PRs (30d)
6

Description

Currently our Context Enrichment is handled here:

https://github.com/open-feature/java-sdk-contrib/blob/122119bcbb4fe8e9bfe0de42feafaa54625c050f/providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/grpc/GrpcStreamConnector.java#L107-L124

We always try to fetch the metadata before we reestablish a connection, during our stream listening logic.

This might be a little bit tricky, as we are always relying on the same process, and if eg. the timeline exceeds etc. the whole process breaks.

The question is how important it is to fetch this metadata, as we could theoretically also do this unary call when the channel state changes to READY, instead of always during the loop.

This would decouple our sync from the metadata, and might increase our robustness.

WDYT?

cc: @guidobrei @toddbaert @beeme1mr @alexandraoberaigner @chrfwow

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/grpc/GrpcStreamConnector.java, especially the metadata handling around lines 107–124. Read the stream listening and channel state logic, then assess moving the unary metadata fetch to the channel's READY transition. Done means synchronization no longer depends on fetching metadata inside the stream loop and the reconnection behavior remains robust.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, java
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.