aws / amazon-mwaa-docker-images

Apache License 2.0
24 stars 11 forks source link

Improve entrypoint logging + Enable StatsD metrics #51

Closed rafidka closed 4 months ago

rafidka commented 4 months ago

Issue #, if available: #8

Description of changes:

To enable better control on what gets logged out by the Docker image, I refactored the code to rely on Python logging, and added an environmet variable, MWAA__CORE__LOG_LEVEL, that can be used to set the level of logging output by the entrypoint.

Additionally, I also added the necessary Airflow configuration to enable the reporting of Airflow metrics via StatsD. To test this, the Docker Compose setup now has an additional server that listens to metrics. Currently, it doesn't actually generate metrics, but just print tham to stdout. This can be changed in the future to, perhaps, log the metrics to CloudWatch, or setup some local metrics server.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.