[
https://issues.apache.org/jira/browse/BEAM-13440?focusedWorklogId=698632&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-698632
]
ASF GitHub Bot logged work on BEAM-13440:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Dec/21 12:28
Start Date: 20/Dec/21 12:28
Worklog Time Spent: 10m
Work Description: daria-malkova commented on a change in pull request
#16241:
URL: https://github.com/apache/beam/pull/16241#discussion_r772322167
##########
File path: playground/backend/internal/environment/application.go
##########
@@ -90,14 +90,22 @@ type ApplicationEnvs struct {
// pipelineExecuteTimeout is timeout for code processing
pipelineExecuteTimeout time.Duration
+
+ // launchSite is a launch site of application
+ launchSite string
+
+ // googleProjectId is the Google Сloud project id
+ googleProjectId string
}
// NewApplicationEnvs constructor for ApplicationEnvs
-func NewApplicationEnvs(workingDir string, cacheEnvs *CacheEnvs,
pipelineExecuteTimeout time.Duration) *ApplicationEnvs {
+func NewApplicationEnvs(workingDir, launchSite, googleCloudProjectId string,
cacheEnvs *CacheEnvs, pipelineExecuteTimeout time.Duration) *ApplicationEnvs {
Review comment:
googleCloudProjectId -> usually it is just named projectId
##########
File path: playground/backend/internal/environment/environment_service.go
##########
@@ -40,6 +40,10 @@ const (
cacheKeyExpirationTimeKey = "KEY_EXPIRATION_TIME"
pipelineExecuteTimeoutKey = "PIPELINE_EXPIRATION_TIMEOUT"
protocolTypeKey = "PROTOCOL_TYPE"
+ launchSiteKey = "LAUNCH_SITE"
+ googleProjectIdKey = "GOOGLE_CLOUD_PROJECT"
+ defaultLaunchSite = "local"
+ defaultGoogleProjectId = ""
Review comment:
do we need a default project id if it is empty?
##########
File path: playground/backend/internal/logger/logger.go
##########
@@ -32,6 +33,25 @@ const (
var handlers []Handler
+// SetupLogger constructs logger by application environment
+// Add handlers in root logger:
+// CloudLoggingHandler - if server running on App Engine
+// StdHandler - if server running locally
+func SetupLogger(ctx context.Context, launchSite, googleProjectId string) {
+ switch launchSite {
+ case "app_engine":
Review comment:
constant
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 698632)
Time Spent: 1h 20m (was: 1h 10m)
> [Playground] Implement initialization of Cloud Logger
> -----------------------------------------------------
>
> Key: BEAM-13440
> URL: https://issues.apache.org/jira/browse/BEAM-13440
> Project: Beam
> Issue Type: Task
> Components: beam-playground
> Reporter: Pavel Avilov
> Assignee: Pavel Avilov
> Priority: P2
> Labels: beam-playground-backend, beam-playground-beta-launch,
> beam-playground-sprint-5
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Need to add the initialization of google cloud logger to display the logs in
> the App Engine.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)