Skip to content

Commit

Permalink
minor fix, lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinet18 committed Aug 22, 2024
1 parent e51bdc5 commit c768f47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/web/opentelemetry-instrumentation-page-view/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-document-load
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-document-load.svg
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-page-view
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-page-view.svg

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { PageTypes } from './enums/PageTypes';
/**
* This class represents a page view instrumentation plugin
*/

const EVENT_NAME = 'browser.page_view';
export class PageViewInstrumentation extends InstrumentationBase<PageViewInstrumentationConfig> {
emitter: EventLogger | null = null;
oldUrl = location.href;
Expand All @@ -48,7 +48,7 @@ export class PageViewInstrumentation extends InstrumentationBase<PageViewInstrum
*/
private _onPageView() {
const pageViewEvent: Event = {
name: 'page_view',
name: EVENT_NAME,
data: {
url: document.documentURI as string,
referrer: document.referrer,
Expand All @@ -71,7 +71,7 @@ export class PageViewInstrumentation extends InstrumentationBase<PageViewInstrum
return;
}
const vPageViewEvent: Event = {
name: 'page_view',
name: EVENT_NAME,
data: {
'http.url': window.location.href,
title,
Expand Down

0 comments on commit c768f47

Please sign in to comment.