Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
20f10cf6
Unverified
Commit
20f10cf6
authored
Aug 29, 2019
by
Robert Knight
Committed by
GitHub
Aug 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1335 from hypothesis/use-extra-for-document-url
Record document URL as "extra" metadata rather than a tag
parents
4865ee82
fe1b5559
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
sentry.js
src/sidebar/util/sentry.js
+1
-1
sentry-test.js
src/sidebar/util/test/sentry-test.js
+2
-2
No files found.
src/sidebar/util/sentry.js
View file @
20f10cf6
...
@@ -50,7 +50,7 @@ function init(config) {
...
@@ -50,7 +50,7 @@ function init(config) {
// via `document.referrer`. More information about the document is available
// via `document.referrer`. More information about the document is available
// later when frames where the "annotator" code has loaded have connected to
// later when frames where the "annotator" code has loaded have connected to
// the sidebar via `postMessage` RPC messages.
// the sidebar via `postMessage` RPC messages.
Sentry
.
set
Tag
(
'document_url'
,
document
.
referrer
);
Sentry
.
set
Extra
(
'document_url'
,
document
.
referrer
);
}
}
/**
/**
...
...
src/sidebar/util/test/sentry-test.js
View file @
20f10cf6
...
@@ -10,7 +10,7 @@ describe('sidebar/util/sentry', () => {
...
@@ -10,7 +10,7 @@ describe('sidebar/util/sentry', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
fakeSentry
=
{
fakeSentry
=
{
init
:
sinon
.
stub
(),
init
:
sinon
.
stub
(),
set
Tag
:
sinon
.
stub
(),
set
Extra
:
sinon
.
stub
(),
setUser
:
sinon
.
stub
(),
setUser
:
sinon
.
stub
(),
};
};
...
@@ -55,7 +55,7 @@ describe('sidebar/util/sentry', () => {
...
@@ -55,7 +55,7 @@ describe('sidebar/util/sentry', () => {
it
(
'adds extra context to reports'
,
()
=>
{
it
(
'adds extra context to reports'
,
()
=>
{
sentry
.
init
({
dsn
:
'test-dsn'
,
environment
:
'dev'
});
sentry
.
init
({
dsn
:
'test-dsn'
,
environment
:
'dev'
});
assert
.
calledWith
(
assert
.
calledWith
(
fakeSentry
.
set
Tag
,
fakeSentry
.
set
Extra
,
'document_url'
,
'document_url'
,
'https://example.com'
'https://example.com'
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment