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

User interaction instrumentation #324

Merged
merged 8 commits into from
Feb 2, 2021
Prev Previous commit
Next Next commit
chore: renaming plugin to instrumentation
  • Loading branch information
obecny committed Jan 29, 2021
commit abff09318a020773e3b2b30036f6ec20092259d5
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ npm install --save @opentelemetry/instrumentation-user-interaction
```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracerProvider } from '@opentelemetry/web';
import { UserInteractionPlugin } from '@opentelemetry/instrumentation-user-interaction';
import { UserInteractionInstrumentation } from '@opentelemetry/instrumentation-user-interaction';
import { ZoneContextManager } from '@opentelemetry/context-zone';
// or if you already have zone.js
// import { ZoneContextManager } from '@opentelemetry/context-zone-peer-dep';

const provider = new WebTracerProvider({
contextManager: new ZoneContextManager(), // optional
plugins: [
new UserInteractionPlugin()
new UserInteractionInstrumentation()
]
});
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
const FILE_URL =
'https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/main/package.json';

describe('UserInteractionPlugin', () => {
describe('UserInteractionInstrumentation', () => {
describe('when zone.js is NOT available', () => {
let userInteractionInstrumentation: UserInteractionInstrumentation;
let sandbox: sinon.SinonSandbox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
const FILE_URL =
'https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/main/package.json';

describe('UserInteractionPlugin', () => {
describe('UserInteractionInstrumentation', () => {
describe('when zone.js is available', () => {
let contextManager: ZoneContextManager;
let userInteractionInstrumentation: UserInteractionInstrumentation;
Expand Down