Current setup is this :
ECS Task with 2 containers,
- App Container
- Logging Container (fluentbit, created by default after using the firelens logging)
The logs generated from the App container are sent to a Kinesis Firehose Stream , and then this stream sends them to an S3 bucket.
My question is how can i add some additional metadata to the logs (key:value) so that way i can filter them at the OpenSearch(which is the final destination)
This is the code in CDK for the logging part
logging=ecs.LogDrivers.firelens(options={
"Name": "firehose",
"region": "us-east-1",
"delivery_stream":"kinesis-stream"
}
)
i have tried adding,
env=["string"],
labels=["string"],
tag="string"
but they are not added to the logs