Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scrapy_statsd_extension/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
STATSD_LOG_ONLY = []
STATSD_TAGGING = False
STATSD_TAGS = {"spider_name": True}
STATSD_IGNORE = []
3 changes: 2 additions & 1 deletion scrapy_statsd_extension/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def __init__(self, crawler_settings):
host = crawler_settings.get("STATSD_HOST", defaults.STATSD_HOST)
port = crawler_settings.get("STATSD_PORT", defaults.STATSD_PORT)
prefix = crawler_settings.get("STATSD_PREFIX", defaults.STATSD_PREFIX)
log_only = False
self.client = statsd.StatsClient(host, port, prefix)

self.prefixes_to_log = crawler_settings.get(
Expand All @@ -16,7 +17,7 @@ def __init__(self, crawler_settings):
self.log_all_fields = bool(log_only) == False

self.ignored_prefixes = (
crawler_settings.get("STATSD_IGNORE", defaults.STATSD_IGNORE) or []
crawler_settings.get("STATSD_IGNORE", defaults.STATSD_IGNORE)
)

self.tagging_enabled = crawler_settings.get(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version="0.1.0",
url="https://github.com/scrapy-plugins/scrapy-statsd",
description="Scrapy extenstion to log stats to statsd",
long_description=(pathlib.Path(__file__).parent / "README.md").read_text(),
long_description=(pathlib.Path(__file__).parent / "README.rst").read_text(),
long_description_content_type="text/markdown",
author="Scrapy developers",
license="BSD",
Expand Down