feat(observability): Replace Prometheus package with OpenTelemetry

This commit is contained in:
Julian Tölle 2022-02-27 17:57:33 +01:00
parent f67383b761
commit 6b1640b753
22 changed files with 2391 additions and 568 deletions

View file

@ -1,20 +1,18 @@
import { Injectable, OnApplicationBootstrap } from "@nestjs/common";
import { Injectable, Logger, OnApplicationBootstrap } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { SchedulerRegistry } from "@nestjs/schedule";
import { captureException } from "@sentry/node";
import { Logger } from "../logger/logger.service";
import { SpotifyService } from "./spotify/spotify.service";
@Injectable()
export class SchedulerService implements OnApplicationBootstrap {
private readonly logger = new Logger(this.constructor.name);
constructor(
private readonly config: ConfigService,
private readonly registry: SchedulerRegistry,
private readonly spotifyService: SpotifyService,
private readonly logger: Logger
) {
this.logger.setContext(this.constructor.name);
}
private readonly spotifyService: SpotifyService
) {}
onApplicationBootstrap() {
this.setupSpotifyCrawler();