Skip to content
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

Configurate API to keep flag analytics data but drop API traffic. #2580

Closed
landonjs opened this issue Aug 3, 2023 · 9 comments · Fixed by #3386
Closed

Configurate API to keep flag analytics data but drop API traffic. #2580

landonjs opened this issue Aug 3, 2023 · 9 comments · Fixed by #3386
Assignees
Labels
api Issue related to the REST API good first issue Good for newcomers improvement Improvement to the existing platform

Comments

@landonjs
Copy link

landonjs commented Aug 3, 2023

Is your feature request related to a problem? Please describe.

All of our API requests to Flagsmith come from internal dapr calls so all the requests are the same. The data isn't useful and generates millions of requests a day.

Describe the solution you'd like
We would like the ability to not keep API requests but still track features and audits. This would keep the DB table smaller and free up cycles in the task processor.

Additional context

Add any other context or screenshots about the feature request here.

https://discord.com/channels/517647859495993347/517647859966017541/threads/1136724109103992912

image

@dabeeeenster
Copy link
Contributor

I'm not sure what the best way to configure this is? Maybe as a ENV VAR configurable list that defaults to [tasks.track_request, tasks.track_feature_evaluation,...]

@landonjs
Copy link
Author

landonjs commented Aug 4, 2023

That would work 👍

@matthewelwell
Copy link
Contributor

I'm not sure what the best way to configure this is? Maybe as a ENV VAR configurable list that defaults to [tasks.track_request, tasks.track_feature_evaluation,...]

We would need to do the configuration at a slightly higher level as there is more logic than just the tasks here, but an env var to control which pieces of analytics are enabled would likely be the best option, yes.

@dabeeeenster dabeeeenster changed the title Allow to keep flag analytics data but drop API traffic. Configurate API to keep flag analytics data but drop API traffic. Aug 6, 2023
@dabeeeenster dabeeeenster added improvement Improvement to the existing platform api Issue related to the REST API good first issue Good for newcomers labels Aug 6, 2023
@sumit-158
Copy link

Can I work on this?

@matthewelwell
Copy link
Contributor

@sumit-158 yes, please feel free!

@sumit-158
Copy link

Can you guide more about the problem and the file location?

@matthewelwell
Copy link
Contributor

There should be enough information in the description and the comments already? Perhaps you can make sure you've read and understood those and ask any specific questions you might have?

Here are some files that will likely need modification:

https://github.com/Flagsmith/flagsmith/blob/main/api/app_analytics/tasks.py
https://github.com/Flagsmith/flagsmith/blob/main/api/app_analytics/middleware.py
https://github.com/Flagsmith/flagsmith/blob/main/api/app_analytics/views.py

@SD-13
Copy link

SD-13 commented Oct 27, 2023

Hey @sumit-158 , are you still working on this issue. If not, please let me know, I want to give it a try

@sumit-158
Copy link

@SD-13 sure go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API good first issue Good for newcomers improvement Improvement to the existing platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants