You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/13 09:55:00 UTC

[jira] [Commented] (AIRFLOW-2325) Task logging with AWS Cloud watch

    [ https://issues.apache.org/jira/browse/AIRFLOW-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16950262#comment-16950262 ] 

ASF GitHub Bot commented on AIRFLOW-2325:
-----------------------------------------

fangpenlin commented on pull request #3229: [AIRFLOW-2325] Add cloudwatch task handler (IN PROGRESS)
URL: https://github.com/apache/airflow/pull/3229
 
 
   Make sure you have checked _all_ steps below.
   
   ### JIRA
   - [ ] My PR addresses the following [Airflow JIRA](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
       - https://issues.apache.org/jira/browse/AIRFLOW-2325
   
   
   ### Description
   - [ ] Here are some details about my PR, including screenshots of any UI changes:
   
   
   ### Tests
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   
   ### Commits
   - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   
   ### Documentation
   - [ ] In case of new functionality, my PR adds documentation that describes how to use it.
       - When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
   
   
   ### Code Quality
   - [ ] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Task logging with AWS Cloud watch
> ---------------------------------
>
>                 Key: AIRFLOW-2325
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2325
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: logging
>            Reporter: Fang-Pen Lin
>            Priority: Minor
>
> In many cases, it's ideal to use remote logging while running Airflow in production, as the worker could be easily scale down or scale up. Or the worker is running in containers, where the local storage is not meant to be there forever. In that case, the S3 task logging handler could be used
> [https://github.com/apache/incubator-airflow/blob/master/airflow/utils/log/s3_task_handler.py]
> However, it comes with drawback. S3 logging handler only uploads the log when the task completed or failed. For long running tasks, it's hard to know what's going on with the process until it finishes.
> To make more real-time logging, I built a logging handler based on AWS CloudWatch. It uses a third party python package `watchtower`
>  
> [https://github.com/kislyuk/watchtower/tree/master/watchtower]
>  
> I created a PR here [https://github.com/apache/incubator-airflow/pull/3229], basically I just copy-pasted the code I wrote for my own project, it works fine with 1.9 release, but never tested with master branch. Also, there is a bug in watchtower causing task runner to hang forever when it completes. I created an issue in their repo
> [https://github.com/kislyuk/watchtower/issues/57]
> And a PR for addressing that issue [https://github.com/kislyuk/watchtower/pull/58]
>  
> The PR is still far from ready to be reviewed, but I just want to get some feedback before I spend more time on it. I would like to see if youguys want this cloudwatch handler goes into the main repo, or do youguys prefer it to be a standalone third-party module. If it's that case, I can close this ticket and create a standalone repo on my own. If the PR is welcome, then I can spend more time on polishing it based on your feedback, add tests / documents and other stuff.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)