Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LOG_LEVEL for temporal #4532

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Add LOG_LEVEL for temporal #4532

merged 1 commit into from
Jul 5, 2021

Conversation

panhavad
Copy link
Contributor

@panhavad panhavad commented Jul 4, 2021

What

Just add LOG_LEVEL=${LOG_LEVEL} for airbyte-temporal.

How

This will allow the control on the log of airbyte-temporal too.
Tested with: "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"

None of them cause to crash the application.

  • FATAL and ERROR: give a great result in Terminal, so silence
  • INFO and DEBUG: show a ton of info.

Recommended reading order

  1. docker_compose.

@panhavad
Copy link
Contributor Author

panhavad commented Jul 4, 2021

@davinchia

@davinchia
Copy link
Contributor

@panhavad did you test this locally? I'm not sure this works as this is running on the temporal image and we do not control the logging

@panhavad
Copy link
Contributor Author

panhavad commented Jul 5, 2021

did you test this locally?

@davinchia Yes, I did. It works fine.
I also tested on the original docker-compose in https://github.com/temporalio/temporal too.
Everything work the same way.

If using LOG_LEVEL=ERROR

airbyte-temporal    | + echo 'Registering default namespace: default'
airbyte-temporal    | + tctl --ns default namespace describe
airbyte-temporal    | Registering default namespace: default
airbyte-temporal    | Name: default
airbyte-temporal    | Id: e6379132-fc9b-44a1-a180-2e6c8b6c31de
airbyte-temporal    | Description: Default namespace for Temporal Server
airbyte-temporal    | OwnerEmail:
airbyte-temporal    | NamespaceData: map[string]string(nil)
airbyte-temporal    | State: Registered
airbyte-temporal    | RetentionInDays: 24h0m0s
airbyte-temporal    | ActiveClusterName: active
airbyte-temporal    | Clusters: active
airbyte-temporal    | HistoryArchivalState: Disabled
airbyte-temporal    | VisibilityArchivalState: Disabled
airbyte-temporal    | Bad binaries to reset:
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | | BINARY CHECKSUM | OPERATOR | START TIME | REASON |
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | + echo 'Default namespace registration complete.'
airbyte-temporal    | Default namespace registration complete.
airbyte-scheduler   | 2021-07-05 06:43:53 INFO i.a.s.a.SchedulerApp(main):194 - {} - configRoot = /data
airbyte-scheduler   | 2021-07-05 06:43:53 INFO i.a.s.a.SchedulerApp(main):199 - {workspace_app_root=/tmp/workspace/scheduler/logs} - workspaceRoot = /tmp/workspace

If using LOG_LEVEL=INFO

airbyte-temporal    | + echo 'Registering default namespace: default'
airbyte-temporal    | + tctl --ns default namespace describe
airbyte-temporal    | Registering default namespace: default
airbyte-temporal    | Name: default
airbyte-temporal    | Id: e6379132-fc9b-44a1-a180-2e6c8b6c31de
airbyte-temporal    | Description: Default namespace for Temporal Server
airbyte-temporal    | OwnerEmail:
airbyte-temporal    | NamespaceData: map[string]string(nil)
airbyte-temporal    | State: Registered
airbyte-temporal    | RetentionInDays: 24h0m0s
airbyte-temporal    | ActiveClusterName: active
airbyte-temporal    | Clusters: active
airbyte-temporal    | HistoryArchivalState: Disabled
airbyte-temporal    | VisibilityArchivalState: Disabled
airbyte-temporal    | Bad binaries to reset:
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | | BINARY CHECKSUM | OPERATOR | START TIME | REASON |
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | +-----------------+----------+------------+--------+
airbyte-temporal    | + echo 'Default namespace registration complete.'
airbyte-temporal    | Default namespace registration complete.
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.443Z","msg":"Received a ring changed event","service":"matching","component":"service-resolver","service":"history","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.443Z","msg":"Received a ring changed event","service":"matching","component":"service-resolver","service":"worker","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.443Z","msg":"Received a ring changed event","service":"matching","component":"service-resolver","service":"frontend","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.443Z","msg":"Received a ring changed event","service":"matching","component":"service-resolver","service":"matching","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.457Z","msg":"Received a ring changed event","service":"frontend","component":"service-resolver","service":"worker","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.458Z","msg":"Received a ring changed event","service":"frontend","component":"service-resolver","service":"history","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.457Z","msg":"Received a ring changed event","service":"frontend","component":"service-resolver","service":"matching","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.458Z","msg":"Received a ring changed event","service":"frontend","component":"service-resolver","service":"frontend","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.473Z","msg":"Received a ring changed event","service":"worker","component":"service-resolver","service":"frontend","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.473Z","msg":"Received a ring changed event","service":"worker","component":"service-resolver","service":"worker","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.473Z","msg":"Received a ring changed event","service":"worker","component":"service-resolver","service":"matching","logging-call-at":"rpServiceResolver.go:219"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:46:40.473Z","msg":"Received a ring changed event","service":"worker","component":"service-resolver","service":"history","logging-call-at":"rpServiceResolver.go:219"}

