Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

moritzzimmer
Copy link
Member

This pull request adds compression settings to the logging configuration for OpenSearch in two Terraform files: container_definition.tf and envoy.tf.

AWS recommends to enable ´gzip´ compression for bulk requests for performance reasons, so we use it by default.

Logging Configuration Updates:

  • container_definition.tf: Added the Compress option set to "gzip" in the logging configuration for application logs.
  • envoy.tf: Added the Compress option set to "gzip" in the logging configuration for Envoy logs.

@moritzzimmer moritzzimmer requested a review from Copilot July 16, 2025 07:24
@moritzzimmer moritzzimmer self-assigned this Jul 16, 2025
@moritzzimmer moritzzimmer requested a review from thisismana as a code owner July 16, 2025 07:24
@moritzzimmer moritzzimmer added the enhancement New feature or request label Jul 16, 2025
@moritzzimmer moritzzimmer requested a review from saefty as a code owner July 16, 2025 07:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables gzip compression for OpenSearch logs in FireLens configurations to improve performance of bulk requests as recommended by AWS.

  • Adds Compress = "gzip" to the FireLens log options in both the Envoy and application container definitions
  • Aligns with AWS best practices for log ingestion performance

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
envoy.tf Added Compress = "gzip" to FireLens options
container_definition.tf Added Compress = "gzip" to FireLens options
Comments suppressed due to low confidence (1)

container_definition.tf:20

  • Consider adding a Terraform plan assertion or a Terratest case to verify that the Compress option is set to gzip, ensuring this configuration is applied in CI.
        Compress           = "gzip"


logConfiguration = var.firelens.enabled && var.firelens.opensearch_host != "" ? {
logDriver = "awsfirelens",
options = {
Copy link
Preview

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The Compress = "gzip" option is duplicated in both Terraform files; consider extracting shared FireLens options into a local variable or module to avoid repetition.

Copilot uses AI. Check for mistakes.

@moritzzimmer moritzzimmer changed the title feat: enabled gzip compression for OpenSearch logs DO NOT MERGE feat: enabled gzip compression for OpenSearch logs Jul 16, 2025
@moritzzimmer
Copy link
Member Author

we need at least FluentBit 2.x for this setting, https://github.com/aws/aws-for-fluent-bit/releases/tag/v2.32.5.20250626 is currently based on 1.9.10

@moritzzimmer moritzzimmer marked this pull request as draft August 19, 2025 11:27
@moritzzimmer moritzzimmer changed the title DO NOT MERGE feat: enabled gzip compression for OpenSearch logs feat: enabled gzip compression for OpenSearch logs Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant