Skip to content

Commit

Permalink
add package versions reporting back
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoventurini committed Nov 18, 2023
1 parent 62d8860 commit 5976ead
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/.meteor-package-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// the zodern:meteor-package-versions compiler replaces this file with
// the list of packages and their versions
5 changes: 3 additions & 2 deletions lib/kadira.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { handleApiResponse } from './sourcemaps';
import { TrackMeteorDebug, TrackUncaughtExceptions, TrackUnhandledRejections } from './hijack/error';
import { getInfo, MontiAsyncStorage, MontiEnvironmentVariable } from './async/als';
import { EventType } from './constants';
import packageMap from './.meteor-package-versions';

const hostname = require('os').hostname();
const logger = require('debug')('kadira:apm');
Expand Down Expand Up @@ -107,7 +108,7 @@ Kadira.connect = function (appId, appSecret, options) {
appSecret: options.appSecret,
endpoint: options.endpoint,
hostname: options.hostname,
agentVersion: '3.0.0-beta.1'
agentVersion: packageMap['montiapm:agent'] || '<unknown>'
});

Kadira.coreApi._headers['METEOR-RELEASE'] = Meteor.release.replace('METEOR@', '');
Expand Down Expand Up @@ -204,7 +205,7 @@ Kadira._sendAppStats = function () {
_.each(Package, function (v, name) {
appStats.packageVersions.push({
name,
version: null
version: packageMap[name] || null
});
});

Expand Down
6 changes: 3 additions & 3 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ Package.onTest(function (api) {
], ['client', 'server']);
});

function configurePackage(api, isTesting) {
function configurePackage (api, isTesting) {
api.versionsFrom('[email protected]');
api.use('montiapm:[email protected]', ['server']);
api.use('meteorhacks:[email protected]', { weak: true });
api.use('simple:[email protected]', { weak: true });
api.use('zodern:[email protected]');

/**
* Uncomment once fibers is removed from the package.
Expand All @@ -116,8 +117,7 @@ function configurePackage(api, isTesting) {
'underscore', 'random', 'webapp', 'ecmascript'
], ['server']);

// http package constraints is currently broken in alpha 18
// api.use(['[email protected]', 'email'], 'server', { weak: !isTesting });
api.use(['http', 'email'], 'server', { weak: !isTesting });

api.use('fetch', 'server', {
weak: !isTesting,
Expand Down

0 comments on commit 5976ead

Please sign in to comment.