CUPTI library error when subscribing mutiple subscribers

I am willing to read multiple metrics via CUPTI library. I rewrite the sample code “callback_metric” and convert some variables defined in the original source code such as metricName, metricId, metricDatas, etc. to arrays e.g. metricNames, metricIds, metricDatass, etc.

CUpti_SubscriberHandle *subscribers;
char **metricNames;
CUpti_MetricID *metricIds;
CUpti_EventGroupSets **passDatas;
MetricData_t *metricDatas;
CUpti_MetricValue *metricValues;

Everything seems good, unless the line of code that calls the subscriber (assume that there are two desired metrics and therefore two metricDatas, so I defined two subscribers).

CUPTI_CALL(cuptiSubscribe(&subscribers[0], (CUpti_CallbackFunc)getMetricValueCallback, &metricDatas[0]));
CUPTI_CALL(cuptiSubscribe(&subscribers[1], (CUpti_CallbackFunc)getMetricValueCallback, &metricDatas[1]));

In the runtime I get this error:

function cuptiSubscribe(&subscribers[1], (CUpti_CallbackFunc)getMetricValueCallback2, &metricDatas[1]) failed with error CUPTI_ERROR_MAX_LIMIT_REACHED

Is there any better or easy way to read multiple metrics? Is it possible via a single subscriber?