Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Meteor 3 #93

Open
wants to merge 311 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
311 commits
Select commit Hold shift + click to select a range
37ab823
remove hooks capture
leonardoventurini May 16, 2023
accfdfe
add async parallel test
leonardoventurini May 16, 2023
13b6eda
Revert "remove hooks capture"
leonardoventurini May 16, 2023
1880be0
do not record stack trace for now
leonardoventurini May 17, 2023
53d2fb9
remove compute events
leonardoventurini May 17, 2023
ebe3ec6
add interval merging utils
leonardoventurini May 17, 2023
333a5ef
merge work intervals
leonardoventurini May 18, 2023
9543b74
add constants
leonardoventurini May 19, 2023
a2ddc7f
store active event
leonardoventurini May 22, 2023
28ea37d
record nested events up to one level
leonardoventurini May 22, 2023
83111a2
fix test
leonardoventurini May 22, 2023
dd81d5c
add better event tracking interface/logic
leonardoventurini May 25, 2023
9c8b77c
prevent nesting more than 1 level
leonardoventurini May 25, 2023
679bc58
remove tracking of find
leonardoventurini May 25, 2023
fe6b8a8
discard events deeper than 1 level
leonardoventurini May 25, 2023
4cc91ac
add test check
leonardoventurini May 29, 2023
f0c83a2
fix tests
leonardoventurini May 29, 2023
b3a82c8
fix tests: observeChanges
leonardoventurini May 29, 2023
be1eb65
fix tests: complete after error
leonardoventurini May 29, 2023
d82a525
fix tests: same event twice
leonardoventurini May 29, 2023
be25269
fix remaining tests
leonardoventurini May 29, 2023
d2d5a84
simplify code
leonardoventurini May 30, 2023
e888009
remove extra frames
leonardoventurini May 30, 2023
2e58753
simplify email wrapper
leonardoventurini May 30, 2023
97ed333
remove legacy code
leonardoventurini May 30, 2023
6224e77
add trigger asyncId
leonardoventurini May 31, 2023
14f165f
add initial async events capture using async hooks
leonardoventurini Jun 1, 2023
02693b0
fix typo
leonardoventurini Jun 2, 2023
932e476
metrics adjustments/checks
leonardoventurini Jun 2, 2023
8e6b657
remove unused code
leonardoventurini Jun 5, 2023
89d87e4
compute async and compute metrics based on intervals deduplication logic
leonardoventurini Jun 5, 2023
964930f
adjust function so it does not depend on the other
leonardoventurini Jun 6, 2023
601e0e2
fix async events being captured for meteor internals for methods
leonardoventurini Jun 7, 2023
d5a800b
fix async events being captured for meteor internals for subs
leonardoventurini Jun 8, 2023
382d7c1
pull request suggestions
leonardoventurini Jun 9, 2023
e71851e
add promise wrap
leonardoventurini Jun 9, 2023
76faba8
enable async events for other wraps
leonardoventurini Jun 9, 2023
c21f9b8
rename als to async as it also includes async hooks
leonardoventurini Jun 10, 2023
dc63f45
add initial documentation regarding async
leonardoventurini Jun 10, 2023
a3bcb14
add more information regarding awaits
leonardoventurini Jun 12, 2023
8eb8b58
add more information on then and catch
leonardoventurini Jun 13, 2023
a7d4594
add info regarding promiseResolve
leonardoventurini Jun 13, 2023
e17541c
pin node version to 18
leonardoventurini Jun 13, 2023
5c5045c
add experimental async playground
leonardoventurini Jun 13, 2023
81e0e5d
initial nested events for async events
leonardoventurini Jun 13, 2023
5af5f89
add info on the promise executor function
leonardoventurini Jun 13, 2023
f9affaf
explain promise executor init
leonardoventurini Jun 13, 2023
f687259
eliminate async events with duration not above 0
leonardoventurini Jun 14, 2023
ac944ba
fix wrappers appearing as async events
leonardoventurini Jun 14, 2023
4410d32
break down into smaller files
leonardoventurini Jun 15, 2023
fc3475c
add node options on tests
leonardoventurini Jun 15, 2023
893c06d
revert hijacking findOneAsync
leonardoventurini Jun 15, 2023
ead29ed
if no event then don't set store
leonardoventurini Jun 15, 2023
4d75ba3
remove package with dependency conflict
leonardoventurini Jun 16, 2023
57a9287
remove unused code
leonardoventurini Jun 16, 2023
a3e9d7b
add environment variable
leonardoventurini Jun 16, 2023
c898e2c
check of environment variable too in this case
leonardoventurini Jun 19, 2023
b6e8ca7
improve testing accounting for async events
leonardoventurini Jun 19, 2023
ff4b65f
improve event cleanup for tests and fix some tests
leonardoventurini Jun 20, 2023
3af4893
add cleanup command
leonardoventurini Jun 22, 2023
186c3ae
fix tests and other improvements
leonardoventurini Jun 22, 2023
4607644
detect resources which should be siblings
leonardoventurini Jun 23, 2023
a3d8242
this is not needed
leonardoventurini Jun 23, 2023
b6103a0
add base metrics
leonardoventurini Jun 27, 2023
1880904
add interval tree
leonardoventurini Jun 28, 2023
cfef5ce
fix testing issues and improve async event filtering
leonardoventurini Jun 28, 2023
2ea716a
fix tests and revert sibling logic
leonardoventurini Jun 29, 2023
f112ca9
add info to async readme
leonardoventurini Jul 3, 2023
aa255b1
remove direct event creation for async resources
leonardoventurini Jul 3, 2023
b706798
fix tests; remove tests for async events
leonardoventurini Jul 3, 2023
e61182c
simplify interval union
leonardoventurini Jul 4, 2023
ab0234d
fix metrics and remove unused code
leonardoventurini Jul 7, 2023
23d8f61
hardcode agent version
leonardoventurini Jul 7, 2023
6edc058
fix deprecation warning
leonardoventurini Sep 4, 2023
6dabd0d
upgrade package
leonardoventurini Sep 4, 2023
7b6dfef
adjust versions
leonardoventurini Sep 4, 2023
b8a3d2b
make it adaptive instead
leonardoventurini Sep 5, 2023
1ab906e
run tests on alpha 10
leonardoventurini Sep 8, 2023
733c0bd
test adjustments
leonardoventurini Sep 8, 2023
e11fa88
properly migrate webapp logic to new express impl
leonardoventurini Sep 8, 2023
b26f832
Merge branch 'master' into feature/fiberless
leonardoventurini Sep 8, 2023
7a43d27
remove .envrc
leonardoventurini Sep 13, 2023
672a593
support typescript eslint
leonardoventurini Sep 15, 2023
927cbf1
adjust versions
leonardoventurini Sep 18, 2023
aee8fb3
upgrade meteorx
leonardoventurini Sep 18, 2023
6c93a11
fix test for fetch
leonardoventurini Oct 24, 2023
2ffad86
remove version constraints
leonardoventurini Oct 24, 2023
11e8935
add alpha 16
leonardoventurini Oct 27, 2023
7874ca8
use core beta
leonardoventurini Oct 27, 2023
1a3cf08
Merge branch 'master' into feature/fiberless
leonardoventurini Oct 27, 2023
e73aaed
use correct path for core
leonardoventurini Oct 27, 2023
a969763
fix lint
leonardoventurini Oct 27, 2023
78ec864
move pretty log packages
leonardoventurini Oct 27, 2023
d1b4d43
test using meteor directly
leonardoventurini Oct 27, 2023
3f5319f
fix unknown release
leonardoventurini Oct 27, 2023
e0cc9df
test in console
leonardoventurini Oct 27, 2023
f8cd976
add async event capture using await detector
leonardoventurini Oct 30, 2023
1929a29
push wip
leonardoventurini Oct 31, 2023
c4a6016
not this one
leonardoventurini Oct 31, 2023
57a8b55
fix endAt test
leonardoventurini Nov 2, 2023
fcf1f67
fix undefined error
leonardoventurini Nov 2, 2023
851dddd
add proxy interceptor
leonardoventurini Nov 2, 2023
47cae27
wrap bind environment to ignore async events from it
leonardoventurini Nov 2, 2023
d5ec746
remove log
leonardoventurini Nov 2, 2023
44359a3
we are not nesting for now
leonardoventurini Nov 2, 2023
e8a6bce
revert gh workflow changes
leonardoventurini Nov 6, 2023
babf7b3
revert gh workflow changes
leonardoventurini Nov 6, 2023
4c88ab8
no need in using resources for calculating async and compute metrics
leonardoventurini Nov 6, 2023
51ee531
remove logs
leonardoventurini Nov 7, 2023
7c960c8
latest alpha
leonardoventurini Nov 7, 2023
6dfd3c9
remove file
leonardoventurini Nov 7, 2023
d012fe6
remove log
leonardoventurini Nov 7, 2023
745ca9d
simplify code
leonardoventurini Nov 7, 2023
b601847
allow app to crash if there is any error on startup
leonardoventurini Nov 7, 2023
b4b2576
events shouldn't be bundled in the client
leonardoventurini Nov 7, 2023
8a8963c
remove function
leonardoventurini Nov 7, 2023
91649cc
adjust formatting
leonardoventurini Nov 7, 2023
f528aeb
simplify test code
leonardoventurini Nov 7, 2023
9442258
rename email event
leonardoventurini Nov 7, 2023
7b67764
remove code
leonardoventurini Nov 7, 2023
ae72673
delete comment
leonardoventurini Nov 7, 2023
c5e4966
add function name to data
leonardoventurini Nov 7, 2023
ab37fdb
use detector ignore
leonardoventurini Nov 8, 2023
c3980f5
Merge branch 'feature/fiberless' into feature/async-events
leonardoventurini Nov 8, 2023
29e6ca9
fix lint
leonardoventurini Nov 8, 2023
a352455
add comment
leonardoventurini Nov 8, 2023
24e90bd
simplify compute and async metric calculation
leonardoventurini Nov 9, 2023
e463f9f
upgrade core
leonardoventurini Nov 9, 2023
9918e41
Merge pull request #104 from monti-apm/feature/async-events
zodern Nov 9, 2023
dba540b
Remove test-helpers
zodern Nov 9, 2023
89f4ec2
add compute events back
leonardoventurini Nov 10, 2023
e14f20c
Merge remote-tracking branch 'origin/feature/fiberless' into feature/…
leonardoventurini Nov 10, 2023
d2c36dd
remove dependency on accounts base
leonardoventurini Nov 10, 2023
37b434c
fix test
leonardoventurini Nov 10, 2023
c287ea9
simplify code
leonardoventurini Nov 10, 2023
f644936
use meteor alpha version
leonardoventurini Nov 10, 2023
f4cdb86
remove packages from the bundle
leonardoventurini Nov 10, 2023
f911b6f
adjust workflow
leonardoventurini Nov 10, 2023
25d52ec
adjust workflow
leonardoventurini Nov 10, 2023
4a14385
Small optimizations to tracer
zodern Nov 10, 2023
291ff50
Fix custom events not ending
zodern Nov 11, 2023
fb6213f
Fix async events not ending
zodern Nov 11, 2023
d3c8073
Small improvements to optimized trace size
zodern Nov 11, 2023
a466c90
Always store data when set
zodern Nov 11, 2023
122b59c
Fix using Monti.event outside of trace
zodern Nov 11, 2023
0dda848
Change order of arguments in Kadira.event
zodern Nov 11, 2023
43cd864
Document Monti.event
zodern Nov 11, 2023
cda42ff
Combine sync and async callbacks
zodern Nov 11, 2023
a4b9835
Remove async id's from built trace
zodern Nov 12, 2023
dc670f2
Let event handle generating stack
zodern Nov 12, 2023
05674f4
Combine method wrappers
zodern Nov 13, 2023
6a0f1c3
Optimize creating async events
zodern Nov 13, 2023
87f7cee
Remove runWithEvent
zodern Nov 13, 2023
3e05b68
revert line change
leonardoventurini Nov 13, 2023
866862d
fix sharing the same store
leonardoventurini Nov 13, 2023
7527562
add test back
leonardoventurini Nov 13, 2023
f1fa4f8
optimize noOfCachedDocs
leonardoventurini Nov 13, 2023
2e1709a
Fix lint errors
zodern Nov 13, 2023
3c4bef5
Force color in tests
zodern Nov 13, 2023
29f68e9
Merge pull request #105 from monti-apm/feature/fiberless-trace-adjust…
zodern Nov 13, 2023
e84e38b
Avoid mutating events when optimizing
zodern Nov 13, 2023
69c5238
Fix compute with force ended events
zodern Nov 13, 2023
98110d1
Add offset to efficiently store parallel events
zodern Nov 14, 2023
13890f0
Remove unused parentEvent
zodern Nov 14, 2023
1b1b438
Call fn directly in asyncEvent
zodern Nov 14, 2023
f2003d3
Fix tests
zodern Nov 14, 2023
4076285
Track compute at beginning of nested events
zodern Nov 14, 2023
cd9eda5
Adjust flaky tests
zodern Nov 14, 2023
76416b7
wrap _nextObjectPromise and add test
leonardoventurini Nov 14, 2023
7e223ec
Add test for offset accuracy
zodern Nov 14, 2023
5e8a1d4
Only count each ms once
zodern Nov 14, 2023
8f2d57e
Use nested events for metrics in place of custom event
zodern Nov 14, 2023
443e228
Improve flaky test
zodern Nov 14, 2023
f0fe6f0
Speed up test
zodern Nov 14, 2023
edc33ff
Ignore unhelpful async events
zodern Nov 14, 2023
04e2bf2
adjust test
leonardoventurini Nov 15, 2023
1b0dc4f
add await
leonardoventurini Nov 15, 2023
85ddff3
remove async wraps
leonardoventurini Nov 15, 2023
0e2f12c
simplify code
leonardoventurini Nov 15, 2023
53972f4
remove meta arg
leonardoventurini Nov 15, 2023
5ac8019
Merge pull request #106 from monti-apm/feature/fiberless-trace-adjust…
leonardoventurini Nov 16, 2023
3455ccb
use trace timestamp instead
leonardoventurini Nov 16, 2023
ba94381
fix for tests
leonardoventurini Nov 16, 2023
128e5d2
fix test
leonardoventurini Nov 16, 2023
eb860af
attempt to set var as empty
leonardoventurini Nov 16, 2023
a315926
set node env to test
leonardoventurini Nov 16, 2023
19d8d0b
try to upgrade actions
leonardoventurini Nov 16, 2023
ec31dc0
we need to set node env forcefully
leonardoventurini Nov 16, 2023
38e80e4
add log
leonardoventurini Nov 16, 2023
62d8860
v3.0.0-beta.2
zodern Nov 17, 2023
5976ead
add package versions reporting back
leonardoventurini Nov 18, 2023
d11a134
fix bind this error
leonardoventurini Nov 18, 2023
a779cb5
add zodern:types back
leonardoventurini Nov 18, 2023
b019aa3
fix webapp references
leonardoventurini Nov 18, 2023
2c309d5
revert test changes
leonardoventurini Nov 18, 2023
9f8bbba
bump alpha version
leonardoventurini Nov 18, 2023
d08dd1e
split into multiple lines
leonardoventurini Nov 19, 2023
2c1c300
remove unused option
leonardoventurini Nov 19, 2023
afbdc60
optimize id gen
leonardoventurini Nov 19, 2023
a8c3e9a
remove unused prop
leonardoventurini Nov 19, 2023
027cf6e
remove workaround as the bug is fixed
leonardoventurini Nov 19, 2023
d4f4eae
callbacks are not used anymore
leonardoventurini Nov 20, 2023
71b98b0
no need to be async
leonardoventurini Nov 20, 2023
348ac70
remove message
leonardoventurini Nov 20, 2023
5f326dc
this function is sync
leonardoventurini Nov 20, 2023
65a2ec7
Indicate traces from new tracer
zodern Nov 20, 2023
1c00442
v3.0.0-beta.3
zodern Nov 20, 2023
e5906ac
Re-add http and email deps
zodern Nov 20, 2023
bdc691a
Update @monti-apm/core
zodern Nov 20, 2023
8af4782
v3.0.0-beta.4
zodern Nov 20, 2023
17d00dc
Merge remote-tracking branch 'origin/feature/fiberless' into feature/…
leonardoventurini Nov 21, 2023
87d296a
remove unused deps
leonardoventurini Nov 21, 2023
ea2857a
remove async metric reference
leonardoventurini Nov 21, 2023
a9ba3b2
wrap webapp middleware
leonardoventurini Nov 22, 2023
b81dacb
fix: pass all tests on latest alpha - fix some flaky tests
renanccastro Jan 3, 2024
a5a831d
Merge branch 'master' into feature/fiberless
renanccastro Jan 4, 2024
788891a
fix: lint issues
renanccastro Jan 4, 2024
b424c61
feat: support async events on webapp
renanccastro Jan 8, 2024
419b515
fix: test
renanccastro Jan 8, 2024
8a88e15
feat: add tests for middleware resolving before next is called
renanccastro Jan 9, 2024
3d8c3ae
feat: track raw route names
renanccastro Jan 12, 2024
946dad6
fix: do not count as async time
renanccastro Jan 16, 2024
e5a3be9
feat: merge
renanccastro Jan 17, 2024
5d77869
fix: bump meteor version
renanccastro Jan 19, 2024
6f87901
Merge branch 'master' into feature/fiberless
renanccastro Jan 19, 2024
80b765b
fix: merge
renanccastro Jan 19, 2024
259d525
fix: lint
renanccastro Jan 19, 2024
eeb9f7d
Merge remote-tracking branch 'origin/master' into feature/fiberless
renanccastro Mar 8, 2024
3cded05
fix: merge issues
renanccastro Mar 12, 2024
5a8befd
fix: wait/waited on tests
renanccastro Mar 26, 2024
8aaef6c
Merge branch 'master' into feature/fiberless
renanccastro Mar 26, 2024
14bd189
fix: merge
renanccastro Mar 26, 2024
21f8e2d
fix: lint
renanccastro Mar 26, 2024
b9e6eca
fix: tests and flaky tests
renanccastro Mar 27, 2024
710db8e
Merge branch 'master' into feature/fiberless
renanccastro May 1, 2024
e1b14db
Merge branch 'master' into feature/fiberless
renanccastro May 1, 2024
21f382c
feat: support async redis-oplog
renanccastro May 15, 2024
3df9e0d
Merge branch 'master' into feature/fiberless
renanccastro May 15, 2024
8906fbb
Merge branch 'master' into feature/fiberless
renanccastro May 15, 2024
5830cf3
fix: tests
renanccastro May 17, 2024
50752ee
Merge remote-tracking branch 'origin/master' into feature/fiberless
renanccastro May 17, 2024
06df08a
fix: lint
renanccastro May 17, 2024
be8d7d3
fix: use rc version
renanccastro May 17, 2024
0ac4e7c
fix: package versions
renanccastro May 17, 2024
80460b2
fix: package versions
renanccastro May 17, 2024
6b685a7
fix: package versions
renanccastro May 17, 2024
3610579
fix: package versions
renanccastro May 17, 2024
5b88e6b
fix: package versions
renanccastro May 17, 2024
f63629f
feat: rc.1
renanccastro May 20, 2024
f7e7041
feat: rc.1
renanccastro May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
parser: '@babel/eslint-parser'
parser: '@typescript-eslint/parser'
extends:
- es/2015/server
plugins:
Expand All @@ -24,6 +24,20 @@ parserOptions:
requireConfigFile: false
sourceType: 'module'
ecmaVersion: 2017
overrides:
- files: ['*.ts', '*.tsx']
extends: ['plugin:@typescript-eslint/recommended']
rules:
'@typescript-eslint/no-non-null-assertion': 0
'@typescript-eslint/no-explicit-any': 0
'@typescript-eslint/no-empty-interface': 0
'@typescript-eslint/explicit-module-boundary-types': 0
'@typescript-eslint/no-unused-vars': 0
'@typescript-eslint/no-this-alias': 0
'@typescript-eslint/ban-ts-comment': 0
'@typescript-eslint/no-namespace': 0
'@typescript-eslint/no-empty-function': 0
'@typescript-eslint/no-extra-semi': 0
rules:
arrow-parens: 0
prefer-arrow-callback: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
- run: npm install
Expand Down
37 changes: 10 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,27 @@ jobs:
fail-fast: false
matrix:
meteorRelease:
- '--release 1.4.4.6'
- '--release 1.5.4.1'
- '--release 1.6.0.1'
- '--release 1.7.0.5'
- '--release 1.8.1'
- '--release 1.8.3'
- '--release 1.9.1'
- '--release 1.10.2'
- '--release 1.11'
- '--release 1.12.1'
- '--release 2.1.1'
- '--release 2.2'
- '--release 2.3.2'
- '--release 2.4.1'
- '--release 2.5.6'
- '--release 2.6.1'
- '--release 2.7.3'
- '--release 2.8.2'
- '--release 2.9.0'
# Latest version
-
# Meteor 3 Alpha
- '--release 3.0-alpha.17'
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
cache: 'npm'
node-version: 18

