File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
plugins/web/opentelemetry-instrumentation-page-view Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ const EVENT_NAME = 'browser.page_view';
2929export class PageViewInstrumentation extends InstrumentationBase < PageViewInstrumentationConfig > {
3030 eventLogger : Logger | null = null ;
3131 oldUrl = location . href ;
32- applyCustomLogRecordData : ApplyCustomLogRecordDataFunction | undefined = undefined ;
32+ applyCustomLogRecordData : ApplyCustomLogRecordDataFunction | undefined =
33+ undefined ;
3334
3435 /**
3536 *
@@ -58,7 +59,10 @@ export class PageViewInstrumentation extends InstrumentationBase<PageViewInstrum
5859 type : PageTypes . BASE_PAGE ,
5960 } ,
6061 } ;
61- this . _applyCustomLogRecordData ( pageViewLogRecord , this . applyCustomLogRecordData ) ;
62+ this . _applyCustomLogRecordData (
63+ pageViewLogRecord ,
64+ this . applyCustomLogRecordData
65+ ) ;
6266 this . eventLogger ?. emit ( pageViewLogRecord ) ;
6367 }
6468
@@ -84,7 +88,10 @@ export class PageViewInstrumentation extends InstrumentationBase<PageViewInstrum
8488 type : PageTypes . VIRTUAL_PAGE ,
8589 } ,
8690 } ;
87- this . _applyCustomLogRecordData ( vPageViewLogRecord , this . applyCustomLogRecordData ) ;
91+ this . _applyCustomLogRecordData (
92+ vPageViewLogRecord ,
93+ this . applyCustomLogRecordData
94+ ) ;
8895 this . eventLogger ?. emit ( vPageViewLogRecord ) ;
8996 }
9097
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616import { InstrumentationConfig } from '@opentelemetry/instrumentation' ;
17- import { LogRecord } from " @opentelemetry/api-logs" ;
17+ import { LogRecord } from ' @opentelemetry/api-logs' ;
1818
1919/**
2020 * PageViewInstrumentationConfig
@@ -24,5 +24,5 @@ export interface PageViewInstrumentationConfig extends InstrumentationConfig {
2424}
2525
2626export interface ApplyCustomLogRecordDataFunction {
27- ( logRecord :LogRecord ) : void ;
27+ ( logRecord : LogRecord ) : void ;
2828}
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ describe('PageView Instrumentation', () => {
3838 provider . addLogRecordProcessor ( logRecordProcessor ) ;
3939 logs . setGlobalLoggerProvider ( provider ) ;
4040
41-
4241 afterEach ( ( ) => {
4342 exporter . reset ( ) ;
4443 plugin . disable ( ) ;
You can’t perform that action at this time.
0 commit comments