Skip to content

Commit 8a9fb17

Browse files
committed
[ecs-ec2] Use new profile collection in by default
Regenerated the example configs as well. Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
1 parent 3693c43 commit 8a9fb17

5 files changed

Lines changed: 199 additions & 90 deletions

File tree

otel-ecs-ec2/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### v0.0.37 / 2026-06-30
4+
5+
- [Breaking] eBPF profiler profiles are now sent through the node-local agent `profilesCollection` pipeline enrichment and Coralogix export. Previously, the profiler sent profiles directly to Coralogix, so installations that customize the profiler or agent profile pipeline should update their configuration to route profiles through the agent.
6+
37
### v0.0.36 / 2026-06-30
48

59
- [Change] Update Helm dependency `opentelemetry-agent` to chart version `0.134.2`.

otel-ecs-ec2/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: ecs-ec2-integration
33
description: ECS-EC2 OpenTelemetry Integration
4-
version: 0.0.36
4+
version: 0.0.37
55
keywords:
66
- OpenTelemetry Collector
77
- OpenTelemetry Agent

otel-ecs-ec2/examples/otel-config-ebpf.yaml

Lines changed: 95 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,38 @@ processors:
221221
traces:
222222
span:
223223
- span.attributes["db.system"] == nil
224+
k8sattributes/profiles:
225+
extract:
226+
labels:
227+
- from: pod
228+
key: app.kubernetes.io/name
229+
tag_name: k8s.label.name
230+
- from: pod
231+
key: app.kubernetes.io/instance
232+
tag_name: k8s.label.instance
233+
metadata:
234+
- k8s.namespace.name
235+
- k8s.replicaset.name
236+
- k8s.statefulset.name
237+
- k8s.daemonset.name
238+
- k8s.deployment.name
239+
- k8s.cronjob.name
240+
- k8s.job.name
241+
- k8s.pod.name
242+
- k8s.node.name
243+
- container.id
244+
- k8s.container.name
245+
- service.version
246+
otel_annotations: true
247+
filter:
248+
node_from_env_var: K8S_NODE_NAME
249+
passthrough: false
250+
pod_association:
251+
- sources:
252+
- from: resource_attribute
253+
name: container.id
254+
- sources:
255+
- from: connection
224256
memory_limiter:
225257
check_interval: 5s
226258
limit_percentage: 80
@@ -307,6 +339,50 @@ processors:
307339
- context: resource
308340
statements:
309341
- keep_keys(resource.attributes, [""])
342+
transform/profiles:
343+
profile_statements:
344+
- set(resource.attributes["service.name"], resource.attributes["k8s.label.instance"])
345+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.label.instance"]
346+
!= nil
347+
- set(resource.attributes["service.name"], resource.attributes["k8s.label.name"])
348+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.label.name"]
349+
!= nil
350+
- set(resource.attributes["service.name"], resource.attributes["k8s.deployment.name"])
351+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.deployment.name"]
352+
!= nil
353+
- set(resource.attributes["service.name"], resource.attributes["k8s.replicaset.name"])
354+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.replicaset.name"]
355+
!= nil
356+
- set(resource.attributes["service.name"], resource.attributes["k8s.statefulset.name"])
357+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.statefulset.name"]
358+
!= nil
359+
- set(resource.attributes["service.name"], resource.attributes["k8s.daemonset.name"])
360+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.daemonset.name"]
361+
!= nil
362+
- set(resource.attributes["service.name"], resource.attributes["k8s.cronjob.name"])
363+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.cronjob.name"]
364+
!= nil
365+
- set(resource.attributes["service.name"], resource.attributes["k8s.job.name"])
366+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.job.name"]
367+
!= nil
368+
- set(resource.attributes["service.name"], resource.attributes["k8s.pod.name"])
369+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.pod.name"]
370+
!= nil
371+
- set(resource.attributes["service.name"], resource.attributes["k8s.container.name"])
372+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.container.name"]
373+
!= nil
374+
transform/profiles-ecs-service-name:
375+
profile_statements:
376+
- context: resource
377+
statements:
378+
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.task.definition.family"])
379+
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
380+
== "") and resource.attributes["aws.ecs.task.definition.family"] != nil and
381+
resource.attributes["aws.ecs.task.definition.family"] != ""
382+
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.container.name"])
383+
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
384+
== "") and resource.attributes["aws.ecs.container.name"] != nil and resource.attributes["aws.ecs.container.name"]
385+
!= ""
310386
transform/prometheus:
311387
error_mode: ignore
312388
metric_statements:
@@ -692,6 +768,20 @@ service:
692768
- batch
693769
receivers:
694770
- spanmetrics/db_compact
771+
profiles:
772+
exporters:
773+
- coralogix
774+
processors:
775+
- memory_limiter
776+
- resourcedetection/region
777+
- resourcedetection/env
778+
- ecsattributes/container-logs
779+
- k8sattributes/profiles
780+
- resource/metadata
781+
- transform/profiles
782+
- transform/profiles-ecs-service-name
783+
receivers:
784+
- otlp
695785
traces:
696786
exporters:
697787
- spanmetrics
@@ -759,48 +849,10 @@ service:
759849

