Skip to content

Commit

Permalink
Merge branch 'master' into feature/job-monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern authored Nov 22, 2024
2 parents 1eb15b8 + 6adb7df commit aa7b5ab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.49.4
July 11, 2024

* Handle traces with invalid errors

## v2.49.3
June 20, 2024

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ You should use the same method that you used to give the agent the app id and se
| disableNtp | OPTIONS_DISABLE_NTP | false | Disable NTP time synchronization used to get the accurate time in case the server or client's clock is wrong |
| stalledTimeout | STALLED_TIMEOUT | 1800000 (30m) | Timeout used to detect when methods and subscriptions might be stalled (have been running for a long time and might never return). The value is in milliseconds, and can be disabled by setting it to 0 |
| proxy | MONTI_OPTIONS_PROXY | none | Allows you to connect to Monti APM using a proxy |
| disableInstrumentation | MONTI_DISABLE_INSTRUMENTATION | false | Disables instrumentation. Useful for disabling without uninstalling the package |


### Traces

Expand Down
4 changes: 4 additions & 0 deletions lib/hijack/instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import { wrapAgenda } from './agenda.js';

let instrumented = false;
Kadira._startInstrumenting = function (callback) {
if (Meteor.settings?.monti?.disableInstrumentation || process.env.MONTI_DISABLE_INSTRUMENTATION) {
console.log('Monti APM: Instrumentation is disabled.');

Check failure on line 26 in lib/hijack/instrument.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
return;
}
if (instrumented) {
callback();
return;
Expand Down
5 changes: 5 additions & 0 deletions lib/tracer/tracer_store.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ TracerStore.prototype._handleErrors = function (trace) {
if (lastEvent && lastEvent[2]) {
let error = lastEvent[2].error;

if (!error) {
logger('trace does not have valid error', JSON.stringify(trace.events));
return;
}

// grouping errors occured (reset after processTraces)
let errorKey = [trace.type, trace.name, error.message].join('::');
if (!this.errorMap[errorKey]) {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa7b5ab

Please sign in to comment.