Skip to content

Commit

Permalink
refactor: move function to tracing pkg (#34818)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Dec 26, 2024
1 parent 87b28ee commit 4121500
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/server/models/raw/BaseRaw.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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,
Expand Down
1 change: 0 additions & 1 deletion packages/core-services/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 2 additions & 0 deletions packages/tracing/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { tracerActiveSpan } from '@rocket.chat/tracing';
import { tracerActiveSpan } from '.';

const getArguments = (args: any[]): any[] => {
return args.map((arg) => {
Expand Down

0 comments on commit 4121500

Please sign in to comment.