Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"region": "us-west-2"
},
"opentelemetry": {
"cluster_name": "my-cluster",
"collect": {
"prometheus": {
"cluster_name": "my-cluster"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
}
},
"opentelemetry": {
"cluster_name": "TestCluster",
"collect": {
"host_metrics": {
"metrics_collection_interval": 60
"collection_interval": 60
},
"container_insights": {
"cluster_name": "TestCluster",
"collection_interval": 30
},
"database_insights": {
Expand Down
19 changes: 7 additions & 12 deletions translator/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,10 @@
"opentelemetryDefinition": {
"type": "object",
"properties": {
"cluster_name": {
"description": "The name of the K8s cluster. Applied to all telemetry collected under opentelemetry.",
"type": "string"
},
"collect": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1840,7 +1844,7 @@
"host_metrics": {
"type": "object",
"properties": {
"metrics_collection_interval": {
"collection_interval": {
"description": "How often the metrics defined will be collected",
"$ref": "#/definitions/timeIntervalDefinition"
}
Expand All @@ -1850,16 +1854,12 @@
"container_insights": {
"type": "object",
"properties": {
"cluster_name": {
"description": "The name of the EKS cluster",
"type": "string"
},
"collection_interval": {
"description": "How often metrics are collected",
"$ref": "#/definitions/timeIntervalDefinition"
},
"mode": {
"description": "Pipeline mode: node (daemonset), cluster (deployment). If omitted, falls back to CWAGENT_ROLE env var",
"role": {
"description": "Pipeline role: node (daemonset), cluster (deployment). If omitted, falls back to CWAGENT_ROLE env var",
"type": "string",
"enum": ["node", "cluster"]
},
Expand All @@ -1874,7 +1874,6 @@
"additionalProperties": false
}
},
"required": ["cluster_name"],
"additionalProperties": false
},
"prometheus": {
Expand All @@ -1883,10 +1882,6 @@
"config_path": {
"description": "Path to the Prometheus scrape configuration file",
"type": "string"
},
"cluster_name": {
"description": "The name of the EKS cluster",
"type": "string"
}
},
"required": ["config_path"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@
"endpoint_override": "https://x-ray-endpoint.us-west-2.amazonaws.com"
},
"opentelemetry": {
"cluster_name": "TestCluster",
"collect": {
"host_metrics": {
"metrics_collection_interval": 60
"collection_interval": 60
},
"database_insights": {
"postgresql": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ processors:
ec2_instance_tag_keys:
- AutoScalingGroupName
ec2_metadata_tags:
- ImageId
- InstanceId
- InstanceType
- ImageId
imds_retries: 1
middleware: agenthealth/statuscode
refresh_tags_interval: 0s
Expand Down Expand Up @@ -1027,6 +1027,24 @@ processors:
- set(scope.attributes["cloudwatch.source"], "cloudwatch-agent")
- set(scope.attributes["cloudwatch.solution"], "otel-prometheus")
trace_statements: []
transform/set_cluster_name:
error_mode: ignore
flatten_data: false
log_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
metric_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
trace_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
receivers:
awsxray:
endpoint: 0.0.0.0:2000
Expand Down Expand Up @@ -1562,6 +1580,7 @@ service:
- otlphttp/logs
processors:
- resourcedetection/opentelemetry
- transform/set_cluster_name
- transform/identity
- transform/logs_routing
- attributestocontext/opentelemetry
Expand Down Expand Up @@ -1596,13 +1615,13 @@ service:
- ec2tagger
- awsentity/resource
receivers:
- telegraf_cpu
- telegraf_netstat
- telegraf_mem
- telegraf_procstat/1917393364
- telegraf_swap
- telegraf_processes
- telegraf_disk
- telegraf_processes
- telegraf_mem
- telegraf_swap
- telegraf_netstat
- telegraf_cpu
metrics/host_metrics:
exporters:
- forward/opentelemetry
Expand All @@ -1617,8 +1636,8 @@ service:
- ec2tagger
- awsentity/service/telegraf
receivers:
- telegraf_statsd
- telegraf_socket_listener
- telegraf_statsd
metrics/hostDeltaMetrics:
exporters:
- awscloudwatch
Expand All @@ -1627,13 +1646,14 @@ service:
- ec2tagger
- awsentity/resource
receivers:
- telegraf_diskio
- telegraf_net
- telegraf_diskio
metrics/opentelemetry:
exporters:
- otlphttp/metrics
processors:
- resourcedetection/opentelemetry
- transform/set_cluster_name
- transform/identity
- batch/opentelemetry_metrics
receivers:
Expand All @@ -1658,6 +1678,7 @@ service:
- otlphttp/traces
processors:
- resourcedetection/opentelemetry
- transform/set_cluster_name
- transform/identity
- batch/opentelemetry_traces
receivers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@
"endpoint_override": "https://x-ray-endpoint.us-west-2.amazonaws.com"
},
"opentelemetry": {
"cluster_name": "TestCluster",
"collect": {
"host_metrics": {
"metrics_collection_interval": 60
"collection_interval": 60
},
"container_insights": {
"cluster_name": "TestCluster",
"collection_interval": 30
},
"database_insights": {
Expand All @@ -147,8 +147,7 @@
]
},
"prometheus": {
"config_path": "./sampleConfig/opentelemetry/prometheus_otel_scrape_config.yaml",
"cluster_name": "TestCluster"
"config_path": "./sampleConfig/opentelemetry/prometheus_otel_scrape_config.yaml"
},
"otlp": {
"grpc_endpoint": "127.0.0.1:4327",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1561,13 +1561,21 @@ processors:
transform/set_cluster_name:
error_mode: ignore
flatten_data: false
log_statements: []
log_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
metric_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
trace_statements: []
trace_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
receivers:
awsefareceiver/cw_k8s_ci_v0:
collection_interval: 30s
Expand Down Expand Up @@ -2260,6 +2268,7 @@ service:
processors:
- resourcedetection/opentelemetry
- k8sattributes/opentelemetry
- transform/set_cluster_name
- transform/identity
- transform/logs_routing
- attributestocontext/opentelemetry
Expand Down Expand Up @@ -2462,13 +2471,13 @@ service:
- ec2tagger
- awsentity/resource
receivers:
- telegraf_cpu
- telegraf_processes
- telegraf_netstat
- telegraf_swap
- telegraf_procstat/1917393364
- telegraf_mem
- telegraf_netstat
- telegraf_disk
- telegraf_mem
- telegraf_processes
- telegraf_cpu
metrics/host_metrics:
exporters:
- forward/opentelemetry
Expand All @@ -2483,8 +2492,8 @@ service:
- ec2tagger
- awsentity/service/telegraf
receivers:
- telegraf_statsd
- telegraf_socket_listener
- telegraf_statsd
metrics/hostDeltaMetrics:
exporters:
- awscloudwatch
Expand All @@ -2493,14 +2502,15 @@ service:
- ec2tagger
- awsentity/resource
receivers:
- telegraf_net
- telegraf_diskio
- telegraf_net
metrics/opentelemetry:
exporters:
- otlphttp/metrics
processors:
- resourcedetection/opentelemetry
- k8sattributes/opentelemetry
- transform/set_cluster_name
- transform/identity
- batch/opentelemetry_metrics
receivers:
Expand All @@ -2510,7 +2520,6 @@ service:
- forward/opentelemetry
processors:
- transform/prometheus_scope
- transform/set_cluster_name
receivers:
- prometheus/opentelemetry
metrics/otlp:
Expand All @@ -2527,6 +2536,7 @@ service:
processors:
- resourcedetection/opentelemetry
- k8sattributes/opentelemetry
- transform/set_cluster_name
- transform/identity
- batch/opentelemetry_traces
receivers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"region": "us-east-1"
},
"opentelemetry": {
"cluster_name": "TestCluster",
"collect": {
"container_insights": {
"cluster_name": "TestCluster",
"collection_interval": 30
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,24 @@ processors:
- delete_key(resource.attributes, "app.kubernetes.io/instance")
- delete_key(resource.attributes, "app.kubernetes.io/name")
- delete_key(resource.attributes, "app.kubernetes.io/version")
transform/set_cluster_name:
error_mode: ignore
flatten_data: false
log_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
metric_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
trace_statements:
- context: resource
error_mode: ignore
statements:
- set(resource.attributes["k8s.cluster.name"], "TestCluster")
receivers:
awsefareceiver/cw_k8s_ci_v0:
collection_interval: 30s
Expand Down Expand Up @@ -1228,6 +1246,7 @@ service:
processors:
- resourcedetection/opentelemetry
- k8sattributes/opentelemetry
- transform/set_cluster_name
- transform/identity
- batch/opentelemetry_metrics
receivers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opentelemetry": {
"collect": {
"host_metrics": {
"metrics_collection_interval": 10
"collection_interval": 10
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"opentelemetry": {
"collect": {
"host_metrics": {
"metrics_collection_interval": 10
"collection_interval": 10
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"opentelemetry": {
"collect": {
"host_metrics": {
"metrics_collection_interval": 10
"collection_interval": 10
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opentelemetry": {
"collect": {
"host_metrics": {
"metrics_collection_interval": 10
"collection_interval": 10
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"region": "us-east-1"
},
"opentelemetry": {
"cluster_name": "TestCluster",
"collect": {
"prometheus": {
"config_path": "./sampleConfig/opentelemetry/prometheus_otel_scrape_config.yaml"
Expand Down
Loading
Loading