- name: Install Dependencies
run: |
curl https://install.meteor.com | /bin/sh
npm i -g @zodern/mtest
npm ci

- name: Run Tests
run: |
# Fix using old versions of Meteor
export NODE_TLS_REJECT_UNAUTHORIZED=0

echo "Env: $NODE_ENV"
export FORCE_COLOR=true
export NODE_ENV=test
mtest --package ./ --once ${{ matrix.meteorRelease }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ smart.lock
versions.json
.idea
.eslintcache
.envrc
packages/
.envrc
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ You should use the same method that you used to give the agent the app id and se

#### List of Options

| Name | Environment Variable | Default | Description |
|---------------------|-------------------------------|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| appId | APP_ID | none | |
| appSecret | APP_SECRET | none | |
| enableErrorTracking | OPTIONS_ENABLE_ERROR_TRACKING | true | Enable sending errors to Monti APM |
| disableClientErrorTracking | OPTIONS_DISABLE_CLIENT_ERROR_TRACKING | false | Disable sending client errors to Monti APM |
| endpoint | OPTIONS_ENDPOINT | https://engine.montiapm.com | Monti / Kadira engine url |
| hostname | OPTIONS_HOSTNAME | Server's hostname | What the instance is named in Monti APM |
| uploadSourceMaps | UPLOAD_SOURCE_MAPS | true | Enables sending source maps to Monti APM to improve error stack traces |
| recordIPAddress | RECORD_IP_ADDRESS | 'full' | Set to 'full' to record IP Address, 'anonymized' to anonymize last octet of address, or 'none' to not record an IP Address for client errors |
| eventStackTrace | EVENT_STACK_TRACE | false | If true, records a stack trace when an event starts. Slightly decreases server performance. |
| 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 |

| Name | Environment Variable | Default | Description |
|----------------------------|---------------------------------------|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| appId | APP_ID | none | |
| appSecret | APP_SECRET | none | |
| enableErrorTracking | OPTIONS_ENABLE_ERROR_TRACKING | true | Enable sending errors to Monti APM |
| disableClientErrorTracking | OPTIONS_DISABLE_CLIENT_ERROR_TRACKING | false | Disable sending client errors to Monti APM |
| endpoint | OPTIONS_ENDPOINT | https://engine.montiapm.com | Monti / Kadira engine url |
| hostname | OPTIONS_HOSTNAME | Server's hostname | What the instance is named in Monti APM |
| enableAsyncStackTraces | OPTIONS_ENABLE_ASYNC_STACK_TRACES | false | If true, records a stack trace for promises captured using Async Hooks. Should only be used for debugging. |
leonardoventurini marked this conversation as resolved.
Show resolved Hide resolved
| uploadSourceMaps | UPLOAD_SOURCE_MAPS | true | Enables sending source maps to Monti APM to improve error stack traces |
| recordIPAddress | RECORD_IP_ADDRESS | 'full' | Set to 'full' to record IP Address, 'anonymized' to anonymize last octet of address, or 'none' to not record an IP Address for client errors |
| eventStackTrace | EVENT_STACK_TRACE | false | If true, records a stack trace when an event starts. Slightly decreases server performance. |
| 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 |
### Traces

The agent collects traces of methods and publish functions. Every minute, it sends the outlier traces to Monti APM for you to view.
Expand All @@ -127,13 +127,26 @@ The agent records up to one level of nested events.
You can add custom events to the traces to time specific code or events, or to provide more details to the trace.

```js
Monti.event('event name', {
// This object can have any details you want to store
// The object is optional
userId: userId
}, async () => {
// do the work inside the event
// the event will automatically end when this function returns
});

// Older api. Not recommended since it doesn't nest child events in Meteor 3
const event = Monti.startEvent('event name', {
details: true
// This object can have any details you want
organization: organizationId
});

// After code runs or event happens
Monti.endEvent(event, {
additionalDetails: true
// This object can have any details you want
// It is merged with the object created when starting the event
organizationMembers: 10
});
```

Expand Down
2 changes: 0 additions & 2 deletions lib/.meteor-package-versions

This file was deleted.