aws-observability / helm-charts

The AWS Observability Helm Charts repository contains Helm charts to provide easy mechanisms to setup the CloudWatch Agent and other collection agents to collect telemetry data such as metrics, logs and traces to send to AWS monitoring services.
Apache License 2.0
10 stars 17 forks source link

Adding support for supplemental YAML config for cloudwatch-agent on Linux #110

Closed mitali-salvi closed 1 month ago

mitali-salvi commented 1 month ago

Description of changes:

  1. Update amazoncloudwatchagent CRD to support otelConfig field
  2. Add support for otelConfig in the Linux cloudwatch agent custom resource

Tested as part of https://github.com/aws/amazon-cloudwatch-agent-operator/pull/241 Additional testing for supporting empty config in agent YAML config - verified the agent pod starts up for the following YAML configs

    receivers:
      otlp:
        protocols:
          grpc:
          http:
      awsxray:
    processors:
      batch/traces:
      batch/metrics:
    exporters:
      awsxray:
      awsemf:
    service:
      pipelines:
        traces:
          receivers: [ otlp,awsxray ]
          processors: [ batch/traces ]
          exporters: [ awsxray ]
        metrics:
          receivers: [ otlp ]
          processors: [ batch/metrics ]
          exporters: [ awsemf ]

----------------------------------------------
    extensions:
      health_check:
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318
      awsxray:
        endpoint: 0.0.0.0:2000
        transport: udp
    processors:
      batch/traces:
        timeout: 1s
        send_batch_size: 50
      batch/metrics:
        timeout: 60s
    exporters:
      awsxray:
      awsemf:

    service:
      pipelines:
        traces:
          receivers: [otlp,awsxray]
          processors: [batch/traces]
          exporters: [awsxray]
        metrics:
          receivers: [otlp]
          processors: [batch/metrics]
          exporters: [awsemf]

      extensions: [health_check]

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

skripted-io commented 4 weeks ago

@mitali-salvi I saw this PR is included in the latest release. Will this feature allow us to filter (set) the metrics that are sent to CW/ContainerInsights? Because right now it seems to be either all or nothing. Thanks.