Skip to content

Commit 9186c49

Browse files
committed
Shorten the metric log keys
1 parent 9846c96 commit 9186c49

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CHANGELOG
22
=========
3+
# v3 / 2019-06-18
4+
5+
* Log metrics in a compact format
6+
37
# v2 / 2019-06-10
48

59
* Support submitting metrics through CloudWatch Logs

datadog_lambda/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2"
1+
__version__ = "3"

datadog_lambda/metric.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def lambda_metric(metric_name, value, timestamp=None, tags=None):
5353
tags = _tag_dd_lambda_layer(tags)
5454
if os.environ.get('DATADOG_FLUSH_TO_LOG') == 'True':
5555
print(json.dumps({
56-
'metric_name': metric_name,
57-
'value': value,
58-
'timestamp': timestamp or int(time.time()),
59-
'tags': tags
56+
'm': metric_name,
57+
'v': value,
58+
'e': timestamp or int(time.time()),
59+
't': tags
6060
}))
6161
else:
6262
lambda_stats.distribution(

0 commit comments

Comments
 (0)