collecting and analyzing api statistics

17
Last Updated: Oct. 2014 Joseph Fonseka & Chamila Adhikarinayake Collecting and Analyzing API Statistics WSO2 API Manager Team

Upload: wso2

Post on 05-Dec-2014

376 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Collecting and Analyzing API Statistics

Last Updated: Oct. 2014

Joseph Fonseka & Chamila Adhikarinayake

Collecting and Analyzing API

Statistics

WSO2 API Manager Team

Page 2: Collecting and Analyzing API Statistics

**

About the Presenters

๏ Joseph FonsekaJoseph joined WSO2 in September 2013. He is a Senior Tech Lead in the WSO2 API Manager team where he focuses on improving the UX of the API Manager. In addition to his product development efforts he is also a contributor to the Sahana and OpenEvsys open-source projects. He is also a FOSS advocate.

๏ Chamila AdhikarinayakeChamila is Software Engineer at WSO2. Prior to joining WSO2, he worked at AtLink Communications (Pvt) Ltd. as a trainee Software Engineer where he was responsible for developing a customer loyalty application system for Dialog Axiata PLC. He holds a bachelor’s degree in Computer Science and Engineering from University of Moratuwa.

Page 3: Collecting and Analyzing API Statistics

*

About WSO2

*

๏ Global enterprise, founded in 2005 by acknowledged leaders in XML, web services technologies, standards and open source

๏ Provides only open source platform-as-a-service for private, public and hybrid cloud deployments

๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.

๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C.

๏ Driven by Innovation

๏ Launched first open source API Management solution in 2012

๏ Launched App Factory in 2Q 2013

๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013

Page 4: Collecting and Analyzing API Statistics

**

What WSO2 delivers

Page 5: Collecting and Analyzing API Statistics

*

Introduction

● What API Manager Offers.

● Collecting & Analysing statistic with BAM.

● Analysing & Visualizing Stats ( Example ).

● Real Time data analysis & alerting with CEP.

Page 6: Collecting and Analyzing API Statistics

*

Collecting Stats with AM

● API manager push statistical data through event streams. ( Request, Response & Fault )

● AM event streams can be configured to push data to CEP & BAM.

● Google Analytics handler can be use to push API usage data to GA.

Page 7: Collecting and Analyzing API Statistics

*

AM Deployment

Back End Service

Client / Partner

Event Streams Event Streams

STAT DBAggregated Data

Statistical data retrive for display

1 2

3 3

45

Page 8: Collecting and Analyzing API Statistics

*

Configuring APIM with BAM● Official Documentation

○ https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics

● Steps○ Create a database to store api usage statistics. This

database is shared between API manager and BAM ○ Configure WSO2 AM to publish data to WSO2 BAM

using default publisher agent○ Deploy toolbox in BAM to analyze and put

summarized data to shared database

Page 9: Collecting and Analyzing API Statistics

*

Data passed in the default stream

Page 10: Collecting and Analyzing API Statistics

*

View Statistics using API Manager● API Runtime Statics - View API usage from API Publisher and

API Store ○ View information related to api subscriptions, api usage,

usage related to api version, etc from API Publisher○ View application related information○ These charts can be customized

● Monetization of the API usage - View Billing information from API Store ○ Generate bills for API consumers on usage

Page 11: Collecting and Analyzing API Statistics

*

View Usage Data using BAM tools● Published data can be visualized using BAM gadget tools and

reporting tools

○ BAM gadget tools■ Can configure to query stat database in a constant intervals and

display the data in charts.

○ BAM reports■ Can create many types of report such as bar chart report, table

report, pie chart, etc.

Page 12: Collecting and Analyzing API Statistics

*

Real Time Analysis with CEP

● WSO2 CEP identifies the most meaningful events within the event cloud, analyzes their impacts, and acts on them in real time.

● CEP is extremely high performing and massively scalable.

● It allows you to execute Siddhi queries to process and Analyse data in an event stream.

Page 13: Collecting and Analyzing API Statistics

*

Real Time Dashboard Sample

● We will looking at how to setup a simple dashboard to monitor per-second request count coming in to an API.

Page 14: Collecting and Analyzing API Statistics

*

Sample Setup

Back End Service

Client / Partner

Event Streams Event Streams

1 2

3 3

4Real Time Stats (HTTP)

Page 15: Collecting and Analyzing API Statistics

*

Configuring CEP Demo

● Configure API Manager to push event stream to CEP.

● Create an Execution Plan.

● Configure Output Event Adapters.

● Configure Outflow of a stream.

Page 16: Collecting and Analyzing API Statistics

*

Questions ?

Page 17: Collecting and Analyzing API Statistics

Contact us !