760850
---
761851
exporters:
762-
coralogix:
763-
application_name: otel
764-
application_name_attributes:
765-
- aws.ecs.cluster.name
766-
- aws.ecs.task.definition.family
767-
domain: coralogix.com
768-
domain_settings:
769-
keepalive:
770-
enabled: true
771-
permit_without_stream: false
772-
time: 30s
773-
timeout: 10s
774-
logs:
775-
headers:
776-
X-Coralogix-Distribution: ecs-ec2-integration/0.0.36
777-
metrics:
778-
headers:
779-
X-Coralogix-Distribution: ecs-ec2-integration/0.0.36
780-
private_key: ${env:CORALOGIX_PRIVATE_KEY}
781-
profiles:
782-
headers:
783-
X-Coralogix-Distribution: ecs-ec2-integration/0.0.36
784-
x-coralogix-ingress: otlp/v1.10.0
785-
sending_queue:
786-
batch:
787-
flush_timeout: 250ms
788-
max_size: 2097152
789-
min_size: 1048576
790-
sizer: bytes
791-
enabled: true
792-
num_consumers: 20
793-
queue_size: 209715200
794-
sizer: bytes
795-
subsystem_name: integration
796-
subsystem_name_attributes:
797-
- aws.ecs.container.name
798-
- aws.ecs.docker.name
799-
- docker.name
800-
timeout: 30s
801-
traces:
802-
headers:
803-
X-Coralogix-Distribution: ecs-ec2-integration/0.0.36
852+
otlp:
853+
endpoint: localhost:4317
854+
tls:
855+
insecure: true
804856
extensions:
805857
health_check:
806858
endpoint: ${env:MY_POD_IP}:13133
@@ -818,11 +870,6 @@ extensions:
818870
Authorization: Bearer ${env:CORALOGIX_PRIVATE_KEY}
819871
polling_interval: 2m
820872
processors:
821-
ecsattributes/container-logs:
822-
container_id:
823-
sources:
824-
- log.file.path
825-
- container.id
826873
memory_limiter:
827874
check_interval: 5s
828875
limit_percentage: 80
@@ -835,33 +882,6 @@ processors:
835882
- action: upsert
836883
key: cx.otel_integration.name
837884
value: coralogix-integration-ecs-ec2
838-
resourcedetection/env:
839-
detectors:
840-
- system
841-
- env
842-
override: false
843-
system:
844-
resource_attributes:
845-
host.id:
846-
enabled: true
847-
timeout: 2s
848-
resourcedetection/region:
849-
detectors:
850-
- ec2
851-
override: true
852-
timeout: 2s
853-
transform/profiles-ecs-service-name:
854-
profile_statements:
855-
- context: resource
856-
statements:
857-
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.task.definition.family"])
858-
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
859-
== "") and resource.attributes["aws.ecs.task.definition.family"] != nil and
860-
resource.attributes["aws.ecs.task.definition.family"] != ""
861-
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.container.name"])
862-
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
863-
== "") and resource.attributes["aws.ecs.container.name"] != nil and resource.attributes["aws.ecs.container.name"]
864-
!= ""
865885
receivers:
866886
profiling:
867887
off_cpu_threshold: 0
@@ -878,13 +898,9 @@ service:
878898
pipelines:
879899
profiles:
880900
exporters:
881-
- coralogix
901+
- otlp
882902
processors:
883903
- memory_limiter
884-
- resourcedetection/region
885-
- resourcedetection/env
886-
- ecsattributes/container-logs
887-
- transform/profiles-ecs-service-name
888904
receivers:
889905
- profiling
890906
telemetry:

