salmon-flower-36598
11/27/2024, 7:11 AMjolly-florist-66728
11/27/2024, 7:11 AMFLYTE_SDK_LOGGING_LEVEL
environment variable to set the log level, which determines the minimum severity of logs to be captured. For example, setting it to 20
will capture logs at the INFO
level and above.
For configuring log providers, Flyte allows you to set up URLs for log aggregators like AWS CloudWatch or GCP Stackdriver. This is done by specifying templated URIs in the task_logs
configuration. You can find more details on configuring logging links in the Flyte UI in the Flyte documentation.
Would you like more detail on any specific part of the logging configuration process?
Sources:
- Configuring logging links in the UI
- Flyte GitHub Issue #4830 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.salmon-flower-36598
11/27/2024, 7:13 AMjolly-florist-66728
11/27/2024, 7:13 AMtask_logs
configuration in your Flyte deployment. This involves enabling CloudWatch and specifying the log group and region. Here's a basic example:
1. Enable CloudWatch Logging: Set cloudwatch-enabled
to true
.
2. Specify CloudWatch Region and Log Group: Define the cloudwatch-region
and cloudwatch-log-group
in your configuration.
Here's a sample configuration in YAML format:
task_logs:
plugins:
logs:
cloudwatch-enabled: true
cloudwatch-region: "us-east-1"
cloudwatch-log-group: "/aws/eks/your-log-group"
Ensure that your Kubernetes cluster is configured to send logs to CloudWatch, typically using FluentD or FluentBit. You may need to adjust IAM roles to allow writing to CloudWatch.
Would you like more detailed steps or information on setting up FluentD or FluentBit?
Sources:
- Configuring logging links in the UI
- Flyte GitHub Issue #2635 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.salmon-flower-36598
11/27/2024, 7:14 AMjolly-florist-66728
11/27/2024, 7:15 AMfluent-bit-config
ConfigMap:
kubectl edit cm -n amazon-cloudwatch fluent-bit-config
Update the configuration to include:
[OUTPUT]
Name cloudwatch_logs
Match application.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/application
log_stream_prefix var.
auto_create_group true
extra_user_agent container-insights
3. Configure Flyte: Update the Flyte task_logs
configuration to enable CloudWatch logging and specify the template URI:
task_logs:
plugins:
logs:
cloudwatch-enabled: true
cloudwatch-region: "us-east-1"
cloudwatch-log-group: "/aws/containerinsights/your-cluster-name/application"
cloudwatch-template-uri: 'https://{vars.region}.console.aws.amazon.com/cloudwatch/home?region={vars.region}#logsV2:log-groups/log-group/$252Faws$252Fcontainerinsights$252F<log group name>$252Fapplication$3FlogStreamNameFilter$3Dvar.application.var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}'
Ensure that your IAM roles have the necessary permissions to write logs to CloudWatch.
Would you like more detailed guidance on any of these steps?
Sources:
- GitHub Issue #2635 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.average-finland-92144
12/04/2024, 10:19 AM