faro-web-sdk icon indicating copy to clipboard operation
faro-web-sdk copied to clipboard

page_id is not displayed when url has #

Open JeyGD opened this issue 1 year ago • 1 comments

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

Captura1

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);
}

}

JeyGD avatar Aug 09 '24 15:08 JeyGD