@@ -6,9 +6,9 @@ interface Params {
66 apiKey : string ;
77 path : string ;
88 method : string ;
9- statusCode : number | null ;
109 timeMillis : number ;
1110 query ?: string ;
11+ statusCode ?: number | null ;
1212 apilyticsIntegration ?: string ;
1313 integratedLibrary ?: string ;
1414}
@@ -21,14 +21,14 @@ interface Params {
2121 * @param params.apiKey - The API key for your Apilytics origin.
2222 * @param params.path - Path of the user's HTTP request, e.g. '/foo/bar/123'.
2323 * @param params.method - Method of the user's HTTP request, e.g. 'GET'.
24- * @param params.statusCode - Status code for the sent HTTP response.
25- * Can be null if the middleware could not get the status code
26- * for the response. E.g. if the inner request handling threw an exception.
2724 * @param params.timeMillis - The amount of time in milliseconds it took
2825 * to respond to the user's request.
2926 * @param params.query - Optional query string of the user's HTTP request
3027 * e.g. 'key=val&other=123'. An empty string and null are treated equally.
3128 * Can have an optional '?' at the start.
29+ * @param params.statusCode - Status code for the sent HTTP response.
30+ * Can be omitted (or null) if the middleware could not get the status code
31+ * for the response. E.g. if the inner request handling threw an exception.
3232 * @param params.apilyticsIntegration - Name of the Apilytics integration that's
3333 * calling this, e.g. 'apilytics-node-express'.
3434 * No need to pass this when calling from user code.
@@ -53,9 +53,9 @@ export const sendApilyticsMetrics = ({
5353 apiKey,
5454 path,
5555 method,
56- statusCode,
5756 timeMillis,
5857 query,
58+ statusCode,
5959 apilyticsIntegration,
6060 integratedLibrary,
6161} : Params ) : void => {
0 commit comments