Unleash / unleash-client-go

Unleash client SDK for Go
https://docs.getunleash.io
Apache License 2.0
139 stars 54 forks source link

Expose ImpressionData property from api.Feature type #181

Closed vgrigoruk closed 4 weeks ago

vgrigoruk commented 1 month ago

About the changes

Currently, there is no way to access "impressionData" property on the feature object, as it is not exposed via Feature type, so there is no way to implement "impressions" logic based on boolean flag that is set on per-feature basis.

FredrikOseberg commented 4 weeks ago

@vgrigoruk Thanks for this PR.

This is actually a missing capability in the Go SDK. The impressionData flag is used internally in other SDKs to emit impression event with the context that was provided to the IsEnabled or GetVariant call. See https://github.com/Unleash/unleash-client-node/pull/336 for details.

I'm happy to merge this property change. But it won't do anything until we add the functionality to emit the events based on this property.

FredrikOseberg commented 4 weeks ago

Added #182 as an issue on the repository.

vgrigoruk commented 3 weeks ago

Thanks @FredrikOseberg!