diff --git a/e2e/react-router/src/ldclientLazy.tsx b/e2e/react-router/src/ldclientLazy.tsx index 00e687a63..7fe0f3377 100644 --- a/e2e/react-router/src/ldclientLazy.tsx +++ b/e2e/react-router/src/ldclientLazy.tsx @@ -8,6 +8,7 @@ const observabilitySettings: ConstructorParameters[0] = { recordHeadersAndBody: true, }, serviceName: 'ryan-test', + version: 'my-version', backendUrl: 'http://localhost:8082/public', otel: { otlpEndpoint: 'http://localhost:4318', @@ -21,6 +22,7 @@ const sessionReplaySettings: ConstructorParameters[0] = { inlineStylesheet: true, privacySetting: 'none', serviceName: 'ryan-test', + version: 'my-version', backendUrl: 'http://localhost:8082/public', manualStart: true, enableCanvasRecording: true, diff --git a/sdk/highlight-run/src/client/otel/index.ts b/sdk/highlight-run/src/client/otel/index.ts index 27f090681..00b1a8ee6 100644 --- a/sdk/highlight-run/src/client/otel/index.ts +++ b/sdk/highlight-run/src/client/otel/index.ts @@ -69,6 +69,7 @@ export type BrowserTracingConfig = { environment?: string networkRecordingOptions?: NetworkRecordingOptions serviceName?: string + serviceVersion?: string tracingOrigins?: boolean | (string | RegExp)[] urlBlocklist?: string[] eventNames?: EventName[] @@ -142,6 +143,7 @@ export const setupBrowserTracing = ( const resource = new Resource({ [SemanticAttributes.ATTR_SERVICE_NAME]: config.serviceName ?? 'highlight-browser', + [SemanticAttributes.ATTR_SERVICE_VERSION]: config.serviceVersion, 'deployment.environment.name': environment, 'highlight.project_id': config.projectId, [SemanticAttributes.ATTR_USER_AGENT_ORIGINAL]: navigator.userAgent, diff --git a/sdk/highlight-run/src/sdk/observe.ts b/sdk/highlight-run/src/sdk/observe.ts index 01a9c3bd0..fa8574f25 100644 --- a/sdk/highlight-run/src/sdk/observe.ts +++ b/sdk/highlight-run/src/sdk/observe.ts @@ -136,6 +136,7 @@ export class ObserveSDK implements Observe { : undefined, tracingOrigins: this._options?.tracingOrigins, serviceName: this._options?.serviceName ?? 'browser', + serviceVersion: this._options?.version, instrumentations: this._options?.otel?.instrumentations, eventNames: this._options?.otel?.eventNames, },