From 33abfc40711cde15d4fde3a0b4606f3d6b8960ec Mon Sep 17 00:00:00 2001 From: adamnfish Date: Tue, 19 Dec 2023 19:46:01 +0000 Subject: [PATCH] Production trace debugging --- lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala b/lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala index 6f2a5a0..6177d42 100644 --- a/lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala +++ b/lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala @@ -76,6 +76,13 @@ class Lambda { case "$disconnect" => // ignore this for now case "$default" => + Option(AWSXRay.getCurrentSubsegment) match { + case Some(subsegment) => + awsContext.getLogger.log(subsegment.getTraceId.toString) + case None => + awsContext.getLogger.log("No subsegment found") + } + val subsegment = AWSXRay.beginSubsegment("io.adamnfish.pokerdot.Lambda::handleRequest:$default") try { val playerAddress = PlayerAddress(event.getRequestContext.getConnectionId)