Skip to content

Add OTEL CI logs agent components #2113

Merged
sky333999 merged 1 commit into
mainfrom
feature/otelify-ci-logs
May 15, 2026
Merged

Add OTEL CI logs agent components #2113
sky333999 merged 1 commit into
mainfrom
feature/otelify-ci-logs

Conversation

@louisall
Copy link
Copy Markdown
Collaborator

@louisall louisall commented May 11, 2026

Add container_log_parser operator and awscloudwatchlogsprovisioner extension

Registers the agent-side components needed for OTEL Container Insights log pipelines.

Changes

  • plugins/plugins.go — imports container_log_parser stanza operator from the fork
  • service/defaultcomponents/components.go — registers awscloudwatchlogsprovisionerextension
  • go.mod — adds dependency + replace directive pointing at merged fork commit

What these components do

container_log_parser — parses CRI/Docker container log format (strips timestamp, stream, flags envelope from raw log lines). Code lives in
otel-contrib#533 (merged).

awscloudwatchlogsprovisioner — lazily creates CloudWatch log groups/streams on first request via the HTTP auth chain. Already merged in
otel-contrib#511. No new extension code in this PR — just
registration.

Why this PR exists

Without these registrations, the agent fails at config load time with "unknown operator/extension type" when the helm chart references them.

Dependencies

PR Status
otel-contrib#533 Merged
otel-contrib#511 Merged
helm-charts#310 Open — pipeline config

@louisall louisall requested a review from a team as a code owner May 11, 2026 12:06
@louisall louisall marked this pull request as draft May 11, 2026 12:13
@miconeilaws miconeilaws force-pushed the feature/otelify-ci-logs branch 3 times, most recently from f64e46a to fbf7257 Compare May 14, 2026 09:35
@miconeilaws miconeilaws marked this pull request as ready for review May 14, 2026 09:39
@miconeilaws miconeilaws changed the title Add OTEL CI logs agent components + SafeChannel nil-receiver fix Add OTEL CI logs agent components May 14, 2026
miconeilaws added a commit to aws-observability/helm-charts that referenced this pull request May 14, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
@miconeilaws miconeilaws force-pushed the feature/otelify-ci-logs branch from fbf7257 to 75bf0cd Compare May 15, 2026 07:49
miconeilaws added a commit to aws-observability/helm-charts that referenced this pull request May 15, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
@miconeilaws miconeilaws force-pushed the feature/otelify-ci-logs branch from 75bf0cd to 066a76e Compare May 15, 2026 13:25
miconeilaws added a commit to aws-observability/helm-charts that referenced this pull request May 15, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
if factories.Extensions, err = otelcol.MakeFactoryMap[extension.Factory](
agenthealth.NewFactory(),
awsproxy.NewFactory(),
awscloudwatchlogsprovisionerextension.NewFactory(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

niti: alphabetical order for this file and the test one

Comment thread go.mod Outdated
// For clear resource attributes after copy functionality https://github.com/amazon-contributing/opentelemetry-collector-contrib/pull/148
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.0.0-20260511193117-05aea4e97d48
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20260511193117-05aea4e97d48
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza v0.0.0-20260514092325-6fd7b2eb672e
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

once contrib is merged in, lets update this and all the contrib components to that same new commit.

Comment thread go.mod Outdated

require github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1
require (
github.com/open-telemetry/opentelemetry-collector-contrib/extension/awscloudwatchlogsprovisionerextension v0.0.0-00010101000000-000000000000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of having this here, mind modelling it similar to the awscontainerinsightskueuereceiver above for now?

@miconeilaws miconeilaws force-pushed the feature/otelify-ci-logs branch 2 times, most recently from a5d9c8d to bc090bb Compare May 15, 2026 16:11
Comment thread go.mod Outdated

require github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1
require (
github.com/open-telemetry/opentelemetry-collector-contrib/extension/awscloudwatchlogsprovisionerextension v0.124.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: could move this to require block above

@miconeilaws miconeilaws force-pushed the feature/otelify-ci-logs branch from bc090bb to e4043b5 Compare May 15, 2026 16:34
sky333999
sky333999 previously approved these changes May 15, 2026
…ovisioner extension

Register container_log_parser stanza operator (plugins.go) and
awscloudwatchlogsprovisioner extension in the agent's default components
for OTEL Container Insights log pipelines.

The provisioner extension (from otel-contrib PR #511) lazily creates
CloudWatch log groups/streams on first request via the HTTP auth chain.
Replaces the earlier cwlogsprovision approach.

Depends on:
- amazon-contributing/opentelemetry-collector-contrib#533 (container_log_parser)
- amazon-contributing/opentelemetry-collector-contrib#511 (awscloudwatchlogsprovisioner)
- aws-observability/helm-charts#310 (pipeline config)
@sky333999 sky333999 added the ready for testing Indicates this PR is ready for integration tests to run label May 15, 2026
@sky333999 sky333999 merged commit 7b9fe6f into main May 15, 2026
322 of 338 checks passed
@sky333999 sky333999 deleted the feature/otelify-ci-logs branch May 15, 2026 19:11
jj22ee pushed a commit to jj22ee/amazon-cloudwatch-agent that referenced this pull request May 16, 2026
Co-authored-by: Michael O'Neill <miconeil@amazon.com>
louisall pushed a commit to aws-observability/helm-charts that referenced this pull request May 20, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
louisall pushed a commit to aws-observability/helm-charts that referenced this pull request May 20, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
louisall pushed a commit to aws-observability/helm-charts that referenced this pull request May 20, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
louisall pushed a commit to aws-observability/helm-charts that referenced this pull request May 20, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
louisall pushed a commit to aws-observability/helm-charts that referenced this pull request May 20, 2026
…host)

Adds opt-in OTEL log collection to the existing CloudWatch Agent DaemonSet.
No new K8s resources created — logs config is injected into the agent's
otelConfig when otelContainerInsights.logs=true.

Pipelines:
  - logs/cw_k8s_ci_v0_app: container logs via filelog + container_log_parser
  - logs/cw_k8s_ci_v0_node: host OS logs (/var/log/messages, dmesg, secure)

Key design decisions:
  - Shares k8sattributes processor instances with metrics (one API watch)
  - cwlogsprovision extension pre-creates log groups/streams at startup
  - Log groups: /aws/otel/containerinsights/<cluster>/{application,host}
  - Simple config: enabled=false ignores everything under otelContainerInsights
  - No cross-flag validation with FluentBit (deferred to v7.0.0)
  - Dataplane logs deferred (no journald/aws-node collection)

Depends on:
  - amazon-contributing/opentelemetry-collector-contrib#533
  - aws/amazon-cloudwatch-agent#2113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for testing Indicates this PR is ready for integration tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants