Skip to content

Commit

Permalink
fix(js/plugins/google-cloud): pass projectId through to GoogleAuth cl…
Browse files Browse the repository at this point in the history
…ient
  • Loading branch information
MichaelDoyle committed Feb 19, 2025
1 parent 3c3c1b6 commit 3e84881
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/plugins/google-cloud/src/gcpLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class GcpLogger {
transports.push(
this.shouldExport(env)
? new LoggingWinston({
projectId: this.config.projectId,
labels: { module: 'genkit' },
prefix: 'genkit',
logName: 'genkit_log',
projectId: this.config.projectId,
credentials: this.config.credentials,
autoRetry: true,
defaultCallback: await this.getErrorHandler(),
Expand Down
10 changes: 6 additions & 4 deletions js/plugins/google-cloud/src/gcpOpenTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ export class GcpOpenTelemetry {
spanExporter = new AdjustingTraceExporter(
this.shouldExportTraces()
? new TraceExporter({
// Creds for non-GCP environments; otherwise credentials will be
// automatically detected via ADC
// provided projectId should take precedence over env vars, etc
projectId: this.config.projectId,
// creds for non-GCP environments, in lieu of using ADC.
credentials: this.config.credentials,
})
: new InMemorySpanExporter(),
Expand Down Expand Up @@ -186,8 +187,9 @@ export class GcpOpenTelemetry {
product: 'genkit',
version: GENKIT_VERSION,
},
// Creds for non-GCP environments; otherwise credentials will be
// automatically detected via ADC
// provided projectId should take precedence over env vars, etc
projectId: this.config.projectId,
// creds for non-GCP environments, in lieu of using ADC.
credentials: this.config.credentials,
},
getErrorHandler(
Expand Down

0 comments on commit 3e84881

Please sign in to comment.