mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
dont sen log s in production
This commit is contained in:
@@ -91,21 +91,25 @@ const createTracingInstance = ({bugPrint, name, module, autoFinish}): TracingTyp
|
||||
const spanContext = _tracer.startSpan(name)
|
||||
|
||||
data = convertAttributesToString(data)
|
||||
openTelemetryLogging.send({
|
||||
type: 'graylog',
|
||||
spanContext,
|
||||
payload: {
|
||||
message: message,
|
||||
object: {
|
||||
...data,
|
||||
spanId,
|
||||
name,
|
||||
user: SessionStore?.user?.FullName,
|
||||
device_name: device?.name || device?.model,
|
||||
commit_date: environment.version.lastCommitTime,
|
||||
if(environment.apiURL != 'https://gdqas-api.oapr.gov.ao/api/') {
|
||||
openTelemetryLogging.send({
|
||||
type: 'graylog',
|
||||
spanContext,
|
||||
payload: {
|
||||
message: message,
|
||||
object: {
|
||||
...data,
|
||||
spanId,
|
||||
name,
|
||||
user: SessionStore?.user?.FullName,
|
||||
device_name: device?.name || device?.model,
|
||||
commit_date: environment.version.lastCommitTime,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
getAttribute: (key: string) => {
|
||||
return data.tags[key]
|
||||
|
||||
Reference in New Issue
Block a user