Skip to content
Snippets Groups Projects
Unverified Commit 41215009 authored by Diego Sampaio's avatar Diego Sampaio Committed by GitHub
Browse files

refactor: move function to tracing pkg (#34818)

parent 87b28eec
No related branches found
No related tags found
No related merge requests found
import { traceInstanceMethods } from '@rocket.chat/core-services';
import type { RocketChatRecordDeleted } from '@rocket.chat/core-typings';
import type { IBaseModel, DefaultFields, ResultFields, FindPaginated, InsertionModel } from '@rocket.chat/model-typings';
import type { Updater } from '@rocket.chat/models';
import { getCollectionName, UpdaterImpl } from '@rocket.chat/models';
import { traceInstanceMethods } from '@rocket.chat/tracing';
import { ObjectId } from 'mongodb';
import type {
BulkWriteOptions,
......
......@@ -51,7 +51,6 @@ import type { IVoipFreeSwitchService } from './types/IVoipFreeSwitchService';
import type { IVoipService } from './types/IVoipService';
export { asyncLocalStorage } from './lib/asyncLocalStorage';
export { traceInstanceMethods } from './lib/asyncMethodCallContext';
export { MeteorError, isMeteorError } from './MeteorError';
export { api } from './api';
export { EventSignatures } from './events/Events';
......
......@@ -9,6 +9,8 @@ import { initDatabaseTracing } from './traceDatabaseCalls';
let tracer: Tracer | undefined;
export * from './traceInstanceMethods';
export function isTracingEnabled() {
return ['yes', 'true'].includes(String(process.env.TRACING_ENABLED).toLowerCase());
}
......
import { tracerActiveSpan } from '@rocket.chat/tracing';
import { tracerActiveSpan } from '.';
const getArguments = (args: any[]): any[] => {
return args.map((arg) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment