Skip to content

Commit

Permalink
Production trace debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnfish committed Dec 19, 2023
1 parent f47b4ae commit 33abfc4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lambda/src/main/scala/io/adamnfish/pokerdot/Lambda.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 33abfc4

Please sign in to comment.