-
Notifications
You must be signed in to change notification settings - Fork 853
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: plugin user interaction for web #658
Changes from 1 commit
d639e06
d1a6509
6c9de55
6d2259f
dab40b1
bc96552
eb698de
be21bac
fdb4019
85745d1
26eaffe
324a705
199db32
de0c4d1
be41208
4e79efe
b079de4
a392585
55e3a9e
9fd862a
75eb5af
66b1dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ import * as assert from 'assert'; | |
import * as sinon from 'sinon'; | ||
import { isWrapped, LogLevel } from '@opentelemetry/core'; | ||
import * as tracing from '@opentelemetry/tracing'; | ||
import { WebTracer } from '@opentelemetry/web'; | ||
import { WebTracerRegistry } from '@opentelemetry/web'; | ||
import { ZoneScopeManager } from '@opentelemetry/scope-zone-peer-dep'; | ||
import { XMLHttpRequestPlugin } from '@opentelemetry/plugin-xml-http-request'; | ||
import { UserInteractionPlugin } from '../src'; | ||
|
@@ -44,7 +44,7 @@ describe('UserInteractionPlugin', () => { | |
describe('when zone.js is available', () => { | ||
let userInteractionPlugin: UserInteractionPlugin; | ||
let sandbox: sinon.SinonSandbox; | ||
let webTracer: WebTracer; | ||
let webTracerRegistry: WebTracerRegistry; | ||
let dummySpanExporter: DummySpanExporter; | ||
let exportSpy: any; | ||
let requests: any[] = []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What properties are you accessing on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @obecny friendly ping here, is there any more specific type we can use? |
||
|
@@ -66,14 +66,14 @@ describe('UserInteractionPlugin', () => { | |
sandbox.useFakeTimers(); | ||
|
||
userInteractionPlugin = new UserInteractionPlugin(); | ||
webTracer = new WebTracer({ | ||
webTracerRegistry = new WebTracerRegistry({ | ||
logLevel: LogLevel.ERROR, | ||
scopeManager: new ZoneScopeManager(), | ||
plugins: [userInteractionPlugin, new XMLHttpRequestPlugin()], | ||
}); | ||
dummySpanExporter = new DummySpanExporter(); | ||
exportSpy = sandbox.stub(dummySpanExporter, 'export'); | ||
webTracer.addSpanProcessor( | ||
webTracerRegistry.addSpanProcessor( | ||
new tracing.SimpleSpanProcessor(dummySpanExporter) | ||
); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use
let exportSpy: jasmine.Spy
? Can we need to pull in Jasmine types for that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obecny friendly ping on this - is it possible to use the
jasmine.Spy
type here?