StatisticsCollector policy without VerifyApiKey

yhuynh
New Member

I created a proxy that runs StatisticsCollector policy. This is because i want this to be invoked from another proxy call. However since StatisticsCollector policy relies on verifyApiKey to get the needed variables to write to statistics (at least that is my understanding because if i do not add verifyApiKey i get reports with not_set ). Is there a way to 'trick' use StatisticsCollector policy without verifyApiKey and just populate what the StatisticsCollector policy needs (i do not know exactly what varaibles it needs..i tried adding apigee.client_id, apigee.developer.id,..etc. report is still 'not_set'

0 3 124
3 REPLIES 3

To better understand your design, why do you have another proxy with the statistics collector policy? Also, does the first proxy perform a verify api key?

more details-

So for the incoming api call there are 2 params: start_date and end_date and i would like to keep track of the 'months' that were part of that duration and for each month i want to add a statistic. So let's say the api call has start_date=2019-01-15&end_date=2019-03-05 then i want to collect statistics for 012019, 022019, 032019. These would be calculated from the query params so in this case my stats collector doesn't have pre-defined statistics. So i created another proxy that just collects statistics and then i would call this proxy from the first proxy for each statistic that was calculated (so in this case i would call it 3 times).

And yes, the first proxy does perform verifyApiKey policy.

I think you should look at doing this from a single statistics collector policy in just one proxy. I'm not following why you need to do it separately/multiple times.. Use startDate and endDate as dimensions?