mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-22 01:37:50 +00:00
Clearcut logging - initial implementation (#1274)
Flag-guarded initial implementation of a clearcut logger to collect telemetry data and send it to Concord for dashboards, etc.
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
import { Config } from '../config/config.js';
|
||||
import { NodeSDK } from '@opentelemetry/sdk-node';
|
||||
import * as loggers from './loggers.js';
|
||||
import { StartSessionEvent } from './types.js';
|
||||
|
||||
vi.mock('@opentelemetry/sdk-node');
|
||||
vi.mock('../config/config.js');
|
||||
@@ -55,10 +56,11 @@ describe('telemetry', () => {
|
||||
|
||||
it('should initialize the telemetry service', () => {
|
||||
initializeTelemetry(mockConfig);
|
||||
const event = new StartSessionEvent(mockConfig);
|
||||
|
||||
expect(NodeSDK).toHaveBeenCalled();
|
||||
expect(mockNodeSdk.start).toHaveBeenCalled();
|
||||
expect(loggers.logCliConfiguration).toHaveBeenCalledWith(mockConfig);
|
||||
expect(loggers.logCliConfiguration).toHaveBeenCalledWith(mockConfig, event);
|
||||
});
|
||||
|
||||
it('should shutdown the telemetry service', async () => {
|
||||
|
||||
Reference in New Issue
Block a user