Snowpark Container Services container logs: Changes to resource attributes¶
Attention
This behavior change is in the 2024_07 bundle.
For the current status of the bundle, refer to Bundle History.
Snowflake can capture and record local container logs from your application containers into the event table configured for your account.
The JSON object in the RESOURCE_ATTRIBUTES column in the event table provides information such as the service container that generated the log message, compute pool where the service is running, and others.
When this behavior change bundle is enabled, the JSON object in the RESOURCE_ATTRIBUTES column in the event table will change as described below:
Field names before the change |
Field names after the change |
---|---|
“snow.containers.compute_pool.id” . “snow.containers.compute_pool.name” |
“snow.compute_pool.id” . “snow.compute_pool.name” |
Not previously present |
“snow.compute_pool.node.id” . “snow.compute_pool.node.instance_family” |
“snow.containers.container.name” . “snow.containers.instance.name” . “snow.containers.restart.id” |
“snow.service.container.name” . “snow.service.container.instance” . “snow.service.container.run.id” |
“snow.executable.id” . “snow.executable.name” . “snow.executable.type” |
“snow.service.id” . “snow.service.name” . “snow.service.type” . |
“snow.executable.type” |
Removed |
“snow.account.name” . “snow.database.id” . “snow.database.name” . “snow.schema.id” |
No change. These field remain as is. |
The following is an example of resource attributes for a container log entry in the event table when this behavior change is enabled.
+-----------------------------------------------------------+
| RESOURCE_ATTRIBUTES |
|-----------------------------------------------------------|
| { |
| "snow.account.name": "SPCSDOCS1", |
| "snow.compute_pool.id": 20, |
| "snow.compute_pool.name": "TUTORIAL_COMPUTE_POOL", |
| "snow.compute_pool.node.id": "a17e8157", |
| "snow.compute_pool.node.instance_family": "CPU_X64_XS", |
| "snow.database.id": 26, |
| "snow.database.name": "TUTORIAL_DB", |
| "snow.schema.id": 212, |
| "snow.schema.name": "DATA_SCHEMA", |
| "snow.service.container.instance": "0", |
| "snow.service.container.name": "echo", |
| "snow.service.container.run.id": "b30566", |
| "snow.service.id": 114, |
| "snow.service.name": "ECHO_SERVICE2", |
| "snow.service.type": "Service" |
| } |
+-----------------------------------------------------------+
Ref: 1682