Skip to content

Conversation

@thomaspoignant
Copy link
Member

This PR

In this PR we support exporterMetadata that will allow to add static information that will be added to your feature event sent to the GO Feature Flag exporter.

In this PR we add those exporter metadata to the evaluation context in order to pass them to GO Feature Flag relay-proxy.

Related Issues

thomaspoignant/go-feature-flag#2983

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>

# enrich the evaluation context with the exporter_metadata
@options.exporter_metadata ||= {}
@options.exporter_metadata.merge!({"openfeature" => true, "provider" => "ruby"})
Copy link
Member Author

Choose a reason for hiding this comment

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

Those are default exporter_metadata values that are added for every evaluation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I need them in the GO Feature Flag server, and since I am using the OFREP API and I have no other fields than the context to add those extra informations.

Copy link
Member Author

@thomaspoignant thomaspoignant Jan 24, 2025

Choose a reason for hiding this comment

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

I could have put it as a header, but the problem is the limit in header size that we may reach.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see. That's a clever workaround 😄

Copy link
Member

@beeme1mr beeme1mr left a comment

Choose a reason for hiding this comment

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

Why are you adding exporter metadata to the context?

@maxveldink
Copy link
Contributor

Will give this a review today when I have a chance

Copy link
Contributor

@maxveldink maxveldink left a comment

Choose a reason for hiding this comment

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

🦑 Just a few small comments, but nothing blocking from me!

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@thomaspoignant thomaspoignant merged commit 04754fd into main Jan 25, 2025
11 checks passed
@thomaspoignant thomaspoignant deleted the goff-exporter-metadata branch January 25, 2025 09:04
thomaspoignant pushed a commit that referenced this pull request Jan 27, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.1.3](openfeature-go-feature-flag-provider/v0.1.2...openfeature-go-feature-flag-provider/v0.1.3)
(2025-01-25)


### ✨ New Features

* **go-feature-flag:** Support exporter metadata
([#45](#45))
([04754fd](04754fd))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants