Skip to content

Fix JSDoc for trackClickHouseOperation function signature#258

Closed
Copilot wants to merge 2 commits intoadd-clickhouse-rpc-metricsfrom
copilot/sub-pr-257
Closed

Fix JSDoc for trackClickHouseOperation function signature#258
Copilot wants to merge 2 commits intoadd-clickhouse-rpc-metricsfrom
copilot/sub-pr-257

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

The JSDoc for trackClickHouseOperation documented a non-existent durationSeconds parameter instead of the actual status and startTime parameters.

Changes:

  • Updated JSDoc to document actual parameters: status ('success' | 'error') and startTime (from performance.now())
  • Removed incorrect durationSeconds parameter documentation
  • Clarified that duration is computed internally, not passed as an argument
/**
 * Track a ClickHouse operation
 * @param operationType - Type of operation ('read' or 'write')
 * @param status - Operation status ('success' or 'error')
 * @param startTime - Operation start time from performance.now()
 */
export function trackClickHouseOperation(
    operationType: 'read' | 'write',
    status: 'success' | 'error',
    startTime: number,
): void {
    const durationSeconds = (performance.now() - startTime) / 1000;
    clickhouseOperations.labels(operationType, status).observe(durationSeconds);
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ture

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address JSDoc adjustments based on review feedback Fix JSDoc for trackClickHouseOperation function signature Feb 3, 2026
Copilot AI requested a review from YaroShkvorets February 3, 2026 18:59
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.

2 participants