mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add monitoring
This commit is contained in:
@@ -4,6 +4,7 @@ import { Tracer, Span } from '@opentelemetry/sdk-trace-base';
|
||||
import { OpentelemetryAgendaProvider } from './opentelemetry';
|
||||
import { Device, DeviceInfo } from '@capacitor/device';
|
||||
|
||||
|
||||
const tracerInstance = OpentelemetryAgendaProvider.getTracer('example-tracer-hole', '111', {
|
||||
|
||||
})
|
||||
@@ -81,12 +82,18 @@ export function XTracerAsync({ name, log, bugPrint }: any, p0?: any) {
|
||||
try {
|
||||
const result = await originalMethod.apply(this, args);
|
||||
|
||||
tracing.finish()
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
} catch (e) {
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
console.error(e);
|
||||
return false
|
||||
}
|
||||
@@ -162,12 +169,18 @@ export function XTracer({name, log, bugPrint}: any) {
|
||||
try {
|
||||
const result = originalMethod.apply(this, args);
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
|
||||
return result
|
||||
} catch (e) {
|
||||
|
||||
tracing.finish()
|
||||
|
||||
if(!window.location.origin.includes('https')) {
|
||||
tracing.finish()
|
||||
}
|
||||
console.error(e);
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user