@@ -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---
761851exporters :
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
804856extensions :
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
820872processors :
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- != ""
865885receivers :
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 :
0 commit comments