mirror of
https://github.com/apricote/Listory.git
synced 2026-02-06 17:57:03 +00:00
chore(deps): bump all (#294)
This commit is contained in:
parent
1979d924c9
commit
38cf2ff549
69 changed files with 4681 additions and 3804 deletions
|
|
@ -6,14 +6,14 @@ import {
|
|||
import { HttpService } from "@nestjs/axios";
|
||||
import { Injectable, Logger } from "@nestjs/common";
|
||||
import { Counter, Histogram } from "@opentelemetry/api-metrics";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
import type { InternalAxiosRequestConfig } from "axios";
|
||||
import { MetricService } from "nestjs-otel";
|
||||
import { UrlValueParserService } from "../../../open-telemetry/url-value-parser.service";
|
||||
|
||||
const SPOTIFY_API_METRICS_CONFIG_KEY = Symbol("kSpotifyApiMetricsInterceptor");
|
||||
|
||||
// Merging our custom properties with the base config
|
||||
interface SpotifyApiMetricsConfig extends AxiosRequestConfig {
|
||||
interface SpotifyApiMetricsConfig extends InternalAxiosRequestConfig {
|
||||
[SPOTIFY_API_METRICS_CONFIG_KEY]: {
|
||||
startTime: number;
|
||||
};
|
||||
|
|
@ -28,13 +28,13 @@ export class MetricsInterceptor extends AxiosInterceptor<SpotifyApiMetricsConfig
|
|||
constructor(
|
||||
httpService: HttpService,
|
||||
metricService: MetricService,
|
||||
private readonly urlValueParserService: UrlValueParserService
|
||||
private readonly urlValueParserService: UrlValueParserService,
|
||||
) {
|
||||
super(httpService);
|
||||
|
||||
this.responseCounter = metricService.getCounter(
|
||||
"listory_spotify_api_http_response",
|
||||
{ description: "Total number of HTTP responses from Spotify API" }
|
||||
{ description: "Total number of HTTP responses from Spotify API" },
|
||||
);
|
||||
|
||||
this.requestHistogram = metricService.getHistogram(
|
||||
|
|
@ -43,7 +43,7 @@ export class MetricsInterceptor extends AxiosInterceptor<SpotifyApiMetricsConfig
|
|||
description:
|
||||
"HTTP latency value recorder in seconds for requests made to Spotify API",
|
||||
unit: "seconds",
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ export class MetricsInterceptor extends AxiosInterceptor<SpotifyApiMetricsConfig
|
|||
status: response.status.toString(),
|
||||
path: this.urlValueParserService.replacePathValues(
|
||||
response.config.url,
|
||||
"<id>"
|
||||
"<id>",
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue