Skip to content

feat(otel): Add OTLP logs integration test framework#697

Open
miconeilaws wants to merge 1 commit into
mainfrom
feat/otel-logs-integration-tests
Open

feat(otel): Add OTLP logs integration test framework#697
miconeilaws wants to merge 1 commit into
mainfrom
feat/otel-logs-integration-tests

Conversation

@miconeilaws
Copy link
Copy Markdown
Collaborator

@miconeilaws miconeilaws commented May 15, 2026

Add integration tests for OTEL Container Insights log pipelines alongside the existing metrics tests.

Components:

  • util/otelmetrics/expectations.go: Shared attribute expectations (NodeResourceAttrs, PodResourceAttrs, AppLogResourceAttrs, etc.) reusable by both metrics and logs tests - will update the metrics tests the share these in a follow-up
  • util/otellogs/: CW Logs Insights client with query cache and OTLP JSON parser for the stored log structure
  • test/otel/standard/logs_*_test.go: Integration tests validating resource attributes, scope attributes, cross-telemetry consistency

Tests verify that logs share the same resource attributes as metrics (host logs match node_exporter, app logs match cadvisor), ensuring cross-signal correlation works correctly.

All green:

  --- PASS: TestAppLogsExist (3.02s)
  --- PASS: TestAppLogsResourceAttrs (0.00s)
      --- PASS: TestAppLogsResourceAttrs/k8s.cluster.name
      --- PASS: TestAppLogsResourceAttrs/k8s.node.name
      --- PASS: TestAppLogsResourceAttrs/k8s.node.uid
      --- PASS: TestAppLogsResourceAttrs/host.id
      --- PASS: TestAppLogsResourceAttrs/host.type
      --- PASS: TestAppLogsResourceAttrs/host.name
      --- PASS: TestAppLogsResourceAttrs/host.image.id
      --- PASS: TestAppLogsResourceAttrs/cloud.provider
      --- PASS: TestAppLogsResourceAttrs/cloud.platform
      --- PASS: TestAppLogsResourceAttrs/cloud.region
      --- PASS: TestAppLogsResourceAttrs/cloud.availability_zone
      --- PASS: TestAppLogsResourceAttrs/cloud.account.id
      --- PASS: TestAppLogsResourceAttrs/cloud.resource_id
      --- PASS: TestAppLogsResourceAttrs/k8s.pod.name
      --- PASS: TestAppLogsResourceAttrs/k8s.namespace.name
      --- PASS: TestAppLogsResourceAttrs/k8s.pod.uid
      --- PASS: TestAppLogsResourceAttrs/k8s.container.name
      --- PASS: TestAppLogsResourceAttrs/k8s.workload.name
      --- PASS: TestAppLogsResourceAttrs/k8s.workload.type
      --- PASS: TestAppLogsResourceAttrs/service.name
  --- PASS: TestAppLogsScopeAttrs (0.00s)
      --- PASS: TestAppLogsScopeAttrs/cloudwatch.source
      --- PASS: TestAppLogsScopeAttrs/cloudwatch.solution
      --- PASS: TestAppLogsScopeAttrs/cloudwatch.pipeline
  --- PASS: TestAppLogsClusterIdentity (0.00s)
  --- PASS: TestAppLogsCloudProvider (0.00s)
  --- PASS: TestAppLogsHostType (0.00s)
  --- PASS: TestAppLogsBody (0.00s)
  --- PASS: TestAppLogsRecordAttrs (0.00s)
      --- PASS: TestAppLogsRecordAttrs/log.iostream
      --- PASS: TestAppLogsRecordAttrs/log.file.path
  --- PASS: TestAppLogsWorkloadDerivation (0.00s)
  --- PASS: TestCrossTelemetryHostID (0.69s)
  --- PASS: TestCrossTelemetryCloudResourceID (0.00s)
  PASS
  ok    4.280s

@miconeilaws miconeilaws requested a review from a team as a code owner May 15, 2026 08:23
Add integration tests for OTEL Container Insights log pipelines
(application and host) alongside the existing metrics tests.

Components:
- util/otelmetrics/expectations.go: Shared attribute expectations
  (NodeResourceAttrs, PodResourceAttrs, AppLogResourceAttrs, etc.)
  reusable by both metrics and logs tests
- util/otellogs/: CW Logs Insights client with query cache and
  OTLP JSON parser for the stored log structure
- test/otel/standard/logs_*_test.go: Integration tests validating
  resource attributes, scope attributes, cross-telemetry consistency

Tests verify that logs share the same resource attributes as metrics
(host logs match node_exporter, app logs match cadvisor), ensuring
cross-signal correlation works correctly.
@louisall louisall force-pushed the feat/otel-logs-integration-tests branch from 1b4f50c to 6937feb Compare May 20, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant