Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { Session, Subscription, MongoCursor } = require('./meteorx');
const instrumentMethods = require('./instrumenting/methods');
const instrumentHttp = require('./instrumenting/http');
const instrumentSession = require('./instrumenting/session');
const instrumentSubscription = require('./instrumenting/subscription');
const instrumentAsync = require('./instrumenting/async');
const instrumentDB = require('./instrumenting/db');
const startMetrics = require('./metrics');
const hackDB = require('./hacks');
const [framework, version] = Meteor.release.split('@');
Agent.setFramework({
name: framework,
version,
override: true
});
shimmer.wrap(Agent, 'start', function(startAgent) {
return function(...args) {
const config = args[0] || {};
if (config.active !== false) {
Meteor.startup(() => {
try {
hackDB();
instrumentMethods(Agent, Meteor);
instrumentHttp(Agent, WebApp);