Skip to content

Enhance Synthetic Span Service Representation #655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
45 changes: 27 additions & 18 deletions integration_tests/snapshots/logs/process-input-traced_node18.log
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ START
"http.url": "https://undefined",
"resource_names": "GET /{proxy+}",
"request_id":"XXXX",
"span.kind": "server",
"apiid":"XXXX",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "sync",
Expand All @@ -56,6 +57,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"process_id":XXXX,
"_sampling_priority_v1": 1
},
Expand Down Expand Up @@ -90,7 +92,6 @@ START
"api_gateway_request_id": "41b45ea3-70b5-11e6-b7bd-69b5aaebc7d9",
"event_type": "APIGateway",
"http.status_code": "200",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -102,7 +103,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good news. I'm fairly certain this change will not impact billing. Check out this method in dd-go https://github.com/DataDog/dd-go/blob/ba9638063271fa8bec5ce732d88ed0244795cca9/trace/apps/trace-spans-meta-extractor/usage_points.go. We look for a spans with name "aws.lambda" (not service or operation name) and create a billing metric point for each. I was worried this change in the service would impact that, but it looks like it won't.

Just to be sure, if you haven't already, check to make sure the datadog.serverless.traced_invocations metric is still created for each invocation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is span.name and operation.name not the same thing? As long as operation.name is unchanged, it should be fine as long as I'm understanding the code, the same way you are.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's my understanding as well. Still worth double checking by testing these changes in the wild though.

"type": "serverless"
},
{
Expand Down Expand Up @@ -202,6 +203,7 @@ START
"tablename": "someTableName",
"resource_names": "MODIFY someTableName",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"event_name": "MODIFY",
Expand All @@ -215,6 +217,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"size_bytes": 37,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -245,7 +248,6 @@ START
"dd_trace": "",
"function_trigger.event_source": "dynamodb",
"function_trigger.event_source_arn": "arn:aws:dynamodb:us-east-1:1234567890:table/someTableName/stream/2024-12-11T20:00:00.000",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -257,7 +259,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -355,6 +357,7 @@ START
"tablename": "someTableName",
"resource_names": "REMOVE someTableName",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"event_name": "REMOVE",
Expand All @@ -368,6 +371,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"size_bytes": 37,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -398,7 +402,6 @@ START
"dd_trace": "",
"function_trigger.event_source": "dynamodb",
"function_trigger.event_source_arn": "arn:aws:dynamodb:us-east-1:1234567890:table/someTableName/stream/2024-12-11T20:00:00.000",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -410,7 +413,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -508,6 +511,7 @@ START
"tablename": "someTableName",
"resource_names": "INSERT someTableName",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"event_name": "INSERT",
Expand All @@ -521,6 +525,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"size_bytes": 37,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -551,7 +556,6 @@ START
"dd_trace": "",
"function_trigger.event_source": "dynamodb",
"function_trigger.event_source_arn": "arn:aws:dynamodb:us-east-1:1234567890:table/someTableName/stream/2024-12-11T20:00:00.000",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -563,7 +567,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -660,6 +664,7 @@ START
"operation_name": "aws.s3",
"resource_names": "my-bucket-name",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"bucketname": "my-bucket-name",
Expand All @@ -673,6 +678,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"object_size": 8388608,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -704,7 +710,6 @@ START
"function_trigger.event_source": "s3",
"function_trigger.event_source_arn": "arn:aws:s3:::my-bucket-name",
"event_type": "S3",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -716,7 +721,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -792,6 +797,7 @@ START
"operation_name": "aws.s3",
"resource_names": "my-bucket-name",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"bucketname": "my-bucket-name",
Expand All @@ -805,6 +811,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"object_size": 100,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -836,7 +843,6 @@ START
"function_trigger.event_source": "s3",
"function_trigger.event_source_arn": "arn:aws:s3:::my-bucket-name",
"event_type": "S3",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -848,7 +854,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -924,6 +930,7 @@ START
"operation_name": "aws.s3",
"resource_names": "my-bucket-name",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"bucketname": "my-bucket-name",
Expand All @@ -937,6 +944,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"object_size": 100,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -968,7 +976,6 @@ START
"function_trigger.event_source": "s3",
"function_trigger.event_source_arn": "arn:aws:s3:::my-bucket-name",
"event_type": "S3",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -980,7 +987,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -1055,6 +1062,7 @@ START
"operation_name": "aws.sns",
"resource_names": "sns-lambda",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"type": "Notification",
Expand All @@ -1069,6 +1077,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"process_id":XXXX,
"_sampling_priority_v1": 1
},
Expand Down Expand Up @@ -1099,7 +1108,6 @@ START
"function_trigger.event_source": "sns",
"function_trigger.event_source_arn": "arn:aws:sns:us-east-2:123456789012:sns-lambda",
"event_type": "SNS",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -1111,7 +1119,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down Expand Up @@ -1186,6 +1194,7 @@ START
"operation_name": "aws.sqs",
"resource_names": "my-queue",
"request_id":"XXXX",
"span.kind": "server",
"_inferred_span.tag_source": "self",
"_inferred_span.synchronicity": "async",
"queuename": "my-queue",
Expand All @@ -1198,6 +1207,7 @@ START
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_dd.measured": 1,
"retry_count": 1,
"process_id":XXXX,
"_sampling_priority_v1": 1
Expand Down Expand Up @@ -1229,7 +1239,6 @@ START
"function_trigger.event_source": "sqs",
"function_trigger.event_source_arn": "arn:aws:sqs:us-east-2:123456789012:my-queue",
"event_type": "SQS",
"_dd.base_service": "integration-tests-js-XXXX-process-input-traced_node18",
"language": "javascript"
},
"metrics": {
Expand All @@ -1241,7 +1250,7 @@ START
"start":XXXX,
"duration":XXXX,
"links": [],
"service": "aws.lambda",
"service": "integration-tests-js-XXXX-process-input-traced_node18",
"type": "serverless"
},
{
Expand Down
Loading
Loading