diff --git a/.github/README.md b/.github/README.md index 78ff841c30..47dcff7ce1 100644 --- a/.github/README.md +++ b/.github/README.md @@ -49,9 +49,6 @@ Additionally, the OpenTelemetry Contrib collector has also been changed to the [ # !(when an older helm open-telemetry repo exists) update the open-telemetry helm repo helm repo update open-telemetry - # deploy the configuration for the Elastic OpenTelemetry collector distribution - kubectl apply -f configmap-deployment.yaml - # deploy the demo through helm install helm install -f deployment.yaml my-otel-demo open-telemetry/opentelemetry-demo ``` diff --git a/kubernetes/elastic-helm/configmap-deployment.yaml b/kubernetes/elastic-helm/configmap-deployment.yaml deleted file mode 100644 index 862007ec29..0000000000 --- a/kubernetes/elastic-helm/configmap-deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: elastic-otelcol-agent - namespace: default - labels: - app.kubernetes.io/name: otelcol - -data: - relay: | - extensions: - health_check: - endpoint: ${env:MY_POD_IP}:13133 - connectors: - spanmetrics: {} - exporters: - debug: {} - otlp/elastic: - endpoint: ${env:ELASTIC_APM_ENDPOINT} - compression: none - headers: - Authorization: Bearer ${env:ELASTIC_APM_SECRET_TOKEN} - processors: - batch: {} - resource: - attributes: - - key: deployment.environment - value: "opentelemetry-demo" - action: upsert - receivers: - httpcheck/frontendproxy: - targets: - - endpoint: http://example-frontendproxy:8080 - otlp: - protocols: - grpc: - endpoint: ${env:MY_POD_IP}:4317 - http: - cors: - allowed_origins: - - http://* - - https://* - endpoint: ${env:MY_POD_IP}:4318 - service: - extensions: - - health_check - pipelines: - logs: - exporters: - - debug - - otlp/elastic - processors: - - batch - - resource - receivers: - - otlp - metrics: - exporters: - - otlp/elastic - - debug - processors: - - batch - - resource - receivers: - - httpcheck/frontendproxy - - otlp - - spanmetrics - traces: - exporters: - - otlp/elastic - - debug - - spanmetrics - processors: - - batch - - resource - receivers: - - otlp - telemetry: - metrics: - address: ${env:MY_POD_IP}:8888 - diff --git a/kubernetes/elastic-helm/deployment.yaml b/kubernetes/elastic-helm/deployment.yaml index 9d9e3797e6..e1830e5d16 100644 --- a/kubernetes/elastic-helm/deployment.yaml +++ b/kubernetes/elastic-helm/deployment.yaml @@ -2,34 +2,6 @@ default: image: repository: ghcr.io/elastic/opentelemetry-demo tag: 1.11.2 - envOverrides: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_K8S_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: OTEL_K8S_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_K8S_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_K8S_POD_UID - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.uid - - name: OTEL_RESOURCE_ATTRIBUTES - value: 'service.name=$(OTEL_SERVICE_NAME),service.instance.id=$(OTEL_K8S_POD_UID),service.namespace=opentelemetry-demo,k8s.namespace.name=$(OTEL_K8S_NAMESPACE),k8s.node.name=$(OTEL_K8S_NODE_NAME),k8s.pod.name=$(OTEL_K8S_POD_NAME)' opentelemetry-collector: @@ -59,9 +31,42 @@ opentelemetry-collector: name: elastic-secret key: elastic_apm_secret_token - configMap: - create: false - existingName: elastic-otelcol-agent + config: + receivers: + redis: null + exporters: + otlphttp/prometheus: null + opensearch: null + otlp: null + otlp/elastic: + endpoint: ${env:ELASTIC_APM_ENDPOINT} + compression: none + headers: + Authorization: Bearer ${env:ELASTIC_APM_SECRET_TOKEN} + processors: + resource: + attributes: + - key: service.instance.id + from_attribute: k8s.pod.uid + action: insert + - key: deployment.environment + value: "opentelemetry-demo" + action: upsert + + service: + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, transform, resource, batch] + exporters: [otlp/elastic, spanmetrics] + metrics: + receivers: [httpcheck/frontendproxy, otlp, spanmetrics] + processors: [memory_limiter, resource, batch] + exporters: [otlp/elastic] + logs: + processors: [memory_limiter, resource, batch] + exporters: [otlp/elastic] + opensearch: enabled: false