-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(load-generator): Adapt OpenFeature OFREP instead of IN_PROCESS #2114
feat(load-generator): Adapt OpenFeature OFREP instead of IN_PROCESS #2114
Conversation
OpenFeature supports multiple different modes. The newest implementation relies on threads and other python internal, which seem to be monkeypatched by locust. Due to this, the IN_PROCESS mode is not working properly anymore and is causing issues. Instead we suggest to switch to the OFREP (OpenFeature Remote Evaluation Protocol) for this usecase. This is a simple http call which will return all evaluate flags, and will regularly poll for changes. Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
98c1ea3
to
a70d7f3
Compare
i created open-telemetry/opentelemetry-helm-charts#1563 - but my helm knowledge is limited, if there is anything i can or should improve please let me know |
I checked the documentation, but i could not find any deeper explanation of the ports, nor the used modes for OpenFeature, hence i do not see any need for a documentation update. wdyt? |
@aepfli this one should be good to go. I've added to your PR the flagd ports on the Is there anything here you want us to wait before merging it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that in the Helm update, you are adding FLAGD_OFREP_PORT
to the load-generator, but not in here.
Is that missing?
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
thank you nice catch, added the envvar to the load generator |
from my side we can go ahead with this pr ;) thank you |
…for-loadgenerator
…for-loadgenerator
@aepfli last question before getting this merged. I was testing it out and noticed that the traces for the evaluation are not connected with load-generator: Is there a way to connect the load-generator with the flagd call? |
okay here comes my limited OpenTelemetry know-how ;) Yes there is, our As I said, my knowledge here is limited but am I on the right track, and should we generate a new span for each WebsiteUser invocation? |
Recommendation is doing this: |
But Loadgen is also doing this: https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/load-generator/locustfile.py#L73 🤔 |
we are never creating spans, only adding ourselves to existing ones. So I am not sure, if we should extract this into an own topic, and think about what is a good span for a loadtest. When to create a new one, etc. wdyt? |
There are two different things actually ;) I do not think it makes sense to combine both of them into one span. As the first is responsible for having flag data within the memory. Where as the second one is actually interesting for the span - when we are generating the load. |
Yeah, it makes sense to keep them as separate spans. I wonder if the call shouldn't have a span and be linked to the flagd though |
What's the goal? The current behavior seems correct unless we want to manually create a span within the load generator. |
@beeme1mr the loadgen span is already being created no?! |
I was just assuming that |
Totally! That would indeed be a different issue, I'm just discussing here because we are at it. |
I will do a short exploration, maybe i can create an easy to use solution ;) |
see: #2119 - where i add spans around each task of the locust load generator |
Changes
OpenFeature supports multiple different modes.
The newest implementation relies on threads and other python internal, which seem to be monkeypatched by locust.
Due to this, the IN_PROCESS mode is not working properly anymore and is causing issues.
Instead we suggest to switch to the OFREP (OpenFeature Remote Evaluation Protocol) for this usecase. This is a simple http call which will return all evaluate flags, and will regularly poll for changes.
relates:
Merge Requirements
For new features contributions, please make sure you have completed the following
essential items:
CHANGELOG.md
updated to document new feature additionsMaintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.