File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
sdk/highlight-run/src/sdk Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ import randomUuidV4 from '../client/utils/randomUuidV4'
7878import { recordException } from '../client/otel/recordException'
7979import { ObserveOptions } from '../client/types/observe'
8080import { isMetricSafeNumber } from '../client/utils/utils'
81+ import * as SemanticAttributes from '@opentelemetry/semantic-conventions'
8182
8283export class ObserveSDK implements Observe {
8384 /** Verbose project ID that is exposed to users. Legacy users may still be using ints. */
@@ -583,12 +584,16 @@ export class ObserveSDK implements Observe {
583584 )
584585 WebVitalsListener ( ( data ) => {
585586 const { name, value } = data
587+ const { hostname, pathname, href } = window . location
586588 this . recordGauge ( {
587589 name,
588590 value,
589591 attributes : {
590- group : window . location . href ,
592+ group : window . location . pathname ,
591593 category : MetricCategory . WebVital ,
594+ [ SemanticAttributes . ATTR_URL_FULL ] : href ,
595+ [ SemanticAttributes . ATTR_URL_PATH ] : pathname ,
596+ [ SemanticAttributes . ATTR_SERVER_ADDRESS ] : hostname ,
592597 } ,
593598 } )
594599 } )
You can’t perform that action at this time.
0 commit comments