Skip to content

Commit

Permalink
fix for: logs pipeline in OpenTelemetryCollector references undefined…
Browse files Browse the repository at this point in the history
… receiver and exporter if adotcontainerlogs.pattern.enabled is not defined in cdk.json
  • Loading branch information
freschri committed Jun 13, 2024
1 parent be840c3 commit 8631bfc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/common/resources/otel-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1879,10 +1879,12 @@ spec:
metrics:
receivers: [prometheus]
exporters: [logging, prometheusremotewrite]
{{ start enableAdotContainerLogsPipeline }}
logs:
receivers: [filelog]
processors: [batch,k8sattributes]
exporters: [awscloudwatchlogs]
{{ stop enableAdotContainerLogsPipeline }}
{{ start enableAdotMetricsCollectionTelemetry }}
telemetry:
metrics:
Expand Down
6 changes: 6 additions & 0 deletions lib/single-new-eks-opensource-observability-pattern/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ export default class SingleNewEksOpenSourceobservabilityPattern {
"{{ stop enableAdotContainerLogsExporter }}",
jsonStringnew.context["adotcontainerlogs.pattern.enabled"]
);
doc = utils.changeTextBetweenTokens(
doc,
"{{ start enableAdotContainerLogsPipeline }}",
"{{ stop enableAdotContainerLogsPipeline }}",
jsonStringnew.context["adotcontainerlogs.pattern.enabled"]
);
doc = utils.changeTextBetweenTokens(
doc,
"{{ start kubecostJob }}",
Expand Down

0 comments on commit 8631bfc

Please sign in to comment.