File tree Expand file tree Collapse file tree 5 files changed +3
-88
lines changed Expand file tree Collapse file tree 5 files changed +3
-88
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import { Provider } from '@firebase/component';
2222import { AnyValueMap , SeverityNumber } from '@opentelemetry/api-logs' ;
2323import { trace } from '@opentelemetry/api' ;
2424import { TelemetryService } from './service' ;
25- import { encodeInstanceIdentifier } from './helpers' ;
2625
2726declare module '@firebase/component' {
2827 interface NameServiceMapping {
@@ -54,8 +53,7 @@ export function getTelemetry(
5453 app ,
5554 TELEMETRY_TYPE
5655 ) ;
57- const finalOptions : TelemetryOptions = options || { } ;
58- const identifier = encodeInstanceIdentifier ( finalOptions ) ;
56+ const identifier = options ?. endpointUrl || '' ;
5957 return telemetryProvider . getImmediate ( { identifier } ) ;
6058}
6159
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { TELEMETRY_TYPE } from './constants';
2121import { name , version } from '../package.json' ;
2222import { TelemetryService } from './service' ;
2323import { createLoggerProvider } from './logging/logger-provider' ;
24- import { decodeInstanceIdentifier } from './helpers' ;
2524
2625export function registerTelemetry ( ) : void {
2726 _registerComponent (
@@ -32,9 +31,8 @@ export function registerTelemetry(): void {
3231 throw new Error ( 'TelemetryService instance identifier is undefined' ) ;
3332 }
3433
35- const options = decodeInstanceIdentifier ( instanceIdentifier ) ;
3634 // TODO: change to default endpoint once it exists
37- const endpointUrl = options . endpointUrl || 'http://localhost' ;
35+ const endpointUrl = instanceIdentifier || 'http://localhost' ;
3836
3937 // getImmediate for FirebaseApp will always succeed
4038 const app = container . getProvider ( 'app' ) . getImmediate ( ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { TELEMETRY_TYPE } from './constants';
2121import { name , version } from '../package.json' ;
2222import { TelemetryService } from './service' ;
2323import { createLoggerProvider } from './logging/logger-provider' ;
24- import { decodeInstanceIdentifier } from './helpers' ;
2524
2625export function registerTelemetry ( ) : void {
2726 _registerComponent (
@@ -32,9 +31,8 @@ export function registerTelemetry(): void {
3231 throw new Error ( 'TelemetryService instance identifier is undefined' ) ;
3332 }
3433
35- const options = decodeInstanceIdentifier ( instanceIdentifier ) ;
3634 // TODO: change to default endpoint once it exists
37- const endpointUrl = options . endpointUrl || 'http://localhost' ;
35+ const endpointUrl = instanceIdentifier || 'http://localhost' ;
3836
3937 // getImmediate for FirebaseApp will always succeed
4038 const app = container . getProvider ( 'app' ) . getImmediate ( ) ;
You can’t perform that action at this time.
0 commit comments