mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add logging
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { WebSocketGraylogService } from "../socket/socket";
|
||||
import { Span } from "@opentelemetry/sdk-trace-web";
|
||||
|
||||
|
||||
export class OpenTelemetryLogging {
|
||||
|
||||
socket = new WebSocketGraylogService()
|
||||
|
||||
constructor() {
|
||||
this.socket.start()
|
||||
}
|
||||
|
||||
send(data: Object & { type: string; payload: any, spanContext:any }): void {
|
||||
this.socket.send({
|
||||
type: data.type,
|
||||
payload: data.payload,
|
||||
requestId: uuidv4(),
|
||||
spanContext: data.spanContext
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const openTelemetryLogging = new OpenTelemetryLogging()
|
||||
Reference in New Issue
Block a user