Skip to content

Commit 08613f9

Browse files
committed
[AWSX] fix(logs fowarder): Update docs on trace forwarding
1 parent e65a2ba commit 08613f9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

aws/logs_monitoring/enhanced_lambda_metrics.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
logger.setLevel(logging.getLevelName(os.environ.get("DD_LOG_LEVEL", "INFO").upper()))
8686

8787
try:
88-
from datadog_lambda.metric import lambda_stats
88+
from datadog_lambda.metric import lambda_metric
8989

9090
DD_SUBMIT_ENHANCED_METRICS = True
9191
except ImportError:
@@ -136,9 +136,7 @@ def submit_to_dd(self):
136136
logger.debug(
137137
"Submitting metric {} {} {}".format(self.name, self.value, self.tags)
138138
)
139-
lambda_stats.distribution(
140-
self.name, self.value, timestamp=timestamp, tags=self.tags
141-
)
139+
lambda_metric(self.name, self.value, timestamp=timestamp, tags=self.tags)
142140

143141

144142
def get_last_modified_time(s3_file):

aws/logs_monitoring/forwarder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _forward_logs(self, logs, key=None):
144144
def _forward_metrics(self, metrics, key=None):
145145
"""
146146
Forward custom metrics submitted via logs to Datadog in a background thread
147-
using `lambda_stats` that is provided by the Datadog Python Lambda Layer.
147+
using `lambda_metric` that is provided by the Datadog Python Lambda Layer.
148148
"""
149149
if logger.isEnabledFor(logging.DEBUG):
150150
logger.debug(f"Forwarding {len(metrics)} metrics")

aws/logs_monitoring/template.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,13 @@ Parameters:
292292
- CRITICAL
293293
DdTraceEnabled:
294294
Type: String
295-
Default: "true"
295+
Default: "false"
296296
AllowedValues:
297297
- "true"
298298
- "false"
299-
Description: Set to false to disable trace creation and forwarding for the forwarder itself. Enabling this may incur additional Serverless APM charges. See https://docs.datadoghq.com/tracing/trace_collection/library_config/python/#traces
299+
Description: Set to false to disable trace creation for the forwarder itself.
300+
Lambda forwarder should be instrumented to forward these traces to Datadog, see https://docs.datadoghq.com/serverless/aws_lambda/.
301+
Enabling this may incur additional Serverless APM charges. See https://docs.datadoghq.com/tracing/trace_collection/library_config/python/#traces.
300302
DdEnhancedMetrics:
301303
Type: String
302304
Default: "false"

0 commit comments

Comments
 (0)