otel-ecs-ec2/examples/otel-config.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,38 @@ processors:
221221
traces:
222222
span:
223223
- span.attributes["db.system"] == nil
224+
k8sattributes/profiles:
225+
extract:
226+
labels:
227+
- from: pod
228+
key: app.kubernetes.io/name
229+
tag_name: k8s.label.name
230+
- from: pod
231+
key: app.kubernetes.io/instance
232+
tag_name: k8s.label.instance
233+
metadata:
234+
- k8s.namespace.name
235+
- k8s.replicaset.name
236+
- k8s.statefulset.name
237+
- k8s.daemonset.name
238+
- k8s.deployment.name
239+
- k8s.cronjob.name
240+
- k8s.job.name
241+
- k8s.pod.name
242+
- k8s.node.name
243+
- container.id
244+
- k8s.container.name
245+
- service.version
246+
otel_annotations: true
247+
filter:
248+
node_from_env_var: K8S_NODE_NAME
249+
passthrough: false
250+
pod_association:
251+
- sources:
252+
- from: resource_attribute
253+
name: container.id
254+
- sources:
255+
- from: connection
224256
memory_limiter:
225257
check_interval: 5s
226258
limit_percentage: 80
@@ -307,6 +339,50 @@ processors:
307339
- context: resource
308340
statements:
309341
- keep_keys(resource.attributes, [""])
342+
transform/profiles:
343+
profile_statements:
344+
- set(resource.attributes["service.name"], resource.attributes["k8s.label.instance"])
345+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.label.instance"]
346+
!= nil
347+
- set(resource.attributes["service.name"], resource.attributes["k8s.label.name"])
348+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.label.name"]
349+
!= nil
350+
- set(resource.attributes["service.name"], resource.attributes["k8s.deployment.name"])
351+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.deployment.name"]
352+
!= nil
353+
- set(resource.attributes["service.name"], resource.attributes["k8s.replicaset.name"])
354+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.replicaset.name"]
355+
!= nil
356+
- set(resource.attributes["service.name"], resource.attributes["k8s.statefulset.name"])
357+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.statefulset.name"]
358+
!= nil
359+
- set(resource.attributes["service.name"], resource.attributes["k8s.daemonset.name"])
360+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.daemonset.name"]
361+
!= nil
362+
- set(resource.attributes["service.name"], resource.attributes["k8s.cronjob.name"])
363+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.cronjob.name"]
364+
!= nil
365+
- set(resource.attributes["service.name"], resource.attributes["k8s.job.name"])
366+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.job.name"]
367+
!= nil
368+
- set(resource.attributes["service.name"], resource.attributes["k8s.pod.name"])
369+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.pod.name"]
370+
!= nil
371+
- set(resource.attributes["service.name"], resource.attributes["k8s.container.name"])
372+
where resource.attributes["service.name"] == nil and resource.attributes["k8s.container.name"]
373+
!= nil
374+
transform/profiles-ecs-service-name:
375+
profile_statements:
376+
- context: resource
377+
statements:
378+
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.task.definition.family"])
379+
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
380+
== "") and resource.attributes["aws.ecs.task.definition.family"] != nil and
381+
resource.attributes["aws.ecs.task.definition.family"] != ""
382+
- set(resource.attributes["service.name"], resource.attributes["aws.ecs.container.name"])
383+
where (resource.attributes["service.name"] == nil or resource.attributes["service.name"]
384+
== "") and resource.attributes["aws.ecs.container.name"] != nil and resource.attributes["aws.ecs.container.name"]
385+
!= ""
310386
transform/prometheus:
311387
error_mode: ignore
312388
metric_statements:
@@ -692,6 +768,20 @@ service:
692768
- batch
693769
receivers:
694770
- spanmetrics/db_compact
771+
profiles:
772+
exporters:
773+
- coralogix
774+
processors:
775+
- memory_limiter
776+
- resourcedetection/region
777+
- resourcedetection/env
778+
- ecsattributes/container-logs
779+
- k8sattributes/profiles
780+
- resource/metadata
781+
- transform/profiles
782+
- transform/profiles-ecs-service-name
783+
receivers:
784+
- otlp
695785
traces:
696786
exporters:
697787
- spanmetrics

otel-ecs-ec2/values.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ opentelemetry-agent:
7171

7272
ecsAttributesContainerLogs:
7373
enabled: true
74+
profilesServiceName:
75+
enabled: true
7476
ecsLogsCollection:
7577
enabled: true
7678
forceFlushPeriod: "0"
@@ -265,6 +267,8 @@ opentelemetry-agent:
265267
# Adds the OTLP receiver to the traces, metrics, and logs pipelines.
266268
otlpReceiver:
267269
enabled: true
270+
profilesCollection:
271+
enabled: true
268272
# Configures the collector to receive StatsD metrics.
269273
# Adds the statsd receiver to the metrics pipeline.
270274
statsdReceiver:
@@ -360,20 +364,15 @@ opentelemetry-ebpf-profiler:
360364
otlpReceiver:
361365
enabled: false
362366

363-
ecsAttributesContainerLogs:
364-
enabled: true
365-
profilesServiceName:
366-
enabled: true
367-
368367
reduceResourceAttributes:
369368
enabled: false
370369

371-
coralogixExporter:
372-
enabled: true
373-
privateKey: ${env:CORALOGIX_PRIVATE_KEY}
374-
375-
resourceDetection:
370+
otlpExporter:
376371
enabled: true
372+
endpoint: localhost:4317
373+
pipelines: ["profiles"]
374+
tls:
375+
insecure: true
377376

378377
config:
379378
exporters:

0 commit comments

Comments
 (0)