flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Epic: Send client information from SDKs

Open novakzaballa opened this issue 2 years ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. We need to collect data about the usage of our different SDKs in order to prioritize, assign resources, and better support them.

Currently, we don´t have usage data about our different SDKs, which makes it difficult to make data-driven decision-making when it comes to prioritizing, assigning resources for maintenance, and better supporting each of them.

As a technical decision-maker at Flagsmith, I would like to have a usage dashboard/report of all (or various) of our SDKs. Metrics should include total API calls in a period of time, active clients in a period of time, and any other relevant metrics that indicate the overall adoption of SDKs. The data should be displayed in numeric and graphical formats and should include:

  • Number of calls from every SDK to the API in a period of time (at least monthly).
  • The percentage of every SDK calls regarding the total API calls in a period of time (at least monthly).
  • Active customer accounts in a period of time per SDK.
  • The history of the number (and percentage) of monthly calls during a period of time of various SDKs (or at least a particular SDK), in order to appreciate its evolution over time.

Describe the solution you'd like Collect data about the usage of our different SDKs by adding the SDK Id and version to the user-agent header of every SDK request to the API.

As part of this work, it would be great to expose the information about any outdated / vulnerable Flagsmith clients that a customer might have in their tech stack.

Additional context Suggested headers are:

UserAgent=FlagsmithPythonClient/v2.5.6
X-Customer-Application-Name: CustomerAppName
X-Customer-Application-Version=<customer app version>

novakzaballa avatar Jul 20 '23 05:07 novakzaballa

Related - https://github.com/Flagsmith/flagsmith/issues/2354 and https://github.com/Flagsmith/flagsmith/issues/1898 - @novakzaballa can you consolidate these issues down to one thanks!

dabeeeenster avatar Jul 20 '23 10:07 dabeeeenster

Suggested headers to add:

UserAgent=FlagsmithPythonClient/v2.5.6
X-Customer-Application-Name: CustomerAppName
X-Customer-Application-Version=<customer app version>

This will require the addition of additional arguments to the client constructor to set the customer's application name and version.

matthewelwell avatar Jul 20 '23 12:07 matthewelwell