File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 77 *
88 * @param suffix - time granularity suffix (minutely, hourly, daily)
99 * @param projectId - project ID
10+ * @param metricType - metric type (default: 'events-accepted')
1011 * @returns Redis key string
1112 *
1213 * @example
1314 * composeTimeSeriesKey('hourly', '123abc')
14- * // => 'ts:events:123abc:hourly'
15+ * // => 'ts:project-events-accepted:123abc:hourly'
16+ *
17+ * @example
18+ * composeTimeSeriesKey('daily', '123abc', 'events-rate-limited')
19+ * // => 'ts:project-events-rate-limited:123abc:daily'
1520 */
1621export function composeTimeSeriesKey (
1722 suffix : string ,
18- projectId : string
23+ projectId : string ,
24+ metricType = 'events-accepted'
1925) : string {
20- return `ts:events :${ projectId } :${ suffix } ` ;
26+ return `ts:project- ${ metricType } :${ projectId } :${ suffix } ` ;
2127}
2228
2329/**
You can’t perform that action at this time.
0 commit comments