Merge pull request #6605 from continuedev/pe/add-config-loading-timer

chore: add telemetry to config loading
This commit is contained in:
Nate Sesti 2025-07-14 08:45:23 -07:00 • committed by GitHub
commit 70408e5079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 12 deletions

View file

@ -17,6 +17,7 @@ import {
} from "../control-plane/AuthTypes.js";
import { getControlPlaneEnv } from "../control-plane/env.js";
import { logger } from "../util/logger.js";
import { Telemetry } from "../util/posthog.js";
import {
ASSISTANTS,
getAllDotContinueDefinitionFiles,
@ -431,6 +432,7 @@ export class ConfigHandler {
// Because of e.g. MCP singleton and docs service using things from config
// Could improve this
async reloadConfig(reason: string) {
const startTime = performance.now();
this.totalConfigLoads += 1;
// console.log(`Reloading config (${this.totalConfigLoads}): ${reason}`); // Uncomment to see config loading logs
if (!this.currentProfile) {
@ -456,6 +458,17 @@ export class ConfigHandler {
await this.currentProfile.reloadConfig(this.additionalContextProviders);
this.notifyConfigListeners({ config, errors, configLoadInterrupted });
// Track config loading telemetry
const endTime = performance.now();
const duration = endTime - startTime;
void Telemetry.capture("config_reload", {
duration,
reason,
totalConfigLoads: this.totalConfigLoads,
configLoadInterrupted,
});
return { config, errors, configLoadInterrupted };
}

View file

@ -142,7 +142,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@ -169,9 +169,11 @@
},
"../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-yaml": "^1.0.51",
"@continuedev/fetch": "^1.0.15",

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "1.1.59",
"version": "1.1.60",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.59",
"version": "1.1.60",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@ -2544,9 +2544,10 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
},
"node_modules/@types/node": {
"version": "16.18.119",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.119.tgz",
"integrity": "sha512-ia7V9a2FnhUFfetng4/sRPBMTwHZUkPFY736rb1cg9AgG7MZdR97q7/nLR9om+sq5f1la9C857E0l/nrI0RiFQ=="
"version": "16.18.126",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz",
"integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==",
"license": "MIT"
},
"node_modules/@types/node-fetch": {
"version": "2.6.12",

2
gui/package-lock.json generated
View file

@ -220,7 +220,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",