If using LOG_LEVEL=DEBUG

airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.172Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Starting","wf-task-queue-name":"/_sys/1@28711d674d0b:a3e54b65-b53c-48b1-b51b-15cb86de2444/3","wf-task-queue-type":"Workflow","logging-call-at":"matchingEngine.go:188"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.172Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Starting","wf-task-queue-name":"SYNC","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:188"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.173Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Starting","wf-task-queue-name":"/_sys/SYNC/1","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:188"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.173Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Starting","wf-task-queue-name":"/_sys/1@28711d674d0b:a3e54b65-b53c-48b1-b51b-15cb86de2444/2","wf-task-queue-type":"Workflow","logging-call-at":"matchingEngine.go:188"}
airbyte-temporal    | {"level":"debug","ts":"2021-07-05T06:49:43.175Z","msg":"Received PollActivityTaskQueue for taskQueue","service":"matching","component":"matching-engine","name":"SYNC","logging-call-at":"matchingEngine.go:426"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.179Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Started","wf-task-queue-name":"/_sys/SYNC/3","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:202"}
airbyte-temporal    | {"level":"debug","ts":"2021-07-05T06:49:43.180Z","msg":"Received PollActivityTaskQueue for taskQueue","service":"matching","component":"matching-engine","name":"SYNC","logging-call-at":"matchingEngine.go:426"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.181Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Started","wf-task-queue-name":"/_sys/SYNC/1","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:202"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.181Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Started","wf-task-queue-name":"/_sys/SYNC/2","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:202"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.182Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Started","wf-task-queue-name":"SYNC","wf-task-queue-type":"Activity","logging-call-at":"matchingEngine.go:202"}
airbyte-temporal    | {"level":"info","ts":"2021-07-05T06:49:43.182Z","msg":"none","service":"matching","component":"matching-engine","lifecycle":"Started","wf-task-queue-name":"/_sys/1@28711d674d0b:a3e54b65-b53c-48b1-b51b-15cb86de2444/3","wf-task-queue-type":"Workflow","logging-call-at":"matchingEngine.go:202"}
airbyte-temporal    | {"level":"debug","ts":"2021-07-05T06:49:43.183Z","msg":"Received PollWorkflowTaskQueue for taskQueue","service":"matching","component":"matching-engine","wf-task-queue-name":"1@28711d674d0b:a3e54b65-b53c-48b1-b51b-15cb86de2444","logging-call-at":"matchingEngine.go:333"}

@davinchia
Copy link
Contributor

Nice!

@davinchia davinchia merged commit a7196d4 into airbytehq:master Jul 5, 2021
@panhavad panhavad deleted the pvd/log-level branch July 5, 2021 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants