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 339 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
339 commits
Select commit Hold shift + click to select a range
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
e8f3799
Merge remote-tracking branch 'origin/master' into feature/fiberless
renanccastro Jun 21, 2024
f7a1686
fix: lint issues
renanccastro Jun 21, 2024
a0f6d1b
chore: bump rc version
renanccastro Jul 15, 2024
c637944
Merge remote-tracking branch 'origin/master' into feature/fiberless
renanccastro Jul 15, 2024
53381dc
chore: bump to rc.8
renanccastro Jul 15, 2024
e3d21f8
Remove unused log
zodern Jul 15, 2024
370998a
Improve no-console disable's
zodern Jul 15, 2024
fc5b4bc
v3.0.0-beta.5
zodern Jul 15, 2024
8e59cf1
Add version constraint for http package
zodern Jul 15, 2024
e11175a
chore: bump version to latest 3.0 release
renanccastro Jul 16, 2024
d247514
chore: bump version to latest 3.0 release
renanccastro Jul 16, 2024
fabd836
Update @monti-apm/core
zodern Oct 15, 2024
ecaad76
Update Meteor releases for testing
zodern Oct 15, 2024
7abaf48
Adjust flaky test
zodern Oct 15, 2024
cfa25ae
Fix meteor release
zodern Oct 15, 2024
70a7d5e
Clean await detector data after each method and publication
zodern Oct 15, 2024
87cc521
Revert "Clean await detector data after each method and publication"
zodern Oct 16, 2024
d690a3b
v3.0.0-beta.7
zodern Oct 16, 2024
bba00cc
Add version constraint to http package
zodern Oct 16, 2024
f360407
Add support for express 5
zodern Nov 6, 2024
cd6573d
Force colors in tests
zodern Nov 6, 2024
453323c
Fix http test
zodern Nov 6, 2024
291a8ad
Add 3.1-beta.0 to CI
zodern Nov 6, 2024
8b7ba2f
Fix formatting
zodern Nov 6, 2024
076e32a
v3.0.0-beta.8
zodern Nov 6, 2024
efe1615
Update @monti-apm/core to 2 beta.7
zodern Nov 26, 2024
795f17e
Fix proxy option
zodern Nov 26, 2024
60f7364
v3.0.0-beta.9
zodern Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .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,23 @@ parserOptions:
requireConfigFile: false
sourceType: 'module'
ecmaVersion: 2017
overrides:
- files: ['**/tests/**/*.{js,cjs,mjs}']
rules:
no-console: 0
- 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 Expand Up @@ -277,7 +294,3 @@ rules:
prefer-rest-params: 0
symbol-description: 1
callback-return: 0
overrides:
- files: ['**/tests/**/*.{js,cjs,mjs}']
rules:
no-console: 0
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ 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
node-version: 22
- run: npm install
- run: npm run lint
28 changes: 10 additions & 18 deletions .github/workflows/test-redis-oplog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,27 @@ jobs:
fail-fast: false
matrix:
meteorRelease:
- '--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'
# Left empty to use latest version
-
- '--release 3.0.3'
env:
REDIS_OPLOG_SETTINGS: '{"debug":true}'
steps:
- uses: supercharge/[email protected]
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Install Node.js
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 }}
38 changes: 12 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,30 @@ 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'
# Left empty to use latest version
- '--release 3.0'
- '--release 3.0.3'
- '--release 3.1-beta.0'
# latest release
-
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ smart.lock
versions.json
.idea
.eslintcache
packages/
.envrc
/packages/*
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Next

* Support Meteor 3
* Add `Monti.event`
* Tracer supports parallel events
* Improve support for proxies

## v2.49.4
July 11, 2024

Expand Down
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,20 @@ 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 |
| 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 +126,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
4 changes: 2 additions & 2 deletions lib/.meteor-package-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// the zodern:meteor-package-versions compiler replaces this file with
leonardoventurini marked this conversation as resolved.
Show resolved Hide resolved
// the list of packages and their versions
// the zodern:meteor-package-versions compiler replaces this file with
// the list of packages and their versions
Loading