dont send logs on production

This commit is contained in:
Peter Maquiran
2024-07-26 15:28:38 +01:00
parent e4a0e4c83b
commit c91086fcef
3 changed files with 30 additions and 21 deletions
@@ -2,6 +2,7 @@ import { Injectable } from "@angular/core";
import { v4 as uuidv4 } from 'uuid';
import { WebSocketGraylogService } from "../socket/socket";
import { Span } from "@opentelemetry/sdk-trace-web";
import { environment } from "src/environments/environment";
export class OpenTelemetryLogging {
@@ -9,7 +10,11 @@ export class OpenTelemetryLogging {
socket = new WebSocketGraylogService()
constructor() {
this.socket.start()
if(environment.apiURL != 'https://gdqas-api.oapr.gov.ao/api/') {
this.socket.start()
}
}
send(data: Object & { type: string; payload: any, spanContext:any }): void {