Skip to content

Commit d1d4cba

Browse files
committed
add _dd.inferred_span metric
1 parent 28bf2a2 commit d1d4cba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datadog_lambda/tracing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ def create_inferred_span_from_api_gateway_event(
11051105
span = tracer.trace("aws.apigateway", **args)
11061106
if span:
11071107
span.set_tags(tags)
1108+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
11081109
# start time pushed by the inserted authorizer span
11091110
span.start_ns = int(
11101111
finish_time_ns
@@ -1172,6 +1173,7 @@ def create_inferred_span_from_http_api_event(
11721173
)
11731174
if span:
11741175
span.set_tags(tags)
1176+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
11751177
span.start_ns = int(inferred_span_start_ns)
11761178
return span
11771179

@@ -1513,6 +1515,7 @@ class InferredSpanInfo(object):
15131515
BASE_NAME = "_inferred_span"
15141516
SYNCHRONICITY = f"{BASE_NAME}.synchronicity"
15151517
TAG_SOURCE = f"{BASE_NAME}.tag_source"
1518+
METRIC = f"_dd.{BASE_NAME}"
15161519

15171520
@staticmethod
15181521
def set_tags(

0 commit comments

Comments
 (0)