-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from airbnb/ryandeivert-metric-filters
[metrics] v2 of metrics support using metric filters
- Loading branch information
Showing
31 changed files
with
441 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Initialize logging for the alert processor.""" | ||
import logging | ||
import os | ||
|
||
from stream_alert.shared import ALERT_PROCESSOR_NAME as FUNCTION_NAME | ||
|
||
# Create a package level logger to import | ||
LEVEL = os.environ.get('LOGGER_LEVEL', 'INFO').upper() | ||
|
||
# Cast integer levels to avoid a ValueError | ||
if LEVEL.isdigit(): | ||
LEVEL = int(LEVEL) | ||
|
||
logging.basicConfig(format='%(name)s [%(levelname)s]: [%(module)s.%(funcName)s] %(message)s') | ||
|
||
LOGGER = logging.getLogger('StreamAlertOutput') | ||
try: | ||
LOGGER.setLevel(LEVEL) | ||
except (TypeError, ValueError) as err: | ||
LOGGER.setLevel('INFO') | ||
LOGGER.error('Defaulting to INFO logging: %s', err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Initialize logging for the athena partition refresh function.""" | ||
import logging | ||
import os | ||
|
||
from stream_alert.shared import ATHENA_PARTITION_REFRESH_NAME as FUNCTION_NAME | ||
|
||
# Create a package level logger to import | ||
LEVEL = os.environ.get('LOGGER_LEVEL', 'INFO').upper() | ||
|
||
# Cast integer levels to avoid a ValueError | ||
if LEVEL.isdigit(): | ||
LEVEL = int(LEVEL) | ||
|
||
logging.basicConfig(format='%(name)s [%(levelname)s]: [%(module)s.%(funcName)s] %(message)s') | ||
|
||
LOGGER = logging.getLogger('StreamAlertAthena') | ||
try: | ||
LOGGER.setLevel(LEVEL) | ||
except (TypeError, ValueError) as err: | ||
LOGGER.setLevel('INFO') | ||
LOGGER.error('Defaulting to INFO logging: %s', err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.