Skip to content

Commit

Permalink
Merge pull request #2 from AirWalk-Digital/bugfix/timeout_logging_too…
Browse files Browse the repository at this point in the history
…_verbose

Throttle logging too verbose
  • Loading branch information
jal25jal25 committed Aug 21, 2019
2 parents 0a26116 + 10134d3 commit e7fdcd6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

### 1.0.7 (2019-08-21)
- Logging bugfix

### 1.0.6 (2019-08-20)
- Add configurable API request throttle

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,7 +1,7 @@
FROM alpine:3.9

RUN apk add --update --no-cache python3~=3.6 && \
python3 -m pip install prometheus-aws-configservice-exporter==1.0.6 --no-cache-dir
python3 -m pip install prometheus-aws-configservice-exporter==1.0.7 --no-cache-dir

# Run as non-root
RUN adduser app -S -u 1000
Expand Down
7 changes: 4 additions & 3 deletions PUBLISH.md
Expand Up @@ -4,27 +4,28 @@

1. Update version in `setup.py`
2. Update `CHANGELOG.md`
1. Update package version in `Dockerfile`
3. [Release new version on GitHub](https://github.com/AirWalk-Digital/prometheus-aws-configservice-exporter/releases)
4. Build package `rm -f dist/* && python3 setup.py sdist`
5. Publish package `twine upload dist/*`

**Release Docker image**:

1. Update package version in `Dockerfile`
1. Update package version in `Dockerfile` (if not done above)
2. Build image
```
docker rmi -f prometheus-aws-configservice-exporter && \
docker build -t prometheus-aws-configservice-exporter .
```
3. Tag the image and push it to Docker Hub
```
docker tag prometheus-aws-configservice-exporter airwalkconsulting/prometheus-aws-configservice-exporter:latest &&
docker tag prometheus-aws-configservice-exporter airwalkconsulting/prometheus-aws-configservice-exporter:latest && \
docker push airwalkconsulting/prometheus-aws-configservice-exporter:latest
```
```
VERSION=__PUT_VERSION_HERE__
```
```
docker tag prometheus-aws-configservice-exporter airwalkconsulting/prometheus-aws-configservice-exporter:$VERSION &&
docker tag prometheus-aws-configservice-exporter airwalkconsulting/prometheus-aws-configservice-exporter:$VERSION && \
docker push airwalkconsulting/prometheus-aws-configservice-exporter:$VERSION
```
1 change: 1 addition & 0 deletions prometheus_aws_configservice_exporter/cli.py
Expand Up @@ -56,6 +56,7 @@ def _on_sigterm(signal, frame):

# Start server
start_http_server(args.exporter_port, args.exporter_host)
logger.info("Throttling %s seconds between each API request", args.throttle)
logger.info("Exporter listening on {host}:{port}".format(host=args.exporter_host, port=args.exporter_port))

while not shutdown:
Expand Down
2 changes: 0 additions & 2 deletions prometheus_aws_configservice_exporter/collector.py
Expand Up @@ -34,8 +34,6 @@ def collect(self):
"The total number of scrape errors",
labels=["region"])

logging.getLogger().info("Throttling %s seconds between each API request", self.throttle)

# Customize the boto client config
botoConfig = botocore.client.Config(connect_timeout=2, read_timeout=10, retries={"max_attempts": 2})

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

# Version
version = "1.0.6"
version = "1.0.7"

# Requires Python 3
if sys.version_info.major < 3:
Expand Down

0 comments on commit e7fdcd6

Please sign in to comment.