diff --git a/src/features/logging/aggregate/index.js b/src/features/logging/aggregate/index.js index 3c14f6c2a..8ca840274 100644 --- a/src/features/logging/aggregate/index.js +++ b/src/features/logging/aggregate/index.js @@ -103,6 +103,9 @@ export class Aggregate extends AggregateBase { common: { /** Attributes in the `common` section are added to `all` logs generated in the payload */ attributes: { + 'instrumentation.provider': 'browser', + 'instrumentation.version': this.#agentRuntime.version, + 'instrumentation.name': this.#agentRuntime.loaderType, 'entity.guid': this.#agentRuntime.appMetadata?.agents?.[0]?.entityGuid, // browser entity guid as provided from RUM response session: this.#agentRuntime?.session?.state.value || '0', // The session ID that we generate and keep across page loads hasReplay: this.#agentRuntime?.session?.state.sessionReplayMode === 1, // True if a session replay recording is running diff --git a/tests/components/logging/aggregate.test.js b/tests/components/logging/aggregate.test.js index 714caa5b0..c41a82bf4 100644 --- a/tests/components/logging/aggregate.test.js +++ b/tests/components/logging/aggregate.test.js @@ -77,6 +77,9 @@ describe('payloads', () => { body: [{ common: { attributes: { + 'instrumentation.name': 'browser-test', + 'instrumentation.provider': 'browser', + 'instrumentation.version': expect.any(String), 'entity.guid': runtime.appMetadata.agents[0].entityGuid, session: runtime.session.state.value, hasReplay: false, diff --git a/tests/specs/logging/harvesting.e2e.js b/tests/specs/logging/harvesting.e2e.js index c9428c286..f1291e655 100644 --- a/tests/specs/logging/harvesting.e2e.js +++ b/tests/specs/logging/harvesting.e2e.js @@ -19,6 +19,9 @@ describe('logging harvesting', () => { attributes: { appId: 42, agentVersion: expect.any(String), + 'instrumentation.provider': 'browser', + 'instrumentation.version': expect.any(String), + 'instrumentation.name': 'spa', 'entity.guid': expect.any(String), hasReplay: false, hasTrace: true,