Skip to content

Conversation

@Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Oct 31, 2025

closes #3012

CI Results

Test Status: ❌ FAILED

📊 Full Report

Total Passed Failed Flaky Skipped
378 373 1 2 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔺

Current: 47.10 MB | Main: 47.10 MB
Diff: +5.81 KB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@astandrik astandrik requested a review from Copilot November 1, 2025 10:39
astandrik
astandrik previously approved these changes Nov 1, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Yandex Metrica integration to make it more flexible and configurable. The changes move from a simple string-to-number mapping to a structured configuration that supports typed goals and metrica name resolution.

Key changes:

  • Introduced a new yaMetricaConfig structure that replaces the flat yaMetricaMap property
  • Added a new reachMetricaGoal helper function to simplify goal tracking across the application
  • Integrated metrica tracking for query execution and stopping in the Query Editor components

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/uiFactory/types.ts Adds yaMetricaConfig with typed goals, replaces yaMetricaMap, and adds generic parameter T for metrica name types
src/uiFactory/uiFactory.ts Updates configureUIFactory signature to support the new generic parameter T
src/utils/yaMetrica.ts Updates to use yaMetricaConfig, makes getMetrica handle optional names, and adds reachMetricaGoal helper function
src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx Adds metrica tracking calls for query execution (execute and explain actions)
src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx Adds metrica tracking for query stop action
Comments suppressed due to low confidence (3)

src/utils/yaMetrica.ts:1

  • Spreading querySettings may include unnecessary properties in the metrica event. The QuerySettings type includes properties like pragmas (string), limitRows (number), and nested configuration objects that could make tracking data verbose and inconsistent. Consider explicitly specifying only the relevant properties (e.g., queryMode, transactionMode, statisticsMode) to keep tracking data focused and consistent.
import type {UiMetricaGoal} from '../uiFactory/types';

src/utils/yaMetrica.ts:1

  • Spreading querySettings may include unnecessary properties in the metrica event. The QuerySettings type includes properties like pragmas (string), limitRows (number), and nested configuration objects that could make tracking data verbose and inconsistent. Consider explicitly specifying only the relevant properties (e.g., queryMode, transactionMode, statisticsMode) to keep tracking data focused and consistent.
import type {UiMetricaGoal} from '../uiFactory/types';

src/utils/yaMetrica.ts:1

  • Spreading querySettings may include unnecessary properties in the metrica event. The QuerySettings type includes properties like pragmas (string), limitRows (number), and nested configuration objects that could make tracking data verbose and inconsistent. Consider explicitly specifying only the relevant properties (e.g., queryMode, transactionMode, statisticsMode) to keep tracking data focused and consistent.
import type {UiMetricaGoal} from '../uiFactory/types';

@Raubzeug Raubzeug enabled auto-merge November 1, 2025 10:49
@Raubzeug Raubzeug added this pull request to the merge queue Nov 1, 2025
Merged via the queue into main with commit 2c38116 Nov 1, 2025
4 of 5 checks passed
@Raubzeug Raubzeug deleted the run-query-metrics branch November 1, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add metrika event when run query

3 participants