Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AZ / Availability Zone to ECS Metadata Env Vars #538

Closed
johnjameswhitman opened this issue Feb 3, 2023 · 0 comments
Closed

Add AZ / Availability Zone to ECS Metadata Env Vars #538

johnjameswhitman opened this issue Feb 3, 2023 · 0 comments

Comments

@johnjameswhitman
Copy link
Contributor

Describe the question/issue

I was reading about the ability to add ECS task metadata to the FluentBit config (docs). We would like to annotate logs with the AvailabilityZone key from ECS Metadata V4, but it doesn't seem like that's included yet.

I believe it would be straightforward to add it to this struct and populate in the rest of the file:

type ECSTaskMetadata struct {
AWS_REGION string `json:"AWSRegion"`
ECS_CLUSTER string `json:"Cluster"` // Cluster name
ECS_TASK_ARN string `json:"TaskARN"`
ECS_TASK_ID string `json:"TaskID"`
ECS_FAMILY string `json:"Family"`
ECS_LAUNCH_TYPE string `json:"LaunchType"` // Task launch type will be an empty string if container agent is under version 1.45.0
ECS_REVISION string `json:"Revision"` // Revision number
ECS_TASK_DEFINITION string `json:"TaskDefinition"` // TaskDefinition = "family:revision"
}

I would be happy to open a PR to add it in.

Related Issues

I couldn't find much on a quick search.

@johnjameswhitman johnjameswhitman changed the title Add AZ / Availability Zone to Add AZ / Availability Zone to ECS Metadata Env Vars Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant