1. 4

I’ve found a number of services that can be used to get insight into the usage of the web API’s you provide. See them as “Google Analytics for API’s”. For example I found Apigee, Moesif and Amplitude. However, I’m not able to find any actual usage stories or reviews. Does anybody here have experience with gathering insights like this? Or maybe with a completely different solutions, or build-it-yourself?

    1. 9

      Based on your other comment where you say this is a VPS with nginx and unicorn, why not just use the logs for analytics? https://goaccess.io/ should help you with that.

      1. 2

        Seems like a great solution indeed, thanks!

    2. 2

      It really depends on what insights you’re interested in; or rather which metrics are important enough to monitor their value between one or more alarm triggers.

      For most APIs the only metrics anyone should care about are: transaction throughput, response timings and number of failed requests. You might also want a breakdown of slowest endpoints and a response time distribution graph but really the key metrics are answering two questions:

      • are we serving all transactions within an appropriate timeframe?
      • is our error rate within an acceptable range?

      You might want to look into the open standard: Apdex (Application Performance Index).

    3. 1

      Derric here, CEO of Moesif and wanted to see if I can help. Curious which types of insights you’re looking for? How are your APIs typically adopted? If you’re already using NGINX, I would recommend the NGINX plugin since it’s usually the central point that all API traffic goes through. We do have some case studies and sites like G2 are usually good to check out.

    4. 1

      Is your service behind an api gateway of some sort? I’d expect the gateway to be able to give you some good stats, especially if you’re requiring authentication

      1. 1

        You mean a service from AWS or the like? It is not unfortunately. Just a VPS with nginx & unicorn.

    5. 1

      Depends on what you want to analyze. I found sentry to be very useful as it gives me insights into Performance and Issues.

      1. 1

        Interesting, hadn’t thought about that one. I’m thinking about web specific values, for example: which api endpoints are used most by which user-agent. Would that be possible?

        1. 1

          Probably not easily. Sentry is more focussed on catching errors and providing stats about performance. If your use cases are more like the one described, I’d go with a simple access log parser (as suggested by @acatton)

    6. 1

      prometheus with grafana (or similar)?