From 6677bd707b95651bbdfc0695f0e03213f0058953 Mon Sep 17 00:00:00 2001 From: Zhihong Lin Date: Wed, 30 Oct 2024 16:38:34 -0400 Subject: [PATCH] Add comment to explain entity drops without account ID --- plugins/out_cloudwatch_logs/cloudwatch_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 1d4dbf21ff4..fb330726afb 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -367,7 +367,8 @@ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, goto error; } // If we are missing the service name, the entity will get rejected by the frontend anyway - // so do not emit entity unless service name is filled + // so do not emit entity unless service name is filled. If we are missing account ID + // it is considered not having sufficient information for entity therefore we should drop the entity. if(ctx->add_entity && stream->entity != NULL && stream->entity->key_attributes != NULL && stream->entity->key_attributes->name != NULL && stream->entity->key_attributes->account_id != NULL) { if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"entity\":{", 10)) {