Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_id is not displayed when url has # #662

Open
JeyGD opened this issue Aug 9, 2024 · 1 comment
Open

page_id is not displayed when url has # #662

JeyGD opened this issue Aug 9, 2024 · 1 comment
Labels
change Request a change of an existing feature

Comments

@JeyGD
Copy link

JeyGD commented Aug 9, 2024

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 JeyGD added the change Request a change of an existing feature label Aug 9, 2024
@cedricziel
Copy link
Contributor

Hi @JeyGD - we released a new rule in Grafana Cloud that compiles hash-based routes into distinct page ids:

example.com/products/123#/my-route/568 should now become /products/*#/my-route/* - please let us know if that works out for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Request a change of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants