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

feat: APM updates #2161

Merged
merged 67 commits into from
Dec 2, 2019
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
214618d
wip: APM
kamilogorek Jul 10, 2019
dd7bb41
Update tracing.ts and hub interface
kamilogorek Jul 10, 2019
48da3f8
feat: Some cleanup and changes
HazAT Jul 11, 2019
fe382e7
feat: Add data/tags to span, Clear finishedSpans
HazAT Jul 12, 2019
8e8de11
fix: Sampled, parent span id and tests
HazAT Jul 16, 2019
b34e42d
fix: Sampled spans
HazAT Jul 16, 2019
4db1f19
fix: Detect internal sentry requests
HazAT Jul 17, 2019
b3f0ed2
meta: Changelog
HazAT Jul 18, 2019
59516ce
ref: Rename SpanProps to SpanContext
HazAT Jul 23, 2019
cff9c0e
fix: SpanContext var name, Timestamp in secs
HazAT Jul 23, 2019
41c974c
feat: Add simple API, timestampWithMs helper
HazAT Jul 23, 2019
494a6f4
fix: Use timestampWithMs
HazAT Jul 23, 2019
790ac56
feat: Expose minimal API
HazAT Jul 24, 2019
4f7b6eb
feat: Add more tests
HazAT Jul 24, 2019
307dd0f
fix: Test
HazAT Jul 24, 2019
4b35daf
meta: beta.3
HazAT Jul 24, 2019
422efcd
meta: beta.4
HazAT Jul 24, 2019
0a83eae
Next iteration of span API
kamilogorek Aug 13, 2019
2e993b3
Add status to transactions
kamilogorek Aug 14, 2019
206c46b
fix: Span changes
HazAT Aug 20, 2019
1b9ebd9
ref: naming
HazAT Aug 21, 2019
1db7ac4
fix: Remove finishSpan from core, node and browser exports
kamilogorek Aug 22, 2019
679d2db
fix: Linter for tests
HazAT Oct 4, 2019
11e3f8b
fix: Add finish method to the Span interface
kamilogorek Oct 9, 2019
3601e3d
Bring APM implementation up to date with python
kamilogorek Oct 23, 2019
8966bf7
feat: Instrument http integration to emit breadcrumbs and/or spans
kamilogorek Oct 25, 2019
a0e1f14
feat: Rework console integration
kamilogorek Oct 28, 2019
53a5d35
feat: tracingHandler for APM
kamilogorek Oct 28, 2019
d5b3df6
feat: Express middleware tracing integration
kamilogorek Oct 28, 2019
74eacc0
fix: Make rewritten http integration work in pre v9 node versions
kamilogorek Oct 28, 2019
e58a8de
ref: Mark failed transactions
kamilogorek Oct 29, 2019
5ca412a
Remove express types from deps and add better docs
kamilogorek Oct 29, 2019
2b21ff7
ref: Pre-release linter and tests patches
kamilogorek Nov 1, 2019
0dfcdc9
meta: Bump to 5.8.0-beta.0
HazAT Nov 1, 2019
4e68f8f
feat: TransactionActivity Integration
HazAT Nov 7, 2019
b6c959e
feat: Finish transaction with timestamp
HazAT Nov 7, 2019
c582e2d
feat: Improvements in transaction creating
HazAT Nov 8, 2019
80a3e02
meta: Bump
HazAT Nov 8, 2019
41b552c
feat: Use timestamp of last span
HazAT Nov 14, 2019
acecb4e
feat: Location change auto transaction
HazAT Nov 15, 2019
5ac8b2b
Merge branch 'master' into apm
HazAT Nov 15, 2019
282d028
fix: Merge
HazAT Nov 15, 2019
fb9a35b
Merge branch 'master' into apm
HazAT Nov 15, 2019
b290681
fix: Comment
HazAT Nov 15, 2019
6697cfa
ref: Uncomment tests for now
HazAT Nov 15, 2019
eb64802
Merge branch 'master' into apm
HazAT Nov 19, 2019
00dcc7d
feat: Add tracingSampleRate
HazAT Nov 19, 2019
9118d31
feat: Auto tracking XHR
HazAT Nov 19, 2019
73c8cfe
fix: Not initalized integration
HazAT Nov 19, 2019
b62ea41
fix: Use scope instead of configureScope
HazAT Nov 20, 2019
3e28014
fix: Scope
HazAT Nov 20, 2019
707e622
feat: Add data before finish span
HazAT Nov 20, 2019
75e71fe
fix: Remove unused options
HazAT Nov 20, 2019
fa506ce
feat: Move Hub and Span to apm package
HazAT Nov 20, 2019
d8c7574
fix: Node build
HazAT Nov 20, 2019
dcf4c7f
meta: Cleanup
HazAT Nov 21, 2019
5116935
feat: Refactor to use global extension hub method
HazAT Nov 21, 2019
856dbd5
ref: Move code into tracing integration
HazAT Nov 21, 2019
b41142c
feat: Add shouldCreateSpanForRequest option
HazAT Nov 21, 2019
b34bcf8
feat: Add fetch tracking
HazAT Nov 21, 2019
ee0b17b
ref: Use correct SpanStatus types according to spec
kamilogorek Nov 26, 2019
bc17f87
Merge branch 'master' into apm
HazAT Nov 27, 2019
ea23290
feat: Move instrumentation and dsn to utils
HazAT Nov 27, 2019
e4d605d
feat: Auto status code, Fix idle navigation transaction
HazAT Nov 27, 2019
9cc5548
feat: Readme, lint, changelog
HazAT Nov 27, 2019
7d5d3f2
fix: Dont clash between span and scope trace context data
kamilogorek Dec 2, 2019
073920f
meta: Docs for options
HazAT Dec 2, 2019
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
16 changes: 11 additions & 5 deletions packages/integrations/src/transactionactivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ export class TransactionActivity implements Integration {
if (!TransactionActivity._isEnabled()) {
return;
}
// `${window.location.href}` will be used a temp transaction name
TransactionActivity.startIdleTransaction(`${window.location.href}`, {
op: 'pageload',
sampled: true,
});
if (global.location && global.location.href) {
// `${global.location.href}` will be used a temp transaction name
TransactionActivity.startIdleTransaction(global.location.href, {
op: 'pageload',
sampled: true,
});
}
}

/**
Expand All @@ -93,6 +95,10 @@ export class TransactionActivity implements Integration {
if (TransactionActivity._enabled !== undefined) {
return TransactionActivity._enabled;
}
// This happens only in test cases where the integration isn't initalized properly
if (!TransactionActivity.options || isNaN(TransactionActivity.options.tracesSampleRate)) {
Copy link
Contributor Author

@kamilogorek kamilogorek Nov 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that isNaN('') isNaN([]) isNaN(null) isNaN(true) isNaN(false) will also report false. You can wrap the input in parseInt to make it better, or use:

typeof TransactionActivity.options.tracesSampleRate !== 'number'

return false;
}
TransactionActivity._enabled = Math.random() > TransactionActivity.options.tracesSampleRate ? false : true;
return TransactionActivity._enabled;
}
Expand Down