Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Issue #243 use API to discover projectId
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Wilkins <[email protected]>
  • Loading branch information
gregw committed Jan 16, 2019
1 parent ed7ad10 commit dabc7cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.runtimes.jetty9;

import com.google.cloud.ServiceOptions;
import com.google.cloud.logging.TraceLoggingEnhancer;

import org.eclipse.jetty.server.Request;
Expand All @@ -40,7 +41,7 @@ public class RequestContextScope implements ContextHandler.ContextScopeListener
private static final String X_CLOUD_TRACE = "x-cloud-trace-context";
private static final ThreadLocal<Integer> contextDepth = new ThreadLocal<>();

private final String projectId = System.getProperty("app.deploy.project", "unknown");
private final String projectId = ServiceOptions.getDefaultProjectId();

@Override
public void enterScope(Context context, Request request, Object reason) {
Expand Down

0 comments on commit dabc7cc

Please sign in to comment.