Skip to content

Commit

Permalink
Merge pull request #56272 from callstack-internal/feat/timings-version
Browse files Browse the repository at this point in the history
[NoQA] feat: add version to grafana timings call
  • Loading branch information
mountiny authored Feb 4, 2025
2 parents 72261e8 + 7805eae commit 92eb817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libs/API/parameters/SendPerformanceTimingParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ type SendPerformanceTimingParams = {
name: string;
value: number;
platform: string;
version: string;
};

export default SendPerformanceTimingParams;
2 changes: 2 additions & 0 deletions src/libs/actions/Timing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as Environment from '@libs/Environment/Environment';
import Firebase from '@libs/Firebase';
import getPlatform from '@libs/getPlatform';
import Log from '@libs/Log';
import pkg from '../../../package.json';

type TimestampData = {
startTime: number;
Expand Down Expand Up @@ -67,6 +68,7 @@ function end(eventName: string, secondaryName = '', maxExecutionTime = 0) {
name: grafanaEventName,
value: eventTime,
platform: `${getPlatform()}`,
version: `${pkg.version}`,
};

API.read(READ_COMMANDS.SEND_PERFORMANCE_TIMING, parameters, {});
Expand Down

0 comments on commit 92eb817

Please sign in to comment.