Decouple telemetry project ID configuration (#1077)

#750 

Renames project ID for telemetry from `GOOGLE_CLOUD_PROJECT` to `OTLP_GOOGLE_CLOUD_PROJECT`.

This change allows for a separate Google Cloud Project to be used for telemetry data, distinct from the project used for other services like Vertex AI or Code Assist. This enhances clarity and flexibility in project configuration.
This commit is contained in:
Jerop Kipruto
2025-06-15 21:12:57 -04:00
committed by GitHub
parent 5c8e49a0e3
commit e772dc2b85
3 changed files with 9 additions and 6 deletions

View File

@@ -78,18 +78,18 @@ async function main() {
originalSandboxSetting,
);
const projectId = process.env.GOOGLE_CLOUD_PROJECT;
const projectId = process.env.OTLP_GOOGLE_CLOUD_PROJECT;
if (!projectId) {
console.error(
'🛑 Error: GOOGLE_CLOUD_PROJECT environment variable is not exported.',
'🛑 Error: OTLP_GOOGLE_CLOUD_PROJECT environment variable is not exported.',
);
console.log(
' Please set it to your Google Cloud Project ID and try again.',
);
console.log(' `export GOOGLE_CLOUD_PROJECT=your-project-id`');
console.log(' `export OTLP_GOOGLE_CLOUD_PROJECT=your-project-id`');
process.exit(1);
}
console.log(`✅ Using Google Cloud Project ID: ${projectId}`);
console.log(`✅ Using OTLP Google Cloud Project ID: ${projectId}`);
console.log('\n🔑 Please ensure you are authenticated with Google Cloud:');
console.log(