mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
impr: Tracing to AWS X-Ray config options (#110)
* Remove duplicate exposed ports in ADOT 0.61+ * Sync ADOT collector to ADOT addon version * Bump helm version * Provide configuration options for tracing
This commit is contained in:
@@ -77,6 +77,7 @@ This module is inspired from the open source [kube-prometheus-stack](https://git
|
||||
| <a name="input_ne_config"></a> [ne\_config](#input\_ne\_config) | Node exporter configuration | <pre>object({<br> create_namespace = bool<br> k8s_namespace = string<br> helm_chart_name = string<br> helm_chart_version = string<br> helm_release_name = string<br> helm_repo_url = string<br> helm_settings = map(string)<br> helm_values = map(any)<br><br> scrape_interval = string<br> scrape_timeout = string<br> })</pre> | <pre>{<br> "create_namespace": true,<br> "helm_chart_name": "prometheus-node-exporter",<br> "helm_chart_version": "2.0.3",<br> "helm_release_name": "prometheus-node-exporter",<br> "helm_repo_url": "https://prometheus-community.github.io/helm-charts",<br> "helm_settings": {},<br> "helm_values": {},<br> "k8s_namespace": "prometheus-node-exporter",<br> "scrape_interval": "60s",<br> "scrape_timeout": "60s"<br>}</pre> | no |
|
||||
| <a name="input_prometheus_config"></a> [prometheus\_config](#input\_prometheus\_config) | Controls default values such as scrape interval, timeouts and ports globally | <pre>object({<br> global_scrape_interval = string<br> global_scrape_timeout = string<br> })</pre> | <pre>{<br> "global_scrape_interval": "60s",<br> "global_scrape_timeout": "15s"<br>}</pre> | no |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit`,`XYZ`) | `map(string)` | `{}` | no |
|
||||
| <a name="input_tracing_config"></a> [tracing\_config](#input\_tracing\_config) | Configuration object for traces collection to AWS X-Ray | <pre>object({<br> otlp_grpc_endpoint = string<br> otlp_http_endpoint = string<br> send_batch_size = number<br> timeout = string<br> })</pre> | <pre>{<br> "otlp_grpc_endpoint": "0.0.0.0:4317",<br> "otlp_http_endpoint": "0.0.0.0:4318",<br> "send_batch_size": 50,<br> "timeout": "30s"<br>}</pre> | no |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ module "helm_addon" {
|
||||
{
|
||||
name = local.name
|
||||
chart = "${path.module}/otel-config"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0"
|
||||
namespace = local.namespace
|
||||
description = "ADOT helm Chart deployment configuration"
|
||||
},
|
||||
@@ -79,11 +79,19 @@ module "helm_addon" {
|
||||
},
|
||||
{
|
||||
name = "otlpHttpEndpoint"
|
||||
value = "0.0.0.0:4318"
|
||||
value = var.tracing_config.otlp_http_endpoint
|
||||
},
|
||||
{
|
||||
name = "otlpGrpcEndpoint"
|
||||
value = "0.0.0.0:4317"
|
||||
value = var.tracing_config.otlp_grpc_endpoint
|
||||
},
|
||||
{
|
||||
name = "tracingTimeout"
|
||||
value = var.tracing_config.timeout
|
||||
},
|
||||
{
|
||||
name = "tracingSendBatchSize"
|
||||
value = var.tracing_config.send_batch_size
|
||||
},
|
||||
{
|
||||
name = "enableCustomMetrics"
|
||||
|
||||
@@ -3,15 +3,9 @@ kind: OpenTelemetryCollector
|
||||
metadata:
|
||||
name: adot
|
||||
spec:
|
||||
image: public.ecr.aws/aws-observability/aws-otel-collector:v0.22.1
|
||||
{{ if .Values.enableTracing }}
|
||||
mode: daemonset
|
||||
hostNetwork: true
|
||||
ports:
|
||||
- port: 4317
|
||||
name: "otlpgrpc"
|
||||
- port: 4318
|
||||
name: "oltphttp"
|
||||
{{ else }}
|
||||
mode: deployment
|
||||
{{ end }}
|
||||
@@ -1735,8 +1729,8 @@ spec:
|
||||
send_batch_size: 500
|
||||
{{ if .Values.enableTracing }}
|
||||
batch/traces:
|
||||
timeout: 10s
|
||||
send_batch_size: 50
|
||||
timeout: {{ .Values.tracingTimeout }}
|
||||
send_batch_size: {{ .Values.tracingBatchSize }}
|
||||
{{ end }}
|
||||
service:
|
||||
extensions: [pprof, zpages, health_check, sigv4auth]
|
||||
|
||||
@@ -8,6 +8,8 @@ globalScrapeSampleLimit: ${global_scrape_sample_limit}
|
||||
enableTracing: ${enable_tracing}
|
||||
otlpGrpcEndpoint: ${otlp_grpc_endpoint}
|
||||
otlpHttpEndpoint: ${otlp_http_endpoint}
|
||||
tracingTimeout: ${tracing_timeout}
|
||||
tracingSendBatchSize: ${tracing_send_batch_size}
|
||||
|
||||
enableCustomMetrics: ${enable_custom_metrics}
|
||||
customMetricsPorts: ${custom_metrics_ports}
|
||||
|
||||
@@ -164,6 +164,23 @@ variable "enable_tracing" {
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "tracing_config" {
|
||||
description = "Configuration object for traces collection to AWS X-Ray"
|
||||
type = object({
|
||||
otlp_grpc_endpoint = string
|
||||
otlp_http_endpoint = string
|
||||
send_batch_size = number
|
||||
timeout = string
|
||||
})
|
||||
|
||||
default = {
|
||||
otlp_grpc_endpoint = "0.0.0.0:4317"
|
||||
otlp_http_endpoint = "0.0.0.0:4318"
|
||||
send_batch_size = 50
|
||||
timeout = "30s"
|
||||
}
|
||||
}
|
||||
|
||||
variable "enable_custom_metrics" {
|
||||
description = "Allows additional metrics collection for config elements in the `custom_metrics_config` config object. Automatic dashboards are not included"
|
||||
type = bool
|
||||
|
||||
Reference in New Issue
Block a user