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

Implement logging of Terrahub workflow to local file #784

Open
aluchianic opened this issue Jun 14, 2019 · 3 comments
Open

Implement logging of Terrahub workflow to local file #784

aluchianic opened this issue Jun 14, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@aluchianic
Copy link
Contributor

Feature Report

Add functionality to have workflow logs in all use cases (ES or local Log files)

Describe the Feature

Implement logging to local file ~/.terrahub/cache/log/[runId]/[componentName].log if ES logging is disabled

Expected Behavior

Logging flow :
on start terrahub cli - create [runId]_start.log
on start terrahub component - create [runId]_component.log, upload [runId]_start.log
on end terrahub component - create [runId]_end.log, upload [runId]_component.log
on end terrahub cli - merge all logs into 1 file, upload [runId]_end.log

@aluchianic aluchianic self-assigned this Jun 14, 2019
@eistrati
Copy link
Contributor

@const-andreyLu After another set of conversations with @vcalmic and @euliancom, we would like to propose an improved logging workflow:

  • on start terrahub cli - create [runId]_start.log
  • on start terrahub component - create [runId]_component.log
  • on end terrahub component - create [run_id]_end.log; if NO ES && VALID token && Cloud Deployer inside Lambda, then upload [runId]_component.log to S3; if NO ES && VALID token && Cloud Deployer outside Lambda, then download [runId]_component.log from S3
  • on end terrahub cli - merge all logs into 1 file; if NO ES && VALID token, then upload merged file to S3

@eistrati eistrati added the enhancement New feature or request label Jun 15, 2019
@aluchianic
Copy link
Contributor Author

aluchianic commented Jun 18, 2019

Requirements to implement

  • create separate worker for logging execution
    • ES logging
    • API logging
    • local log file create/download
    • S3 upload/download
  • send batch messages to ES
    • array of object (log buffer and timestamp)

@aluchianic
Copy link
Contributor Author

aluchianic commented Jun 26, 2019

Requirements updates

  • instead of create separate worker for logging execution create class for api logging
  • if logging is enabled - create worker that will :
    • make requests to api
    • create/download local log files
    • S3 upload/download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants