Skip to content

Commit

Permalink
chore: Enables JSON logging in AWS (#8096)
Browse files Browse the repository at this point in the history
Cloudwatch is smart enough to parse JSON logs, and we can use the
different fields extracted for querying in Insights.

**Builds on #8095**
  • Loading branch information
spalladino committed Aug 21, 2024
1 parent b53e240 commit fe53fbb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yarn-project/aztec/terraform/bot/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ resource "aws_ecs_task_definition" "aztec-bot" {
{ name = "PXE_PROVER_ENABLED", value = tostring(var.PROVING_ENABLED) },
{ name = "NETWORK", value = var.DEPLOY_TAG },
{ name = "BOT_FLUSH_SETUP_TRANSACTIONS", value = tostring(var.BOT_FLUSH_SETUP_TRANSACTIONS) },
{ name = "BOT_MAX_PENDING_TXS", value = tostring(var.BOT_MAX_PENDING_TXS) }
{ name = "BOT_MAX_PENDING_TXS", value = tostring(var.BOT_MAX_PENDING_TXS) },
{ name = "LOG_JSON", value = "1" }
]
logConfiguration = {
logDriver = "awslogs"
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/aztec/terraform/node/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ resource "aws_ecs_task_definition" "aztec-node" {
name = "LOG_LEVEL"
value = "info"
},
{
name = "LOG_JSON",
value = "1"
},
{
name = "NETWORK_NAME",
value = "${var.DEPLOY_TAG}"
Expand Down
1 change: 1 addition & 0 deletions yarn-project/aztec/terraform/prover-node/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ resource "aws_ecs_task_definition" "aztec-prover-node" {
// General
{ name = "NODE_ENV", value = "production" },
{ name = "LOG_LEVEL", value = "verbose" },
{ name = "LOG_JSON", value = "1" },
{ name = "DEBUG", value = "aztec:*,-json-rpc:json_proxy:*,-aztec:avm_simulator:*" },
{ name = "DEPLOY_TAG", value = var.DEPLOY_TAG },
{ name = "NETWORK_NAME", value = "${var.DEPLOY_TAG}" },
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/aztec/terraform/prover/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ resource "aws_ecs_task_definition" "aztec-proving-agent" {
{
"name": "NETWORK_NAME",
"value": "${var.DEPLOY_TAG}"
},
{
"name": "LOG_JSON",
"value": "1"
}
],
"logConfiguration": {
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/aztec/terraform/pxe/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ resource "aws_ecs_task_definition" "aztec-pxe" {
{
name = "PXE_PROVER_ENABLED"
value = tostring(var.PROVING_ENABLED)
},
{
name = "LOG_JSON"
value = "1"
}
]
mountPoints = [
Expand Down

0 comments on commit fe53fbb

Please sign in to comment.