faro-web-sdk
faro-web-sdk copied to clipboard
page_id is not displayed when url has #
What happened? When entering the Frontend option, selecting any registered frontend application and going to the session option, the value is not being displayed in the page_id field when the url contains #
What did you expect to happen? I expect the page_id value to be displayed.
Example:
It looks like this: page_id: / page_url: https://abcd.com/#/sesion
I want: page_id: /#/sesion or /sesion page_url: https://abcd.com/#/sesion
We use Angular 16, the configuration to integrate our application with Grafana Lighthouse is:
=====================================================================
import { InternalLoggerLevel, getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk'; import { TracingInstrumentation } from '@grafana/faro-web-tracing'; import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api'; import { environment } from '../../../environments/environment';
export function faroInitializer(): Function { return () => { const env: any = environment initializeFaro({ url: env.grafanaFaro.url, app: env.grafanaFaro.app, internalLoggerLevel: InternalLoggerLevel.VERBOSE, instrumentations: [ ...getWebInstrumentations({ captureConsole: true, captureConsoleDisabledLevels: [] }),
new TracingInstrumentation({
resourceAttributes: {
'app-code': 'NN',
'app_group': "NNNN"
},
instrumentationOptions: {
propagateTraceHeaderCorsUrls: []
},
}),
]
});
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.VERBOSE);
}
}