APIM support both production and sandbox endpoint for production use and testing use. In both scenarios, it needs to get a token which represent is it for production or sandbox. When monitoring these analytics usages if analytics is enabled in your system, events are published to the analyzer to summarised in order to view them on the dashboard. But APIM default dashboards are not implemented to distinguish the production or sandbox traffic separately or filter it.
But APIM 2.2.0 analytics events contain the information regarding its token type or endpoint type. But still, it is not possible to achieve this using dashboard. The reason is even though analyzer got the token type information it is not processed. Hence dashboards are also not supported ATM. But this requirement is already in the APIM 3.0.0 roadmap and probably it will be available in APIM 3.0.0 release.
But Still, with key type information, it is possible to come up with the custom gadget or dashboards to fulfill the requirement. Currently, APIM should aggregate traffic of both production and sandbox api invocation. If it is a essential requirement you can used that information to implement custom dashboards.
Here the format of the current request event stream with token type
meta_clientType: {"keyType":"SANDBOX","correlationID":"97e758f7-0ac0-4cbc-aa0a-84a4fe9f96f1"}, consumerKey:ivhMcN6YdASfwFIpfhvQjps2jbMa, context:/pizzashack/1.0.0, api_version:admin--PizzaShackAPI:v1.0.0, api:PizzaShackAPI, resourcePath:/menu, resourceTemplate:/menu, method:GET, version:1.0.0, request:1, requestTime:1526717879778, userId:admin@carbon.super, tenantDomain:carbon.super, hostName:192.168.56.1, apiPublisher:admin, applicationName:DefaultApplication, applicationId:1, userAgent:curl/7.47.0, tier:Unlimited, throttledOut:false, clientIp:192.168.56.1, applicationOwner:admin
Here the key type is in the meta_clientType and it is a json string. Key type can be either PRODUCTION or SANDBOX.
This key type attribute will be available in the all the gateway to analyser event in order to identify it’s endpoint url.
Add Comment
Comments (0)