From 571b8633f09e84527c30254520556e0baa7c931e Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Tue, 1 Aug 2023 13:27:13 -0700 Subject: [PATCH 01/22] Updated to use Splunk distro of OTel collector --- docker-compose.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 97dc4b8448..085c072bc4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -645,28 +645,36 @@ services: # OpenTelemetry Collector otelcol: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-otelcol + image: quay.io/signalfx/splunk-otel-collector:latest container_name: otel-col - build: - context: ./ - dockerfile: ./src/otelcollector/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-otelcol + environment: + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} deploy: resources: limits: memory: 125M restart: unless-stopped - command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ] + command: [ "--config=/etc/splunk-otelcol-config.yml" ] volumes: - - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - - ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml - - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml + - ./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint ports: - "4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464" # Prometheus exporter - "8888" # metrics endpoint + - "13133" # health check + - "14250" # jaeger gRPC receiver + - "14268" # jaeger thrift receiver + - "6060" # http forward extension + - "9080" # SignalFx forwarder + - "9411" # Zipkin endpoint + - "9943" # SignalFx receiver depends_on: - jaeger logging: *logging From 3442f8e9631a0b93133bfaa5c0ee32ac371c474e Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Tue, 1 Aug 2023 13:27:39 -0700 Subject: [PATCH 02/22] Updated to use Splunk distro of OTel collector --- src/otelcollector/splunk-otelcol-config.yml | 134 ++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/otelcollector/splunk-otelcol-config.yml diff --git a/src/otelcollector/splunk-otelcol-config.yml b/src/otelcollector/splunk-otelcol-config.yml new file mode 100644 index 0000000000..e83f3e2ebc --- /dev/null +++ b/src/otelcollector/splunk-otelcol-config.yml @@ -0,0 +1,134 @@ +extensions: + health_check: + endpoint: 0.0.0.0:13133 + http_forwarder: + ingress: + endpoint: 0.0.0.0:6060 + egress: + # TODO: Ensure this is set properly + endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" + zpages: + memory_ballast: + # In general, the ballast should be set to 1/3 of the collector's memory, the limit + # should be 90% of the collector's memory. + # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. + # TODO: Ensure this is set properly + size_mib: ${SPLUNK_BALLAST_SIZE_MIB} +receivers: + hostmetrics: + collection_interval: 10s + scrapers: + cpu: + disk: + filesystem: + memory: + network: + # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Aggregated system process count metrics + processes: + # System processes metrics, disabled by default + # process: + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + sapm: + endpoint: 0.0.0.0:7276 + signalfx: + endpoint: 0.0.0.0:9943 + # This section is used to collect OpenTelemetry metrics + # Even if just a SignalFx µAPM customer, these metrics are included + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['localhost:8888'] + # If you want to use the environment filter + # In the SignalFx dashboard + #labels: + #environment: demo + metric_relabel_configs: + - source_labels: [ __name__ ] + regex: '.*grpc_io.*' + action: drop + # Enable Zipkin to support Istio Mixer Adapter + # https://github.com/signalfx/signalfx-istio-adapter + zipkin: + endpoint: 0.0.0.0:9411 +processors: + batch: + # Optional: If you have a different environment tag name + # If this option is enabled it must be added to the pipeline section below + #attributes/copyfromexistingkey: + #actions: + #- key: environment + #from_attribute: YOUR_EXISTING_TAG_NAME + #action: upsert + # Optional: If you want to add an environment tag + # If this option is enabled it must be added to the pipeline section below + #attributes/newenvironment: + #actions: + #- key: environment + #value: "YOUR_ENVIRONMENT_NAME" + #action: insert + +exporters: + # Traces + sapm: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + # Metrics + signalfx: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + realm: "${SPLUNK_REALM}" + sync_host_metadata: true + # Logs (can also be used to send traces) + splunk_hec: + token: "${SPLUNK_HEC_TOKEN}" + endpoint: "${SPLUNK_HEC_URL}" + source: "otel" + sourcetype: "otel" + index: "astronomyshop" + profiling_data_enabled: false + +service: + extensions: [health_check, http_forwarder, zpages] + telemetry: + logs: + level: "debug" + + pipelines: + traces: + receivers: [jaeger, otlp, sapm, zipkin] + processors: [batch] + exporters: [ sapm, signalfx ] + metrics: + receivers: [otlp, signalfx, prometheus, hostmetrics] + processors: [batch] + exporters: [signalfx] + logs: + receivers: [signalfx] + processors: [batch] + exporters: [signalfx, splunk_hec] From 274e0f5b247c6fd1714fea9b97619ad5d4e4764e Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Tue, 1 Aug 2023 17:29:13 -0700 Subject: [PATCH 03/22] Updated to use Splunk log driver --- docker-compose.yml | 9 ++++++--- src/otelcollector/splunk-otelcol-config.yml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 085c072bc4..3aa1174ff7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,12 @@ version: '3.9' x-default-logging: &logging - driver: "json-file" + driver: "splunk" options: - max-size: "5m" - max-file: "2" + splunk-token: "${SPLUNK_HEC_TOKEN}" + splunk-url: "${SPLUNK_HEC_URL}" + splunk-index: "astronomyshop" + splunk-format: "raw" networks: default: @@ -58,6 +60,7 @@ services: limits: memory: 300M restart: unless-stopped + ports: - "${AD_SERVICE_PORT}" environment: diff --git a/src/otelcollector/splunk-otelcol-config.yml b/src/otelcollector/splunk-otelcol-config.yml index e83f3e2ebc..0c2c38a532 100644 --- a/src/otelcollector/splunk-otelcol-config.yml +++ b/src/otelcollector/splunk-otelcol-config.yml @@ -107,7 +107,7 @@ exporters: # Logs (can also be used to send traces) splunk_hec: token: "${SPLUNK_HEC_TOKEN}" - endpoint: "${SPLUNK_HEC_URL}" + endpoint: "${SPLUNK_HEC_URL}/services/collector" source: "otel" sourcetype: "otel" index: "astronomyshop" From 90ddcf39490bf78a45641e8cc279b46958007073 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Fri, 11 Aug 2023 16:09:10 -0700 Subject: [PATCH 04/22] Updated with fluentd and fluent forward --- docker-compose.yml | 28 ++++++++++++++----- src/fluentd/conf/fluent.conf | 30 +++++++++++++++++++++ src/otelcollector/splunk-otelcol-config.yml | 12 +++++---- 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 src/fluentd/conf/fluent.conf diff --git a/docker-compose.yml b/docker-compose.yml index 3aa1174ff7..b25f14e781 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,18 @@ version: '3.9' x-default-logging: &logging - driver: "splunk" + driver: "fluentd" options: - splunk-token: "${SPLUNK_HEC_TOKEN}" - splunk-url: "${SPLUNK_HEC_URL}" - splunk-index: "astronomyshop" - splunk-format: "raw" + fluentd-address: "127.0.0.1:24224" + fluentd-async-connect: "true" + fluentd-retry-wait: 1s + fluentd-max-retries: 10 +# driver: "splunk" +# options: +# splunk-token: "${SPLUNK_HEC_TOKEN}" +# splunk-url: "${SPLUNK_HEC_URL}" +# splunk-index: "astronomyshop" +# splunk-format: "raw" networks: default: @@ -76,6 +82,7 @@ services: condition: service_started logging: *logging + # Cart service cartservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice @@ -667,7 +674,7 @@ services: - ./logs:/logs - ./checkpoint:/checkpoint ports: - - "4317" # OTLP over gRPC receiver + - "4317:4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464" # Prometheus exporter - "8888" # metrics endpoint @@ -678,6 +685,7 @@ services: - "9080" # SignalFx forwarder - "9411" # Zipkin endpoint - "9943" # SignalFx receiver + - "8006:8006" # Fluentforward receiver depends_on: - jaeger logging: *logging @@ -758,6 +766,14 @@ services: - shippingservice - quoteservice + fluentd: + image: fluent/fluentd:edge-debian + volumes: + - ./src/fluentd/conf:/fluentd/etc + ports: + - "24224:24224" + - "24224:24224/udp" + # Tracebased Tests traceBasedTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests diff --git a/src/fluentd/conf/fluent.conf b/src/fluentd/conf/fluent.conf new file mode 100644 index 0000000000..22ed7ca7bb --- /dev/null +++ b/src/fluentd/conf/fluent.conf @@ -0,0 +1,30 @@ +@include conf.d/*.conf + + + @type forward + port 24224 + bind 0.0.0.0 + + + + @type forward + heartbeat_type udp + + host otelcol + port 8006 + + + @type memory + total_limit_size 600m + chunk_limit_size 1m + chunk_limit_records 100000 + flush_interval 5s + flush_thread_count 1 + overflow_action block + retry_max_times 3 + + + + + log_level info + diff --git a/src/otelcollector/splunk-otelcol-config.yml b/src/otelcollector/splunk-otelcol-config.yml index 0c2c38a532..97d531238d 100644 --- a/src/otelcollector/splunk-otelcol-config.yml +++ b/src/otelcollector/splunk-otelcol-config.yml @@ -15,6 +15,8 @@ extensions: # TODO: Ensure this is set properly size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: + fluentforward: + endpoint: 0.0.0.0:8006 hostmetrics: collection_interval: 10s scrapers: @@ -115,9 +117,9 @@ exporters: service: extensions: [health_check, http_forwarder, zpages] - telemetry: - logs: - level: "debug" +# telemetry: +# logs: +# level: "debug" pipelines: traces: @@ -129,6 +131,6 @@ service: processors: [batch] exporters: [signalfx] logs: - receivers: [signalfx] + receivers: [otlp, signalfx, fluentforward] processors: [batch] - exporters: [signalfx, splunk_hec] + exporters: [splunk_hec] From 25e48c2ccae8ed4e1d39d2060a4f2d74cd9aacc4 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Fri, 11 Aug 2023 16:11:47 -0700 Subject: [PATCH 05/22] Moved fluentd to the services section --- docker-compose.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b25f14e781..1ada6f8029 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -713,6 +713,14 @@ services: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging + fluentd: + image: fluent/fluentd:edge-debian + volumes: + - ./src/fluentd/conf:/fluentd/etc + ports: + - "24224:24224" + - "24224:24224/udp" + # ***** # Tests # ***** @@ -766,14 +774,6 @@ services: - shippingservice - quoteservice - fluentd: - image: fluent/fluentd:edge-debian - volumes: - - ./src/fluentd/conf:/fluentd/etc - ports: - - "24224:24224" - - "24224:24224/udp" - # Tracebased Tests traceBasedTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests From e05e49720fbfc0822c51da59e39016d78b4c0037 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Tue, 15 Aug 2023 14:36:37 -0700 Subject: [PATCH 06/22] Updated helm chart to use Splunk OTel collector --- kubernetes/opentelemetry-demo.yaml | 468 +++++++---------------------- 1 file changed, 112 insertions(+), 356 deletions(-) diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index 8b03b7cc47..9e1d58bfb9 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -24,16 +24,6 @@ metadata: app.kubernetes.io/version: "1.42.0" app.kubernetes.io/component: all-in-one --- -# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: opentelemetry-demo-otelcol - labels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - app.kubernetes.io/version: "0.76.1" ---- # Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount @@ -145,121 +135,6 @@ data: orgId: 1 type: file --- -# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: opentelemetry-demo-otelcol - labels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - app.kubernetes.io/version: "0.76.1" -data: - relay: | - connectors: - spanmetrics: null - exporters: - logging: {} - otlp: - endpoint: 'opentelemetry-demo-jaeger-collector:4317' - tls: - insecure: true - prometheus: - enable_open_metrics: true - endpoint: 0.0.0.0:9464 - resource_to_telemetry_conversion: - enabled: true - extensions: - health_check: {} - memory_ballast: - size_in_percentage: 40 - processors: - batch: {} - filter/ottl: - error_mode: ignore - metrics: - metric: - - name == "queueSize" - memory_limiter: - check_interval: 5s - limit_percentage: 80 - spike_limit_percentage: 25 - transform: - metric_statements: - - context: metric - statements: - - set(description, "Measures the duration of inbound HTTP requests") where name - == "http.server.duration" - receivers: - jaeger: - protocols: - grpc: - endpoint: ${env:MY_POD_IP}:14250 - thrift_compact: - endpoint: ${env:MY_POD_IP}:6831 - thrift_http: - endpoint: ${env:MY_POD_IP}:14268 - otlp: - protocols: - grpc: - endpoint: ${env:MY_POD_IP}:4317 - http: - cors: - allowed_origins: - - http://* - - https://* - endpoint: 0.0.0.0:4318 - prometheus: - config: - scrape_configs: - - job_name: opentelemetry-collector - scrape_interval: 10s - static_configs: - - targets: - - ${env:MY_POD_IP}:8888 - zipkin: - endpoint: ${env:MY_POD_IP}:9411 - service: - extensions: - - health_check - - memory_ballast - pipelines: - logs: - exporters: - - logging - processors: - - memory_limiter - - batch - receivers: - - otlp - metrics: - exporters: - - prometheus - - logging - processors: - - memory_limiter - - filter/ottl - - transform - - batch - receivers: - - otlp - - spanmetrics - traces: - exporters: - - otlp - - logging - - spanmetrics - processors: - - memory_limiter - - batch - receivers: - - otlp - - jaeger - - zipkin - telemetry: - metrics: - address: ${env:MY_POD_IP}:8888 ---- # Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml apiVersion: v1 kind: ConfigMap @@ -311,14 +186,14 @@ kind: ConfigMap metadata: name: opentelemetry-demo-grafana-dashboards labels: - + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.4.0" app.kubernetes.io/part-of: opentelemetry-demo data: - + demo-dashboard.json: | { "annotations": { @@ -6038,58 +5913,6 @@ spec: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one --- -# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: opentelemetry-demo-otelcol - labels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - app.kubernetes.io/version: "0.76.1" - component: standalone-collector -spec: - type: ClusterIP - ports: - - - name: jaeger-compact - port: 6831 - targetPort: 6831 - protocol: UDP - - name: jaeger-grpc - port: 14250 - targetPort: 14250 - protocol: TCP - - name: jaeger-thrift - port: 14268 - targetPort: 14268 - protocol: TCP - - name: metrics - port: 8888 - targetPort: 8888 - protocol: TCP - - name: otlp - port: 4317 - targetPort: 4317 - protocol: TCP - appProtocol: grpc - - name: otlp-http - port: 4318 - targetPort: 4318 - protocol: TCP - - name: prometheus - port: 9464 - targetPort: 9464 - protocol: TCP - - name: zipkin - port: 9411 - targetPort: 9411 - protocol: TCP - selector: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - component: standalone-collector ---- # Source: opentelemetry-demo/charts/prometheus/templates/service.yaml apiVersion: v1 kind: Service @@ -6542,7 +6365,7 @@ spec: checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b checksum/secret: 168eac9549c1155906143bae680e232ce7a8acecd06af6a8ca9d6088db7473f2 spec: - + serviceAccountName: opentelemetry-demo-grafana automountServiceAccountToken: true securityContext: @@ -6722,105 +6545,6 @@ spec: memory: 300Mi serviceAccountName: opentelemetry-demo-jaeger --- -# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentelemetry-demo-otelcol - labels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - app.kubernetes.io/version: "0.76.1" -spec: - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - component: standalone-collector - strategy: - type: RollingUpdate - template: - metadata: - annotations: - checksum/config: 43d3318bb84ce994167ce160b46e0e06eb17a17b8de61b578bf4a3e97f4dcdd1 - opentelemetry_community_demo: "true" - prometheus.io/port: "9464" - prometheus.io/scrape: "true" - labels: - app.kubernetes.io/name: otelcol - app.kubernetes.io/instance: opentelemetry-demo - component: standalone-collector - - spec: - - serviceAccountName: opentelemetry-demo-otelcol - securityContext: - {} - containers: - - name: opentelemetry-collector - command: - - /otelcol-contrib - - --config=/conf/relay.yaml - securityContext: - {} - image: "otel/opentelemetry-collector-contrib:0.76.1" - imagePullPolicy: IfNotPresent - ports: - - name: jaeger-compact - containerPort: 6831 - protocol: UDP - - name: jaeger-grpc - containerPort: 14250 - protocol: TCP - - name: jaeger-thrift - containerPort: 14268 - protocol: TCP - - name: metrics - containerPort: 8888 - protocol: TCP - - name: otlp - containerPort: 4317 - protocol: TCP - - name: otlp-http - containerPort: 4318 - protocol: TCP - - name: prometheus - containerPort: 9464 - protocol: TCP - - name: zipkin - containerPort: 9411 - protocol: TCP - env: - - name: MY_POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - livenessProbe: - httpGet: - path: / - port: 13133 - readinessProbe: - httpGet: - path: / - port: 13133 - resources: - limits: - memory: 125Mi - volumeMounts: - - mountPath: /conf - name: opentelemetry-collector-configmap - volumes: - - name: opentelemetry-collector-configmap - configMap: - name: opentelemetry-demo-otelcol - items: - - key: relay - path: relay.yaml - hostNetwork: false ---- # Source: opentelemetry-demo/charts/prometheus/templates/deploy.yaml apiVersion: apps/v1 kind: Deployment @@ -6970,16 +6694,18 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_SERVICE_ADDR value: 'opentelemetry-demo-kafka:9092' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi @@ -7054,20 +6780,22 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: AD_SERVICE_PORT value: "8080" - name: FEATURE_FLAG_GRPC_SERVICE_ADDR value: 'opentelemetry-demo-featureflagservice:50053' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - name: OTLP_LOGS_EXPORTER value: otlp - 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) + 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),deployment.environment=development resources: limits: memory: 300Mi @@ -7134,8 +6862,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CART_SERVICE_PORT @@ -7144,10 +6870,14 @@ spec: value: http://*:$(CART_SERVICE_PORT) - name: REDIS_ADDR value: 'opentelemetry-demo-redis:6379' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 160Mi @@ -7222,8 +6952,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CHECKOUT_SERVICE_PORT @@ -7242,10 +6970,14 @@ spec: value: 'opentelemetry-demo-shippingservice:8080' - name: KAFKA_SERVICE_ADDR value: 'opentelemetry-demo-kafka:9092' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi @@ -7320,16 +7052,18 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CURRENCY_SERVICE_PORT value: "8080" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi @@ -7396,18 +7130,20 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: EMAIL_SERVICE_PORT value: "8080" - name: APP_ENV value: production + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces + value: http://$(NODE_IP):4318/v1/traces - 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) + 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),deployment.environment=development resources: limits: memory: 100Mi @@ -7476,8 +7212,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: FEATURE_FLAG_SERVICE_PORT @@ -7486,12 +7220,16 @@ spec: value: "50053" - name: DATABASE_URL value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL value: grpc - 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) + 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),deployment.environment=development resources: limits: memory: 175Mi @@ -7572,8 +7310,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: POSTGRES_DB @@ -7583,7 +7319,7 @@ spec: - name: POSTGRES_PASSWORD value: ffs - 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) + 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),deployment.environment=development resources: limits: memory: 120Mi @@ -7650,16 +7386,18 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_SERVICE_ADDR value: 'opentelemetry-demo-kafka:9092' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 200Mi @@ -7734,8 +7472,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: FRONTEND_PORT @@ -7756,17 +7492,21 @@ spec: value: 'opentelemetry-demo-recommendationservice:8080' - name: SHIPPING_SERVICE_ADDR value: 'opentelemetry-demo-shippingservice:8080' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - name: WEB_OTEL_SERVICE_NAME value: frontend-web - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT value: http://localhost:8080/oltp-http/v1/traces - 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) + 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),deployment.environment=development resources: limits: - memory: 200Mi + memory: 400Mi securityContext: runAsGroup: 1001 runAsNonRoot: true @@ -7788,12 +7528,12 @@ metadata: spec: selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -7834,8 +7574,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: ENVOY_PORT @@ -7864,10 +7602,16 @@ spec: value: "4317" - name: OTEL_COLLECTOR_PORT_HTTP value: "4318" + - name: OTEL_COLLECTOR_PORT + value: "4317" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_COLLECTOR_HOST - value: $(OTEL_COLLECTOR_NAME) + value: $(NODE_IP) - 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) + 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),deployment.environment=development resources: limits: memory: 50Mi @@ -7940,18 +7684,20 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_ADVERTISED_LISTENERS value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - name: KAFKA_HEAP_OPTS value: -Xmx200M -Xms200M - 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) + 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),deployment.environment=development resources: limits: memory: 500Mi @@ -8022,8 +7768,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: LOCUST_WEB_PORT @@ -8040,10 +7784,14 @@ spec: value: "true" - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION value: python + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces + value: http://$(NODE_IP):4318/v1/traces - 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) + 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),deployment.environment=development resources: limits: memory: 120Mi @@ -8110,16 +7858,18 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: PAYMENT_SERVICE_PORT value: "8080" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 120Mi @@ -8190,18 +7940,20 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: PRODUCT_CATALOG_SERVICE_PORT value: "8080" - name: FEATURE_FLAG_GRPC_SERVICE_ADDR value: 'opentelemetry-demo-featureflagservice:50053' + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi @@ -8268,18 +8020,20 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: QUOTE_SERVICE_PORT value: "8080" - name: OTEL_PHP_AUTOLOAD_ENABLED value: "true" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318 + value: http://$(NODE_IP):4318 - 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) + 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),deployment.environment=development resources: limits: memory: 40Mi @@ -8350,8 +8104,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: RECOMMENDATION_SERVICE_PORT @@ -8364,10 +8116,14 @@ spec: value: "true" - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION value: python + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 + value: http://$(NODE_IP):4317 - 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) + 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),deployment.environment=development resources: limits: memory: 500Mi @@ -8434,12 +8190,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi @@ -8510,18 +8264,20 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.uid - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: SHIPPING_SERVICE_PORT value: "8080" - name: QUOTE_SERVICE_ADDR value: http://opentelemetry-demo-quoteservice:8080 + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces + value: http://$(NODE_IP):4317/v1/traces - 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) + 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),deployment.environment=development resources: limits: memory: 20Mi From bffba658786c89c82823bf57c1b5a8a5132a74fb Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Thu, 7 Sep 2023 09:20:09 -0700 Subject: [PATCH 07/22] Removed the Splunk log driver config option --- docker-compose.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1ada6f8029..c33901f821 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,12 +9,6 @@ x-default-logging: &logging fluentd-async-connect: "true" fluentd-retry-wait: 1s fluentd-max-retries: 10 -# driver: "splunk" -# options: -# splunk-token: "${SPLUNK_HEC_TOKEN}" -# splunk-url: "${SPLUNK_HEC_URL}" -# splunk-index: "astronomyshop" -# splunk-format: "raw" networks: default: From 88c2fcb532e825b4cdaa5e85288ba01926607128 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Thu, 14 Sep 2023 18:15:28 -0700 Subject: [PATCH 08/22] split filelog and fluent to separate configs --- docker-compose.filelog.yml | 854 +++++++++++++++++ docker-compose.fluentd-direct.yml | 855 +++++++++++++++++ docker-compose.fluentd.yml | 863 ++++++++++++++++++ docker-compose.yml | 59 +- .../splunk-otelcol-config-filelog.yml | 189 ++++ .../splunk-otelcol-config-fluentd-direct.yml | 136 +++ .../splunk-otelcol-config-fluentd.yml | 136 +++ 7 files changed, 3052 insertions(+), 40 deletions(-) create mode 100644 docker-compose.filelog.yml create mode 100644 docker-compose.fluentd-direct.yml create mode 100644 docker-compose.fluentd.yml create mode 100644 src/otelcollector/splunk-otelcol-config-filelog.yml create mode 100644 src/otelcollector/splunk-otelcol-config-fluentd-direct.yml create mode 100644 src/otelcollector/splunk-otelcol-config-fluentd.yml diff --git a/docker-compose.filelog.yml b/docker-compose.filelog.yml new file mode 100644 index 0000000000..fb197b89bc --- /dev/null +++ b/docker-compose.filelog.yml @@ -0,0 +1,854 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +version: '3.9' +x-default-logging: &logging + driver: "json-file" + options: + max-size: "5m" + max-file: "2" + tag: "{{.Name}}|{{.ImageName}}|{{.ID}}" +networks: + default: + name: opentelemetry-demo + driver: bridge + +services: + # ****************** + # Core Demo Services + # ****************** + # Accounting service + accountingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + container_name: accounting-service + build: + context: ./ + dockerfile: ./src/accountingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=accountingservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # AdService + adservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + container_name: ad-service + build: + context: ./ + dockerfile: ./src/adservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + + ports: + - "${AD_SERVICE_PORT}" + environment: + - AD_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_LOGS_EXPORTER=otlp + - OTEL_SERVICE_NAME=adservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + + # Cart service + cartservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + container_name: cart-service + build: + context: ./ + dockerfile: ./src/cartservice/src/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + deploy: + resources: + limits: + memory: 160M + restart: unless-stopped + ports: + - "${CART_SERVICE_PORT}" + environment: + - CART_SERVICE_PORT + - REDIS_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=cartservice + - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} + depends_on: + redis-cart: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Checkout service + checkoutservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + container_name: checkout-service + build: + context: ./ + dockerfile: ./src/checkoutservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CHECKOUT_SERVICE_PORT}" + environment: + - CHECKOUT_SERVICE_PORT + - CART_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=checkoutservice + depends_on: + cartservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Currency service + currencyservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + container_name: currency-service + build: + context: ./src/currencyservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + args: + - GRPC_VERSION=1.46.0 + - OPENTELEMETRY_VERSION=1.5.0 + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CURRENCY_SERVICE_PORT}" + environment: + - CURRENCY_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Email service + emailservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + container_name: email-service + build: + context: ./src/emailservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + deploy: + resources: + limits: + memory: 100M + restart: unless-stopped + ports: + - "${EMAIL_SERVICE_PORT}" + environment: + - APP_ENV=production + - EMAIL_SERVICE_PORT + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=emailservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Feature Flag service + featureflagservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + container_name: feature-flag-service + build: + context: ./ + dockerfile: ./src/featureflagservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + deploy: + resources: + limits: + memory: 175M + restart: unless-stopped + ports: + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + environment: + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + - OTEL_SERVICE_NAME=featureflagservice + - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs + healthcheck: + test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] + depends_on: + ffs_postgres: + condition: service_healthy + logging: *logging + + # Fraud Detection service + frauddetectionservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + container_name: frauddetection-service + build: + context: ./ + dockerfile: ./src/frauddetectionservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=frauddetectionservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Frontend + frontend: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + container_name: frontend + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + ports: + - "${FRONTEND_PORT}" + environment: + - PORT=${FRONTEND_PORT} + - FRONTEND_ADDR + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} + - ENV_PLATFORM + - OTEL_SERVICE_NAME=frontend + - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - WEB_OTEL_SERVICE_NAME=frontend-web + depends_on: + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + productcatalogservice: + condition: service_started + quoteservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Frontend Proxy (Envoy) + frontendproxy: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy + container_name: frontend-proxy + build: + context: ./ + dockerfile: src/frontendproxy/Dockerfile + deploy: + resources: + limits: + memory: 50M + ports: + - "${ENVOY_PORT}:${ENVOY_PORT}" + - 10000:10000 + environment: + - FRONTEND_PORT + - FRONTEND_HOST + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_SERVICE_HOST + - LOCUST_WEB_HOST + - LOCUST_WEB_PORT + - GRAFANA_SERVICE_PORT + - GRAFANA_SERVICE_HOST + - JAEGER_SERVICE_PORT + - JAEGER_SERVICE_HOST + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP + - ENVOY_PORT + depends_on: + frontend: + condition: service_started + featureflagservice: + condition: service_started + loadgenerator: + condition: service_started + jaeger: + condition: service_started + grafana: + condition: service_started + + # Load Generator + loadgenerator: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + container_name: load-generator + build: + context: ./ + dockerfile: ./src/loadgenerator/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${LOCUST_WEB_PORT}" + environment: + - LOCUST_WEB_PORT + - LOCUST_USERS + - LOCUST_HOST + - LOCUST_HEADLESS + - LOCUST_AUTOSTART + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=loadgenerator + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + frontend: + condition: service_started + logging: *logging + + # Payment service + paymentservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + container_name: payment-service + build: + context: ./ + dockerfile: ./src/paymentservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${PAYMENT_SERVICE_PORT}" + environment: + - PAYMENT_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=paymentservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Product Catalog service + productcatalogservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + container_name: product-catalog-service + build: + context: ./ + dockerfile: ./src/productcatalogservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${PRODUCT_CATALOG_SERVICE_PORT}" + environment: + - PRODUCT_CATALOG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=productcatalogservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Quote service + quoteservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + container_name: quote-service + build: + context: ./ + dockerfile: ./src/quoteservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + deploy: + resources: + limits: + memory: 40M + restart: unless-stopped + ports: + - "${QUOTE_SERVICE_PORT}" + environment: + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_PHP_AUTOLOAD_ENABLED=true + - QUOTE_SERVICE_PORT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=quoteservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Recommendation service + recommendationservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + container_name: recommendation-service + build: + context: ./ + dockerfile: ./src/recommendationservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + deploy: + resources: + limits: + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + restart: unless-stopped + ports: + - "${RECOMMENDATION_SERVICE_PORT}" + environment: + - RECOMMENDATION_SERVICE_PORT + - PRODUCT_CATALOG_SERVICE_ADDR + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=recommendationservice + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + featureflagservice: + condition: service_started + productcatalogservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Shipping service + shippingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + container_name: shipping-service + build: + context: ./ + dockerfile: ./src/shippingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${SHIPPING_SERVICE_PORT}" + environment: + - SHIPPING_SERVICE_PORT + - QUOTE_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=shippingservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # ****************** + # Dependent Services + # ****************** + # Postgres used by Feature Flag service + ffs_postgres: + image: postgres:14 + container_name: postgres + user: postgres + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + environment: + - POSTGRES_USER=ffs + - POSTGRES_DB=ffs + - POSTGRES_PASSWORD=ffs + healthcheck: + test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] + interval: 10s + timeout: 5s + retries: 5 + logging: *logging + + # Kafka used by Checkout, Accounting, and Fraud Detection services + kafka: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + container_name: kafka + build: + context: ./ + dockerfile: ./src/kafka/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + deploy: + resources: + limits: + memory: 500M + restart: unless-stopped + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=kafka + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + healthcheck: + test: nc -z kafka 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 + logging: *logging + + # Redis used by Cart service + redis-cart: + image: redis:alpine + container_name: redis-cart + user: redis + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${REDIS_PORT}" + logging: *logging + + + # ******************** + # Telemetry Components + # ******************** + # Jaeger + jaeger: + image: jaegertracing/all-in-one + container_name: jaeger + command: + - "--memory.max-traces" + - "10000" + - "--query.base-path" + - "/jaeger/ui" + - "--prometheus.server-url" + - "http://${PROMETHEUS_ADDR}" + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port + environment: + - COLLECTOR_OTLP_ENABLED=true + - METRICS_STORAGE_TYPE=prometheus + logging: *logging + + # Grafana + grafana: + image: grafana/grafana:9.4.7 + container_name: grafana + deploy: + resources: + limits: + memory: 100M + volumes: + - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./src/grafana/provisioning/:/etc/grafana/provisioning/ + ports: + - "${GRAFANA_SERVICE_PORT}" + logging: *logging + + # OpenTelemetry Collector + otelcol: + image: quay.io/signalfx/splunk-otel-collector:latest + container_name: otel-col + user: 0:0 + environment: + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} + deploy: + resources: + limits: + memory: 125M + restart: unless-stopped + command: [ "--config=/etc/splunk-otelcol-config.yml" ] + volumes: + - ./src/otelcollector/splunk-otelcol-config-filelog.yml:/etc/splunk-otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint + - /var/lib/docker/containers:/var/lib/docker/containers:ro + ports: + - "4317:4317" # OTLP over gRPC receiver + - "4318:4318" # OTLP over HTTP receiver + - "9464" # Prometheus exporter + - "8888" # metrics endpoint + - "13133" # health check + - "14250" # jaeger gRPC receiver + - "14268" # jaeger thrift receiver + - "6060" # http forward extension + - "9080" # SignalFx forwarder + - "9411" # Zipkin endpoint + - "9943" # SignalFx receiver + depends_on: + - jaeger + logging: *logging + + # Prometheus + prometheus: + image: quay.io/prometheus/prometheus:v2.43.0 + container_name: prometheus + command: + - --web.console.templates=/etc/prometheus/consoles + - --web.console.libraries=/etc/prometheus/console_libraries + - --storage.tsdb.retention.time=1h + - --config.file=/etc/prometheus/prometheus-config.yaml + - --storage.tsdb.path=/prometheus + - --web.enable-lifecycle + - --web.route-prefix=/ + - --enable-feature=exemplar-storage + volumes: + - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml + deploy: + resources: + limits: + memory: 300M + ports: + - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" + logging: *logging + + # ***** + # Tests + # ***** + # Frontend Tests + frontendTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests + container_name: frontend-tests + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile.cypress + profiles: + - tests + volumes: + - ./src/frontend/cypress/videos:/app/cypress/videos + - ./src/frontend/cypress/screenshots:/app/cypress/screenshots + environment: + - CYPRESS_baseUrl=http://${FRONTEND_ADDR} + - FRONTEND_ADDR + - NODE_ENV=production + depends_on: + - frontend + + # Integration Tests + integrationTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests + container_name: integrationTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + depends_on: + - adservice + - cartservice + - checkoutservice + - currencyservice + - emailservice + - paymentservice + - productcatalogservice + - recommendationservice + - shippingservice + - quoteservice + + # Tracebased Tests + traceBasedTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests + container_name: traceBasedTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/tracetesting/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - FRONTEND_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-server: + condition: service_healthy + # adding demo services as dependencies + frontend: + condition: service_started + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + quoteservice: + condition: service_started + + tracetest-server: + image: kubeshop/tracetest:latest + platform: linux/amd64 + container_name: tracetest-server + profiles: + - tests + volumes: + - type: bind + source: ./test/tracetesting/tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./test/tracetesting/tracetest-provision.yaml + target: /app/provision.yaml + command: --provisioning-file /app/provision.yaml + ports: + - 11633:11633 + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-postgres: + condition: service_healthy + otelcol: + condition: service_started + healthcheck: + test: [ "CMD", "wget", "--spider", "localhost:11633" ] + interval: 1s + timeout: 3s + retries: 60 + + tracetest-postgres: + image: postgres:14 + container_name: tracetest-postgres + profiles: + - tests + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + ports: + - 5432 diff --git a/docker-compose.fluentd-direct.yml b/docker-compose.fluentd-direct.yml new file mode 100644 index 0000000000..e895aeb864 --- /dev/null +++ b/docker-compose.fluentd-direct.yml @@ -0,0 +1,855 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +version: '3.9' +x-default-logging: &logging + driver: "fluentd" + options: + fluentd-address: "localhost:24224" + fluentd-async: "true" + fluentd-retry-wait: 1s + fluentd-max-retries: 10 + +networks: + default: + name: opentelemetry-demo + driver: bridge + +services: + # ****************** + # Core Demo Services + # ****************** + # Accounting service + accountingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + container_name: accounting-service + build: + context: ./ + dockerfile: ./src/accountingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=accountingservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # AdService + adservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + container_name: ad-service + build: + context: ./ + dockerfile: ./src/adservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + + ports: + - "${AD_SERVICE_PORT}" + environment: + - AD_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_LOGS_EXPORTER=otlp + - OTEL_SERVICE_NAME=adservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + + # Cart service + cartservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + container_name: cart-service + build: + context: ./ + dockerfile: ./src/cartservice/src/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + deploy: + resources: + limits: + memory: 160M + restart: unless-stopped + ports: + - "${CART_SERVICE_PORT}" + environment: + - CART_SERVICE_PORT + - REDIS_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=cartservice + - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} + depends_on: + redis-cart: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Checkout service + checkoutservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + container_name: checkout-service + build: + context: ./ + dockerfile: ./src/checkoutservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CHECKOUT_SERVICE_PORT}" + environment: + - CHECKOUT_SERVICE_PORT + - CART_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=checkoutservice + depends_on: + cartservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Currency service + currencyservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + container_name: currency-service + build: + context: ./src/currencyservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + args: + - GRPC_VERSION=1.46.0 + - OPENTELEMETRY_VERSION=1.5.0 + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CURRENCY_SERVICE_PORT}" + environment: + - CURRENCY_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Email service + emailservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + container_name: email-service + build: + context: ./src/emailservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + deploy: + resources: + limits: + memory: 100M + restart: unless-stopped + ports: + - "${EMAIL_SERVICE_PORT}" + environment: + - APP_ENV=production + - EMAIL_SERVICE_PORT + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=emailservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Feature Flag service + featureflagservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + container_name: feature-flag-service + build: + context: ./ + dockerfile: ./src/featureflagservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + deploy: + resources: + limits: + memory: 175M + restart: unless-stopped + ports: + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + environment: + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + - OTEL_SERVICE_NAME=featureflagservice + - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs + healthcheck: + test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] + depends_on: + ffs_postgres: + condition: service_healthy + logging: *logging + + # Fraud Detection service + frauddetectionservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + container_name: frauddetection-service + build: + context: ./ + dockerfile: ./src/frauddetectionservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=frauddetectionservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Frontend + frontend: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + container_name: frontend + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + ports: + - "${FRONTEND_PORT}" + environment: + - PORT=${FRONTEND_PORT} + - FRONTEND_ADDR + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} + - ENV_PLATFORM + - OTEL_SERVICE_NAME=frontend + - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - WEB_OTEL_SERVICE_NAME=frontend-web + depends_on: + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + productcatalogservice: + condition: service_started + quoteservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Frontend Proxy (Envoy) + frontendproxy: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy + container_name: frontend-proxy + build: + context: ./ + dockerfile: src/frontendproxy/Dockerfile + deploy: + resources: + limits: + memory: 50M + ports: + - "${ENVOY_PORT}:${ENVOY_PORT}" + - 10000:10000 + environment: + - FRONTEND_PORT + - FRONTEND_HOST + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_SERVICE_HOST + - LOCUST_WEB_HOST + - LOCUST_WEB_PORT + - GRAFANA_SERVICE_PORT + - GRAFANA_SERVICE_HOST + - JAEGER_SERVICE_PORT + - JAEGER_SERVICE_HOST + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP + - ENVOY_PORT + depends_on: + frontend: + condition: service_started + featureflagservice: + condition: service_started + loadgenerator: + condition: service_started + jaeger: + condition: service_started + grafana: + condition: service_started + + # Load Generator + loadgenerator: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + container_name: load-generator + build: + context: ./ + dockerfile: ./src/loadgenerator/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${LOCUST_WEB_PORT}" + environment: + - LOCUST_WEB_PORT + - LOCUST_USERS + - LOCUST_HOST + - LOCUST_HEADLESS + - LOCUST_AUTOSTART + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=loadgenerator + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + frontend: + condition: service_started + logging: *logging + + # Payment service + paymentservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + container_name: payment-service + build: + context: ./ + dockerfile: ./src/paymentservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${PAYMENT_SERVICE_PORT}" + environment: + - PAYMENT_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=paymentservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Product Catalog service + productcatalogservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + container_name: product-catalog-service + build: + context: ./ + dockerfile: ./src/productcatalogservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${PRODUCT_CATALOG_SERVICE_PORT}" + environment: + - PRODUCT_CATALOG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=productcatalogservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Quote service + quoteservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + container_name: quote-service + build: + context: ./ + dockerfile: ./src/quoteservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + deploy: + resources: + limits: + memory: 40M + restart: unless-stopped + ports: + - "${QUOTE_SERVICE_PORT}" + environment: + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_PHP_AUTOLOAD_ENABLED=true + - QUOTE_SERVICE_PORT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=quoteservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Recommendation service + recommendationservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + container_name: recommendation-service + build: + context: ./ + dockerfile: ./src/recommendationservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + deploy: + resources: + limits: + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + restart: unless-stopped + ports: + - "${RECOMMENDATION_SERVICE_PORT}" + environment: + - RECOMMENDATION_SERVICE_PORT + - PRODUCT_CATALOG_SERVICE_ADDR + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=recommendationservice + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + featureflagservice: + condition: service_started + productcatalogservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Shipping service + shippingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + container_name: shipping-service + build: + context: ./ + dockerfile: ./src/shippingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${SHIPPING_SERVICE_PORT}" + environment: + - SHIPPING_SERVICE_PORT + - QUOTE_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=shippingservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # ****************** + # Dependent Services + # ****************** + # Postgres used by Feature Flag service + ffs_postgres: + image: postgres:14 + container_name: postgres + user: postgres + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + environment: + - POSTGRES_USER=ffs + - POSTGRES_DB=ffs + - POSTGRES_PASSWORD=ffs + healthcheck: + test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] + interval: 10s + timeout: 5s + retries: 5 + logging: *logging + + # Kafka used by Checkout, Accounting, and Fraud Detection services + kafka: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + container_name: kafka + build: + context: ./ + dockerfile: ./src/kafka/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + deploy: + resources: + limits: + memory: 500M + restart: unless-stopped + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=kafka + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + healthcheck: + test: nc -z kafka 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 + logging: *logging + + # Redis used by Cart service + redis-cart: + image: redis:alpine + container_name: redis-cart + user: redis + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${REDIS_PORT}" + logging: *logging + + + # ******************** + # Telemetry Components + # ******************** + # Jaeger + jaeger: + image: jaegertracing/all-in-one + container_name: jaeger + command: + - "--memory.max-traces" + - "10000" + - "--query.base-path" + - "/jaeger/ui" + - "--prometheus.server-url" + - "http://${PROMETHEUS_ADDR}" + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port + environment: + - COLLECTOR_OTLP_ENABLED=true + - METRICS_STORAGE_TYPE=prometheus + logging: *logging + + # Grafana + grafana: + image: grafana/grafana:9.4.7 + container_name: grafana + deploy: + resources: + limits: + memory: 100M + volumes: + - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./src/grafana/provisioning/:/etc/grafana/provisioning/ + ports: + - "${GRAFANA_SERVICE_PORT}" + logging: *logging + + # OpenTelemetry Collector + otelcol: + image: quay.io/signalfx/splunk-otel-collector:latest + container_name: otel-col + environment: + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} + deploy: + resources: + limits: + memory: 125M + restart: unless-stopped + command: [ "--config=/etc/splunk-otelcol-config.yml" ] + volumes: + - ./src/otelcollector/splunk-otelcol-config-fluentd-direct.yml:/etc/splunk-otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint + ports: + - "4317:4317" # OTLP over gRPC receiver + - "4318:4318" # OTLP over HTTP receiver + - "9464" # Prometheus exporter + - "8888" # metrics endpoint + - "13133" # health check + - "14250" # jaeger gRPC receiver + - "14268" # jaeger thrift receiver + - "6060" # http forward extension + - "9080" # SignalFx forwarder + - "9411" # Zipkin endpoint + - "9943" # SignalFx receiver + - "24224:24224" # Fluentforward receiver + depends_on: + - jaeger + logging: *logging + + # Prometheus + prometheus: + image: quay.io/prometheus/prometheus:v2.43.0 + container_name: prometheus + command: + - --web.console.templates=/etc/prometheus/consoles + - --web.console.libraries=/etc/prometheus/console_libraries + - --storage.tsdb.retention.time=1h + - --config.file=/etc/prometheus/prometheus-config.yaml + - --storage.tsdb.path=/prometheus + - --web.enable-lifecycle + - --web.route-prefix=/ + - --enable-feature=exemplar-storage + volumes: + - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml + deploy: + resources: + limits: + memory: 300M + ports: + - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" + logging: *logging + + # ***** + # Tests + # ***** + # Frontend Tests + frontendTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests + container_name: frontend-tests + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile.cypress + profiles: + - tests + volumes: + - ./src/frontend/cypress/videos:/app/cypress/videos + - ./src/frontend/cypress/screenshots:/app/cypress/screenshots + environment: + - CYPRESS_baseUrl=http://${FRONTEND_ADDR} + - FRONTEND_ADDR + - NODE_ENV=production + depends_on: + - frontend + + # Integration Tests + integrationTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests + container_name: integrationTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + depends_on: + - adservice + - cartservice + - checkoutservice + - currencyservice + - emailservice + - paymentservice + - productcatalogservice + - recommendationservice + - shippingservice + - quoteservice + + # Tracebased Tests + traceBasedTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests + container_name: traceBasedTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/tracetesting/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - FRONTEND_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-server: + condition: service_healthy + # adding demo services as dependencies + frontend: + condition: service_started + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + quoteservice: + condition: service_started + + tracetest-server: + image: kubeshop/tracetest:latest + platform: linux/amd64 + container_name: tracetest-server + profiles: + - tests + volumes: + - type: bind + source: ./test/tracetesting/tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./test/tracetesting/tracetest-provision.yaml + target: /app/provision.yaml + command: --provisioning-file /app/provision.yaml + ports: + - 11633:11633 + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-postgres: + condition: service_healthy + otelcol: + condition: service_started + healthcheck: + test: [ "CMD", "wget", "--spider", "localhost:11633" ] + interval: 1s + timeout: 3s + retries: 60 + + tracetest-postgres: + image: postgres:14 + container_name: tracetest-postgres + profiles: + - tests + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + ports: + - 5432 diff --git a/docker-compose.fluentd.yml b/docker-compose.fluentd.yml new file mode 100644 index 0000000000..9284df9851 --- /dev/null +++ b/docker-compose.fluentd.yml @@ -0,0 +1,863 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +version: '3.9' +x-default-logging: &logging + driver: "fluentd" + options: + fluentd-address: "localhost:24224" + fluentd-async: "true" + fluentd-retry-wait: 1s + fluentd-max-retries: 10 + +networks: + default: + name: opentelemetry-demo + driver: bridge + +services: + # ****************** + # Core Demo Services + # ****************** + # Accounting service + accountingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + container_name: accounting-service + build: + context: ./ + dockerfile: ./src/accountingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=accountingservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # AdService + adservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + container_name: ad-service + build: + context: ./ + dockerfile: ./src/adservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + + ports: + - "${AD_SERVICE_PORT}" + environment: + - AD_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_LOGS_EXPORTER=otlp + - OTEL_SERVICE_NAME=adservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + + # Cart service + cartservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + container_name: cart-service + build: + context: ./ + dockerfile: ./src/cartservice/src/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + deploy: + resources: + limits: + memory: 160M + restart: unless-stopped + ports: + - "${CART_SERVICE_PORT}" + environment: + - CART_SERVICE_PORT + - REDIS_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=cartservice + - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} + depends_on: + redis-cart: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Checkout service + checkoutservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + container_name: checkout-service + build: + context: ./ + dockerfile: ./src/checkoutservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CHECKOUT_SERVICE_PORT}" + environment: + - CHECKOUT_SERVICE_PORT + - CART_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=checkoutservice + depends_on: + cartservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Currency service + currencyservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + container_name: currency-service + build: + context: ./src/currencyservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + args: + - GRPC_VERSION=1.46.0 + - OPENTELEMETRY_VERSION=1.5.0 + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CURRENCY_SERVICE_PORT}" + environment: + - CURRENCY_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Email service + emailservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + container_name: email-service + build: + context: ./src/emailservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + deploy: + resources: + limits: + memory: 100M + restart: unless-stopped + ports: + - "${EMAIL_SERVICE_PORT}" + environment: + - APP_ENV=production + - EMAIL_SERVICE_PORT + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=emailservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Feature Flag service + featureflagservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + container_name: feature-flag-service + build: + context: ./ + dockerfile: ./src/featureflagservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + deploy: + resources: + limits: + memory: 175M + restart: unless-stopped + ports: + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + environment: + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + - OTEL_SERVICE_NAME=featureflagservice + - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs + healthcheck: + test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] + depends_on: + ffs_postgres: + condition: service_healthy + logging: *logging + + # Fraud Detection service + frauddetectionservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + container_name: frauddetection-service + build: + context: ./ + dockerfile: ./src/frauddetectionservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=frauddetectionservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + + # Frontend + frontend: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + container_name: frontend + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + ports: + - "${FRONTEND_PORT}" + environment: + - PORT=${FRONTEND_PORT} + - FRONTEND_ADDR + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} + - ENV_PLATFORM + - OTEL_SERVICE_NAME=frontend + - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - WEB_OTEL_SERVICE_NAME=frontend-web + depends_on: + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + productcatalogservice: + condition: service_started + quoteservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Frontend Proxy (Envoy) + frontendproxy: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy + container_name: frontend-proxy + build: + context: ./ + dockerfile: src/frontendproxy/Dockerfile + deploy: + resources: + limits: + memory: 50M + ports: + - "${ENVOY_PORT}:${ENVOY_PORT}" + - 10000:10000 + environment: + - FRONTEND_PORT + - FRONTEND_HOST + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_SERVICE_HOST + - LOCUST_WEB_HOST + - LOCUST_WEB_PORT + - GRAFANA_SERVICE_PORT + - GRAFANA_SERVICE_HOST + - JAEGER_SERVICE_PORT + - JAEGER_SERVICE_HOST + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP + - ENVOY_PORT + depends_on: + frontend: + condition: service_started + featureflagservice: + condition: service_started + loadgenerator: + condition: service_started + jaeger: + condition: service_started + grafana: + condition: service_started + + # Load Generator + loadgenerator: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + container_name: load-generator + build: + context: ./ + dockerfile: ./src/loadgenerator/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${LOCUST_WEB_PORT}" + environment: + - LOCUST_WEB_PORT + - LOCUST_USERS + - LOCUST_HOST + - LOCUST_HEADLESS + - LOCUST_AUTOSTART + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=loadgenerator + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + frontend: + condition: service_started + logging: *logging + + # Payment service + paymentservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + container_name: payment-service + build: + context: ./ + dockerfile: ./src/paymentservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${PAYMENT_SERVICE_PORT}" + environment: + - PAYMENT_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=paymentservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Product Catalog service + productcatalogservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + container_name: product-catalog-service + build: + context: ./ + dockerfile: ./src/productcatalogservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${PRODUCT_CATALOG_SERVICE_PORT}" + environment: + - PRODUCT_CATALOG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=productcatalogservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Quote service + quoteservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + container_name: quote-service + build: + context: ./ + dockerfile: ./src/quoteservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + deploy: + resources: + limits: + memory: 40M + restart: unless-stopped + ports: + - "${QUOTE_SERVICE_PORT}" + environment: + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_PHP_AUTOLOAD_ENABLED=true + - QUOTE_SERVICE_PORT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=quoteservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # Recommendation service + recommendationservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + container_name: recommendation-service + build: + context: ./ + dockerfile: ./src/recommendationservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + deploy: + resources: + limits: + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + restart: unless-stopped + ports: + - "${RECOMMENDATION_SERVICE_PORT}" + environment: + - RECOMMENDATION_SERVICE_PORT + - PRODUCT_CATALOG_SERVICE_ADDR + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=recommendationservice + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + featureflagservice: + condition: service_started + productcatalogservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + + # Shipping service + shippingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + container_name: shipping-service + build: + context: ./ + dockerfile: ./src/shippingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${SHIPPING_SERVICE_PORT}" + environment: + - SHIPPING_SERVICE_PORT + - QUOTE_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=shippingservice + depends_on: + otelcol: + condition: service_started + logging: *logging + + # ****************** + # Dependent Services + # ****************** + # Postgres used by Feature Flag service + ffs_postgres: + image: postgres:14 + container_name: postgres + user: postgres + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + environment: + - POSTGRES_USER=ffs + - POSTGRES_DB=ffs + - POSTGRES_PASSWORD=ffs + healthcheck: + test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] + interval: 10s + timeout: 5s + retries: 5 + logging: *logging + + # Kafka used by Checkout, Accounting, and Fraud Detection services + kafka: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + container_name: kafka + build: + context: ./ + dockerfile: ./src/kafka/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + deploy: + resources: + limits: + memory: 500M + restart: unless-stopped + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=kafka + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + healthcheck: + test: nc -z kafka 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 + logging: *logging + + # Redis used by Cart service + redis-cart: + image: redis:alpine + container_name: redis-cart + user: redis + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${REDIS_PORT}" + logging: *logging + + + # ******************** + # Telemetry Components + # ******************** + # Jaeger + jaeger: + image: jaegertracing/all-in-one + container_name: jaeger + command: + - "--memory.max-traces" + - "10000" + - "--query.base-path" + - "/jaeger/ui" + - "--prometheus.server-url" + - "http://${PROMETHEUS_ADDR}" + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port + environment: + - COLLECTOR_OTLP_ENABLED=true + - METRICS_STORAGE_TYPE=prometheus + logging: *logging + + # Grafana + grafana: + image: grafana/grafana:9.4.7 + container_name: grafana + deploy: + resources: + limits: + memory: 100M + volumes: + - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./src/grafana/provisioning/:/etc/grafana/provisioning/ + ports: + - "${GRAFANA_SERVICE_PORT}" + logging: *logging + + # OpenTelemetry Collector + otelcol: + image: quay.io/signalfx/splunk-otel-collector:latest + container_name: otel-col + environment: + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} + deploy: + resources: + limits: + memory: 125M + restart: unless-stopped + command: [ "--config=/etc/splunk-otelcol-config.yml" ] + volumes: + - ./src/otelcollector/splunk-otelcol-config-fluentd.yml:/etc/splunk-otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint + ports: + - "4317:4317" # OTLP over gRPC receiver + - "4318:4318" # OTLP over HTTP receiver + - "9464" # Prometheus exporter + - "8888" # metrics endpoint + - "13133" # health check + - "14250" # jaeger gRPC receiver + - "14268" # jaeger thrift receiver + - "6060" # http forward extension + - "9080" # SignalFx forwarder + - "9411" # Zipkin endpoint + - "9943" # SignalFx receiver + - "8006:8006" # Fluentforward receiver + depends_on: + - jaeger + logging: *logging + + # Prometheus + prometheus: + image: quay.io/prometheus/prometheus:v2.43.0 + container_name: prometheus + command: + - --web.console.templates=/etc/prometheus/consoles + - --web.console.libraries=/etc/prometheus/console_libraries + - --storage.tsdb.retention.time=1h + - --config.file=/etc/prometheus/prometheus-config.yaml + - --storage.tsdb.path=/prometheus + - --web.enable-lifecycle + - --web.route-prefix=/ + - --enable-feature=exemplar-storage + volumes: + - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml + deploy: + resources: + limits: + memory: 300M + ports: + - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" + logging: *logging + + fluentd: + image: fluent/fluentd:edge-debian + volumes: + - ./src/fluentd/conf:/fluentd/etc + ports: + - "24224:24224" + - "24224:24224/udp" + + # ***** + # Tests + # ***** + # Frontend Tests + frontendTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests + container_name: frontend-tests + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile.cypress + profiles: + - tests + volumes: + - ./src/frontend/cypress/videos:/app/cypress/videos + - ./src/frontend/cypress/screenshots:/app/cypress/screenshots + environment: + - CYPRESS_baseUrl=http://${FRONTEND_ADDR} + - FRONTEND_ADDR + - NODE_ENV=production + depends_on: + - frontend + + # Integration Tests + integrationTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests + container_name: integrationTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + depends_on: + - adservice + - cartservice + - checkoutservice + - currencyservice + - emailservice + - paymentservice + - productcatalogservice + - recommendationservice + - shippingservice + - quoteservice + + # Tracebased Tests + traceBasedTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests + container_name: traceBasedTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/tracetesting/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - FRONTEND_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-server: + condition: service_healthy + # adding demo services as dependencies + frontend: + condition: service_started + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + quoteservice: + condition: service_started + + tracetest-server: + image: kubeshop/tracetest:latest + platform: linux/amd64 + container_name: tracetest-server + profiles: + - tests + volumes: + - type: bind + source: ./test/tracetesting/tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./test/tracetesting/tracetest-provision.yaml + target: /app/provision.yaml + command: --provisioning-file /app/provision.yaml + ports: + - 11633:11633 + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-postgres: + condition: service_healthy + otelcol: + condition: service_started + healthcheck: + test: [ "CMD", "wget", "--spider", "localhost:11633" ] + interval: 1s + timeout: 3s + retries: 60 + + tracetest-postgres: + image: postgres:14 + container_name: tracetest-postgres + profiles: + - tests + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + ports: + - 5432 diff --git a/docker-compose.yml b/docker-compose.yml index c33901f821..d63ba82564 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,10 @@ version: '3.9' x-default-logging: &logging - driver: "fluentd" + driver: "json-file" options: - fluentd-address: "127.0.0.1:24224" - fluentd-async-connect: "true" - fluentd-retry-wait: 1s - fluentd-max-retries: 10 + max-size: "5m" + max-file: "2" networks: default: @@ -60,7 +58,6 @@ services: limits: memory: 300M restart: unless-stopped - ports: - "${AD_SERVICE_PORT}" environment: @@ -76,7 +73,6 @@ services: condition: service_started logging: *logging - # Cart service cartservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice @@ -610,7 +606,7 @@ services: # ******************** # Jaeger jaeger: - image: jaegertracing/all-in-one + image: jaegertracing/all-in-one:1.48.0 container_name: jaeger command: - "--memory.max-traces" @@ -625,7 +621,7 @@ services: memory: 300M restart: unless-stopped ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "${JAEGER_SERVICE_PORT}" # Jaeger UI - "4317" # OTLP gRPC default port environment: - COLLECTOR_OTLP_ENABLED=true @@ -634,7 +630,7 @@ services: # Grafana grafana: - image: grafana/grafana:9.4.7 + image: grafana/grafana:10.1.0 container_name: grafana deploy: resources: @@ -649,44 +645,30 @@ services: # OpenTelemetry Collector otelcol: - image: quay.io/signalfx/splunk-otel-collector:latest + image: otel/opentelemetry-collector-contrib:0.84.0 container_name: otel-col - environment: - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} deploy: resources: limits: memory: 125M restart: unless-stopped - command: [ "--config=/etc/splunk-otelcol-config.yml" ] + command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: - - ./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml - - ./logs:/logs - - ./checkpoint:/checkpoint + - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml + - ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml + - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - - "4317:4317" # OTLP over gRPC receiver + - "4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464" # Prometheus exporter - "8888" # metrics endpoint - - "13133" # health check - - "14250" # jaeger gRPC receiver - - "14268" # jaeger thrift receiver - - "6060" # http forward extension - - "9080" # SignalFx forwarder - - "9411" # Zipkin endpoint - - "9943" # SignalFx receiver - - "8006:8006" # Fluentforward receiver depends_on: - jaeger logging: *logging # Prometheus prometheus: - image: quay.io/prometheus/prometheus:v2.43.0 + image: quay.io/prometheus/prometheus:v2.46.0 container_name: prometheus command: - --web.console.templates=/etc/prometheus/consoles @@ -707,14 +689,6 @@ services: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging - fluentd: - image: fluent/fluentd:edge-debian - volumes: - - ./src/fluentd/conf:/fluentd/etc - ports: - - "24224:24224" - - "24224:24224/udp" - # ***** # Tests # ***** @@ -788,6 +762,7 @@ services: - PRODUCT_CATALOG_SERVICE_ADDR - RECOMMENDATION_SERVICE_ADDR - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR extra_hosts: - "host.docker.internal:host-gateway" depends_on: @@ -816,6 +791,10 @@ services: condition: service_started quoteservice: condition: service_started + accountingservice: + condition: service_started + frauddetectionservice: + condition: service_started tracetest-server: image: kubeshop/tracetest:latest @@ -860,4 +839,4 @@ services: timeout: 5s retries: 60 ports: - - 5432 + - 5432 \ No newline at end of file diff --git a/src/otelcollector/splunk-otelcol-config-filelog.yml b/src/otelcollector/splunk-otelcol-config-filelog.yml new file mode 100644 index 0000000000..2d2f8bb9e8 --- /dev/null +++ b/src/otelcollector/splunk-otelcol-config-filelog.yml @@ -0,0 +1,189 @@ +extensions: + health_check: + endpoint: 0.0.0.0:13133 + http_forwarder: + ingress: + endpoint: 0.0.0.0:6060 + egress: + # TODO: Ensure this is set properly + endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" + zpages: + memory_ballast: + # In general, the ballast should be set to 1/3 of the collector's memory, the limit + # should be 90% of the collector's memory. + # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. + # TODO: Ensure this is set properly + size_mib: ${SPLUNK_BALLAST_SIZE_MIB} +receivers: + filelog: + include: + - /var/lib/docker/containers/*/*-json.log + encoding: utf-8 + fingerprint_size: 1kb + force_flush_period: "0" + include_file_name: false + include_file_path: true + max_concurrent_files: 1024 + max_log_size: 1MiB + operators: + - id: parser-docker + timestamp: + layout: '%Y-%m-%dT%H:%M:%S.%LZ' + parse_from: attributes.time + type: json_parser + - id: extract_metadata_from_docker_tag + parse_from: attributes.attrs.tag + regex: ^(?P[^\|]+)\|(?P[^\|]+)\|(?P[^$]+)$ + type: regex_parser + if: 'attributes?.attrs?.tag != nil' + - from: attributes.name + to: resource["com.splunk.sourcetype"] + type: copy + if: 'attributes?.name != nil' + - from: attributes.name + to: resource["docker.container.name"] + type: move + if: 'attributes?.name != nil' + - from: attributes.image_name + to: resource["docker.image.name"] + type: move + if: 'attributes?.image_name != nil' + - from: attributes.id + to: resource["docker.container.id"] + type: move + if: 'attributes?.id != nil' + - from: attributes.stream + to: resource["log.io.stream"] + type: move + - from: body.log + to: body + type: move + - field: attributes.attrs.tag + type: remove + if: 'attributes?.attrs?.tag != nil' + poll_interval: 200ms + start_at: beginning + + hostmetrics: + collection_interval: 10s + scrapers: + cpu: + disk: + filesystem: + memory: + network: + # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Aggregated system process count metrics + processes: + # System processes metrics, disabled by default + # process: + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + sapm: + endpoint: 0.0.0.0:7276 + signalfx: + endpoint: 0.0.0.0:9943 + # This section is used to collect OpenTelemetry metrics + # Even if just a SignalFx µAPM customer, these metrics are included + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['localhost:8888'] + # If you want to use the environment filter + # In the SignalFx dashboard + #labels: + #environment: demo + metric_relabel_configs: + - source_labels: [ __name__ ] + regex: '.*grpc_io.*' + action: drop + # Enable Zipkin to support Istio Mixer Adapter + # https://github.com/signalfx/signalfx-istio-adapter + zipkin: + endpoint: 0.0.0.0:9411 +processors: + batch: + # Optional: If you have a different environment tag name + # If this option is enabled it must be added to the pipeline section below + #attributes/copyfromexistingkey: + #actions: + #- key: environment + #from_attribute: YOUR_EXISTING_TAG_NAME + #action: upsert + # Optional: If you want to add an environment tag + # If this option is enabled it must be added to the pipeline section below + #attributes/newenvironment: + #actions: + #- key: environment + #value: "YOUR_ENVIRONMENT_NAME" + #action: insert + resourcedetection: + detectors: + - env + - system + timeout: 10s + override: true + +exporters: + # Traces + sapm: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + # Metrics + signalfx: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + realm: "${SPLUNK_REALM}" + sync_host_metadata: true + # Logs (can also be used to send traces) + splunk_hec: + token: "${SPLUNK_HEC_TOKEN}" + endpoint: "${SPLUNK_HEC_URL}/services/collector" + source: "otel" + sourcetype: "otel" + index: "astronomyshop" + profiling_data_enabled: false + +service: + extensions: [health_check, http_forwarder, zpages] + # telemetry: + # logs: + # level: "debug" + + pipelines: + traces: + receivers: [jaeger, otlp, sapm, zipkin] + processors: [batch, resourcedetection] + exporters: [ sapm, signalfx ] + metrics: + receivers: [otlp, signalfx, prometheus, hostmetrics] + processors: [batch, resourcedetection] + exporters: [signalfx] + logs: + receivers: [otlp, signalfx, filelog] + processors: [batch, resourcedetection] + exporters: [splunk_hec] diff --git a/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml b/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml new file mode 100644 index 0000000000..d7d1bc99e6 --- /dev/null +++ b/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml @@ -0,0 +1,136 @@ +extensions: + health_check: + endpoint: 0.0.0.0:13133 + http_forwarder: + ingress: + endpoint: 0.0.0.0:6060 + egress: + # TODO: Ensure this is set properly + endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" + zpages: + memory_ballast: + # In general, the ballast should be set to 1/3 of the collector's memory, the limit + # should be 90% of the collector's memory. + # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. + # TODO: Ensure this is set properly + size_mib: ${SPLUNK_BALLAST_SIZE_MIB} +receivers: + fluentforward: + endpoint: 127.0.0.1:24224 + hostmetrics: + collection_interval: 10s + scrapers: + cpu: + disk: + filesystem: + memory: + network: + # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Aggregated system process count metrics + processes: + # System processes metrics, disabled by default + # process: + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + sapm: + endpoint: 0.0.0.0:7276 + signalfx: + endpoint: 0.0.0.0:9943 + # This section is used to collect OpenTelemetry metrics + # Even if just a SignalFx µAPM customer, these metrics are included + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['localhost:8888'] + # If you want to use the environment filter + # In the SignalFx dashboard + #labels: + #environment: demo + metric_relabel_configs: + - source_labels: [ __name__ ] + regex: '.*grpc_io.*' + action: drop + # Enable Zipkin to support Istio Mixer Adapter + # https://github.com/signalfx/signalfx-istio-adapter + zipkin: + endpoint: 0.0.0.0:9411 +processors: + batch: + # Optional: If you have a different environment tag name + # If this option is enabled it must be added to the pipeline section below + #attributes/copyfromexistingkey: + #actions: + #- key: environment + #from_attribute: YOUR_EXISTING_TAG_NAME + #action: upsert + # Optional: If you want to add an environment tag + # If this option is enabled it must be added to the pipeline section below + #attributes/newenvironment: + #actions: + #- key: environment + #value: "YOUR_ENVIRONMENT_NAME" + #action: insert + +exporters: + # Traces + sapm: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + # Metrics + signalfx: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + realm: "${SPLUNK_REALM}" + sync_host_metadata: true + # Logs (can also be used to send traces) + splunk_hec: + token: "${SPLUNK_HEC_TOKEN}" + endpoint: "${SPLUNK_HEC_URL}/services/collector" + source: "otel" + sourcetype: "otel" + index: "astronomyshop" + profiling_data_enabled: false + +service: + extensions: [health_check, http_forwarder, zpages] + # telemetry: + # logs: + # level: "debug" + + pipelines: + traces: + receivers: [jaeger, otlp, sapm, zipkin] + processors: [batch] + exporters: [ sapm, signalfx ] + metrics: + receivers: [otlp, signalfx, prometheus, hostmetrics] + processors: [batch] + exporters: [signalfx] + logs: + receivers: [otlp, signalfx, fluentforward] + processors: [batch] + exporters: [splunk_hec] diff --git a/src/otelcollector/splunk-otelcol-config-fluentd.yml b/src/otelcollector/splunk-otelcol-config-fluentd.yml new file mode 100644 index 0000000000..062659b670 --- /dev/null +++ b/src/otelcollector/splunk-otelcol-config-fluentd.yml @@ -0,0 +1,136 @@ +extensions: + health_check: + endpoint: 0.0.0.0:13133 + http_forwarder: + ingress: + endpoint: 0.0.0.0:6060 + egress: + # TODO: Ensure this is set properly + endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" + zpages: + memory_ballast: + # In general, the ballast should be set to 1/3 of the collector's memory, the limit + # should be 90% of the collector's memory. + # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. + # TODO: Ensure this is set properly + size_mib: ${SPLUNK_BALLAST_SIZE_MIB} +receivers: + fluentforward: + endpoint: 127.0.0.1:8006 + hostmetrics: + collection_interval: 10s + scrapers: + cpu: + disk: + filesystem: + memory: + network: + # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Aggregated system process count metrics + processes: + # System processes metrics, disabled by default + # process: + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + sapm: + endpoint: 0.0.0.0:7276 + signalfx: + endpoint: 0.0.0.0:9943 + # This section is used to collect OpenTelemetry metrics + # Even if just a SignalFx µAPM customer, these metrics are included + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['localhost:8888'] + # If you want to use the environment filter + # In the SignalFx dashboard + #labels: + #environment: demo + metric_relabel_configs: + - source_labels: [ __name__ ] + regex: '.*grpc_io.*' + action: drop + # Enable Zipkin to support Istio Mixer Adapter + # https://github.com/signalfx/signalfx-istio-adapter + zipkin: + endpoint: 0.0.0.0:9411 +processors: + batch: + # Optional: If you have a different environment tag name + # If this option is enabled it must be added to the pipeline section below + #attributes/copyfromexistingkey: + #actions: + #- key: environment + #from_attribute: YOUR_EXISTING_TAG_NAME + #action: upsert + # Optional: If you want to add an environment tag + # If this option is enabled it must be added to the pipeline section below + #attributes/newenvironment: + #actions: + #- key: environment + #value: "YOUR_ENVIRONMENT_NAME" + #action: insert + +exporters: + # Traces + sapm: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + # Metrics + signalfx: + # TODO: Ensure this is set properly + access_token: "${SPLUNK_ACCESS_TOKEN}" + # TODO: Ensure this is set properly + realm: "${SPLUNK_REALM}" + sync_host_metadata: true + # Logs (can also be used to send traces) + splunk_hec: + token: "${SPLUNK_HEC_TOKEN}" + endpoint: "${SPLUNK_HEC_URL}/services/collector" + source: "otel" + sourcetype: "otel" + index: "astronomyshop" + profiling_data_enabled: false + +service: + extensions: [health_check, http_forwarder, zpages] + # telemetry: + # logs: + # level: "debug" + + pipelines: + traces: + receivers: [jaeger, otlp, sapm, zipkin] + processors: [batch] + exporters: [ sapm, signalfx ] + metrics: + receivers: [otlp, signalfx, prometheus, hostmetrics] + processors: [batch] + exporters: [signalfx] + logs: + receivers: [otlp, signalfx, fluentforward] + processors: [batch] + exporters: [splunk_hec] From ba157e7ec0714c14004bbe43418f76287fb60f2c Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Thu, 14 Sep 2023 18:58:17 -0700 Subject: [PATCH 09/22] fixed config issues during testing --- docker-compose.fluentd.yml | 14 +++++++------- .../splunk-otelcol-config-filelog.yml | 6 +++--- .../splunk-otelcol-config-fluentd.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docker-compose.fluentd.yml b/docker-compose.fluentd.yml index 9284df9851..345f9d66d6 100644 --- a/docker-compose.fluentd.yml +++ b/docker-compose.fluentd.yml @@ -707,13 +707,13 @@ services: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging - fluentd: - image: fluent/fluentd:edge-debian - volumes: - - ./src/fluentd/conf:/fluentd/etc - ports: - - "24224:24224" - - "24224:24224/udp" + fluentd: + image: fluent/fluentd:edge-debian + volumes: + - ./src/fluentd/conf:/fluentd/etc + ports: + - "24224:24224" + - "24224:24224/udp" # ***** # Tests diff --git a/src/otelcollector/splunk-otelcol-config-filelog.yml b/src/otelcollector/splunk-otelcol-config-filelog.yml index 2d2f8bb9e8..fbbc57a73a 100644 --- a/src/otelcollector/splunk-otelcol-config-filelog.yml +++ b/src/otelcollector/splunk-otelcol-config-filelog.yml @@ -55,12 +55,12 @@ receivers: - from: attributes.stream to: resource["log.io.stream"] type: move - - from: body.log - to: body - type: move - field: attributes.attrs.tag type: remove if: 'attributes?.attrs?.tag != nil' + - from: attributes.log + to: body + type: move poll_interval: 200ms start_at: beginning diff --git a/src/otelcollector/splunk-otelcol-config-fluentd.yml b/src/otelcollector/splunk-otelcol-config-fluentd.yml index 062659b670..eb1b52d847 100644 --- a/src/otelcollector/splunk-otelcol-config-fluentd.yml +++ b/src/otelcollector/splunk-otelcol-config-fluentd.yml @@ -16,7 +16,7 @@ extensions: size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: fluentforward: - endpoint: 127.0.0.1:8006 + endpoint: 0.0.0.0:8006 hostmetrics: collection_interval: 10s scrapers: From 4856bec20c0197a8c799c880f0d8798f245d86cd Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Fri, 15 Sep 2023 07:47:47 -0700 Subject: [PATCH 10/22] update fluentd config --- docker-compose.fluentd-direct.yml | 855 ------------------ docker-compose.fluentd.yml | 10 +- .../splunk-otelcol-config-fluentd-direct.yml | 136 --- .../splunk-otelcol-config-fluentd.yml | 18 +- 4 files changed, 13 insertions(+), 1006 deletions(-) delete mode 100644 docker-compose.fluentd-direct.yml delete mode 100644 src/otelcollector/splunk-otelcol-config-fluentd-direct.yml diff --git a/docker-compose.fluentd-direct.yml b/docker-compose.fluentd-direct.yml deleted file mode 100644 index e895aeb864..0000000000 --- a/docker-compose.fluentd-direct.yml +++ /dev/null @@ -1,855 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -version: '3.9' -x-default-logging: &logging - driver: "fluentd" - options: - fluentd-address: "localhost:24224" - fluentd-async: "true" - fluentd-retry-wait: 1s - fluentd-max-retries: 10 - -networks: - default: - name: opentelemetry-demo - driver: bridge - -services: - # ****************** - # Core Demo Services - # ****************** - # Accounting service - accountingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - container_name: accounting-service - build: - context: ./ - dockerfile: ./src/accountingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=accountingservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # AdService - adservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - container_name: ad-service - build: - context: ./ - dockerfile: ./src/adservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - - ports: - - "${AD_SERVICE_PORT}" - environment: - - AD_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_LOGS_EXPORTER=otlp - - OTEL_SERVICE_NAME=adservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - - # Cart service - cartservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - container_name: cart-service - build: - context: ./ - dockerfile: ./src/cartservice/src/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - deploy: - resources: - limits: - memory: 160M - restart: unless-stopped - ports: - - "${CART_SERVICE_PORT}" - environment: - - CART_SERVICE_PORT - - REDIS_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=cartservice - - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} - depends_on: - redis-cart: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Checkout service - checkoutservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - container_name: checkout-service - build: - context: ./ - dockerfile: ./src/checkoutservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CHECKOUT_SERVICE_PORT}" - environment: - - CHECKOUT_SERVICE_PORT - - CART_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=checkoutservice - depends_on: - cartservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Currency service - currencyservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - container_name: currency-service - build: - context: ./src/currencyservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - args: - - GRPC_VERSION=1.46.0 - - OPENTELEMETRY_VERSION=1.5.0 - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CURRENCY_SERVICE_PORT}" - environment: - - CURRENCY_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Email service - emailservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - container_name: email-service - build: - context: ./src/emailservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - deploy: - resources: - limits: - memory: 100M - restart: unless-stopped - ports: - - "${EMAIL_SERVICE_PORT}" - environment: - - APP_ENV=production - - EMAIL_SERVICE_PORT - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=emailservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Feature Flag service - featureflagservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - container_name: feature-flag-service - build: - context: ./ - dockerfile: ./src/featureflagservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - deploy: - resources: - limits: - memory: 175M - restart: unless-stopped - ports: - - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API - environment: - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc - - OTEL_SERVICE_NAME=featureflagservice - - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs - healthcheck: - test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] - depends_on: - ffs_postgres: - condition: service_healthy - logging: *logging - - # Fraud Detection service - frauddetectionservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - container_name: frauddetection-service - build: - context: ./ - dockerfile: ./src/frauddetectionservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=frauddetectionservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Frontend - frontend: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - container_name: frontend - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - ports: - - "${FRONTEND_PORT}" - environment: - - PORT=${FRONTEND_PORT} - - FRONTEND_ADDR - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} - - ENV_PLATFORM - - OTEL_SERVICE_NAME=frontend - - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - WEB_OTEL_SERVICE_NAME=frontend-web - depends_on: - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - productcatalogservice: - condition: service_started - quoteservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Frontend Proxy (Envoy) - frontendproxy: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy - container_name: frontend-proxy - build: - context: ./ - dockerfile: src/frontendproxy/Dockerfile - deploy: - resources: - limits: - memory: 50M - ports: - - "${ENVOY_PORT}:${ENVOY_PORT}" - - 10000:10000 - environment: - - FRONTEND_PORT - - FRONTEND_HOST - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_SERVICE_HOST - - LOCUST_WEB_HOST - - LOCUST_WEB_PORT - - GRAFANA_SERVICE_PORT - - GRAFANA_SERVICE_HOST - - JAEGER_SERVICE_PORT - - JAEGER_SERVICE_HOST - - OTEL_COLLECTOR_HOST - - OTEL_COLLECTOR_PORT_GRPC - - OTEL_COLLECTOR_PORT_HTTP - - ENVOY_PORT - depends_on: - frontend: - condition: service_started - featureflagservice: - condition: service_started - loadgenerator: - condition: service_started - jaeger: - condition: service_started - grafana: - condition: service_started - - # Load Generator - loadgenerator: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - container_name: load-generator - build: - context: ./ - dockerfile: ./src/loadgenerator/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${LOCUST_WEB_PORT}" - environment: - - LOCUST_WEB_PORT - - LOCUST_USERS - - LOCUST_HOST - - LOCUST_HEADLESS - - LOCUST_AUTOSTART - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=loadgenerator - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - frontend: - condition: service_started - logging: *logging - - # Payment service - paymentservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - container_name: payment-service - build: - context: ./ - dockerfile: ./src/paymentservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${PAYMENT_SERVICE_PORT}" - environment: - - PAYMENT_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=paymentservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Product Catalog service - productcatalogservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - container_name: product-catalog-service - build: - context: ./ - dockerfile: ./src/productcatalogservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${PRODUCT_CATALOG_SERVICE_PORT}" - environment: - - PRODUCT_CATALOG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=productcatalogservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Quote service - quoteservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - container_name: quote-service - build: - context: ./ - dockerfile: ./src/quoteservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - deploy: - resources: - limits: - memory: 40M - restart: unless-stopped - ports: - - "${QUOTE_SERVICE_PORT}" - environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 - - OTEL_PHP_AUTOLOAD_ENABLED=true - - QUOTE_SERVICE_PORT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=quoteservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Recommendation service - recommendationservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - container_name: recommendation-service - build: - context: ./ - dockerfile: ./src/recommendationservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - deploy: - resources: - limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case - restart: unless-stopped - ports: - - "${RECOMMENDATION_SERVICE_PORT}" - environment: - - RECOMMENDATION_SERVICE_PORT - - PRODUCT_CATALOG_SERVICE_ADDR - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_PYTHON_LOG_CORRELATION=true - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=recommendationservice - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - featureflagservice: - condition: service_started - productcatalogservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Shipping service - shippingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - container_name: shipping-service - build: - context: ./ - dockerfile: ./src/shippingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${SHIPPING_SERVICE_PORT}" - environment: - - SHIPPING_SERVICE_PORT - - QUOTE_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=shippingservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # ****************** - # Dependent Services - # ****************** - # Postgres used by Feature Flag service - ffs_postgres: - image: postgres:14 - container_name: postgres - user: postgres - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - environment: - - POSTGRES_USER=ffs - - POSTGRES_DB=ffs - - POSTGRES_PASSWORD=ffs - healthcheck: - test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] - interval: 10s - timeout: 5s - retries: 5 - logging: *logging - - # Kafka used by Checkout, Accounting, and Fraud Detection services - kafka: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - container_name: kafka - build: - context: ./ - dockerfile: ./src/kafka/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - deploy: - resources: - limits: - memory: 500M - restart: unless-stopped - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=kafka - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - healthcheck: - test: nc -z kafka 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 - logging: *logging - - # Redis used by Cart service - redis-cart: - image: redis:alpine - container_name: redis-cart - user: redis - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${REDIS_PORT}" - logging: *logging - - - # ******************** - # Telemetry Components - # ******************** - # Jaeger - jaeger: - image: jaegertracing/all-in-one - container_name: jaeger - command: - - "--memory.max-traces" - - "10000" - - "--query.base-path" - - "/jaeger/ui" - - "--prometheus.server-url" - - "http://${PROMETHEUS_ADDR}" - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port - environment: - - COLLECTOR_OTLP_ENABLED=true - - METRICS_STORAGE_TYPE=prometheus - logging: *logging - - # Grafana - grafana: - image: grafana/grafana:9.4.7 - container_name: grafana - deploy: - resources: - limits: - memory: 100M - volumes: - - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini - - ./src/grafana/provisioning/:/etc/grafana/provisioning/ - ports: - - "${GRAFANA_SERVICE_PORT}" - logging: *logging - - # OpenTelemetry Collector - otelcol: - image: quay.io/signalfx/splunk-otel-collector:latest - container_name: otel-col - environment: - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} - deploy: - resources: - limits: - memory: 125M - restart: unless-stopped - command: [ "--config=/etc/splunk-otelcol-config.yml" ] - volumes: - - ./src/otelcollector/splunk-otelcol-config-fluentd-direct.yml:/etc/splunk-otelcol-config.yml - - ./logs:/logs - - ./checkpoint:/checkpoint - ports: - - "4317:4317" # OTLP over gRPC receiver - - "4318:4318" # OTLP over HTTP receiver - - "9464" # Prometheus exporter - - "8888" # metrics endpoint - - "13133" # health check - - "14250" # jaeger gRPC receiver - - "14268" # jaeger thrift receiver - - "6060" # http forward extension - - "9080" # SignalFx forwarder - - "9411" # Zipkin endpoint - - "9943" # SignalFx receiver - - "24224:24224" # Fluentforward receiver - depends_on: - - jaeger - logging: *logging - - # Prometheus - prometheus: - image: quay.io/prometheus/prometheus:v2.43.0 - container_name: prometheus - command: - - --web.console.templates=/etc/prometheus/consoles - - --web.console.libraries=/etc/prometheus/console_libraries - - --storage.tsdb.retention.time=1h - - --config.file=/etc/prometheus/prometheus-config.yaml - - --storage.tsdb.path=/prometheus - - --web.enable-lifecycle - - --web.route-prefix=/ - - --enable-feature=exemplar-storage - volumes: - - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml - deploy: - resources: - limits: - memory: 300M - ports: - - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" - logging: *logging - - # ***** - # Tests - # ***** - # Frontend Tests - frontendTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests - container_name: frontend-tests - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile.cypress - profiles: - - tests - volumes: - - ./src/frontend/cypress/videos:/app/cypress/videos - - ./src/frontend/cypress/screenshots:/app/cypress/screenshots - environment: - - CYPRESS_baseUrl=http://${FRONTEND_ADDR} - - FRONTEND_ADDR - - NODE_ENV=production - depends_on: - - frontend - - # Integration Tests - integrationTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests - container_name: integrationTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - depends_on: - - adservice - - cartservice - - checkoutservice - - currencyservice - - emailservice - - paymentservice - - productcatalogservice - - recommendationservice - - shippingservice - - quoteservice - - # Tracebased Tests - traceBasedTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests - container_name: traceBasedTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/tracetesting/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - FRONTEND_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - extra_hosts: - - "host.docker.internal:host-gateway" - depends_on: - tracetest-server: - condition: service_healthy - # adding demo services as dependencies - frontend: - condition: service_started - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - quoteservice: - condition: service_started - - tracetest-server: - image: kubeshop/tracetest:latest - platform: linux/amd64 - container_name: tracetest-server - profiles: - - tests - volumes: - - type: bind - source: ./test/tracetesting/tracetest-config.yaml - target: /app/tracetest.yaml - - type: bind - source: ./test/tracetesting/tracetest-provision.yaml - target: /app/provision.yaml - command: --provisioning-file /app/provision.yaml - ports: - - 11633:11633 - extra_hosts: - - "host.docker.internal:host-gateway" - depends_on: - tracetest-postgres: - condition: service_healthy - otelcol: - condition: service_started - healthcheck: - test: [ "CMD", "wget", "--spider", "localhost:11633" ] - interval: 1s - timeout: 3s - retries: 60 - - tracetest-postgres: - image: postgres:14 - container_name: tracetest-postgres - profiles: - - tests - environment: - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - healthcheck: - test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" - interval: 1s - timeout: 5s - retries: 60 - ports: - - 5432 diff --git a/docker-compose.fluentd.yml b/docker-compose.fluentd.yml index 345f9d66d6..f807319207 100644 --- a/docker-compose.fluentd.yml +++ b/docker-compose.fluentd.yml @@ -679,7 +679,7 @@ services: - "9080" # SignalFx forwarder - "9411" # Zipkin endpoint - "9943" # SignalFx receiver - - "8006:8006" # Fluentforward receiver + - "24224:24224" # Fluentforward receiver depends_on: - jaeger logging: *logging @@ -707,14 +707,6 @@ services: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging - fluentd: - image: fluent/fluentd:edge-debian - volumes: - - ./src/fluentd/conf:/fluentd/etc - ports: - - "24224:24224" - - "24224:24224/udp" - # ***** # Tests # ***** diff --git a/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml b/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml deleted file mode 100644 index d7d1bc99e6..0000000000 --- a/src/otelcollector/splunk-otelcol-config-fluentd-direct.yml +++ /dev/null @@ -1,136 +0,0 @@ -extensions: - health_check: - endpoint: 0.0.0.0:13133 - http_forwarder: - ingress: - endpoint: 0.0.0.0:6060 - egress: - # TODO: Ensure this is set properly - endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" - zpages: - memory_ballast: - # In general, the ballast should be set to 1/3 of the collector's memory, the limit - # should be 90% of the collector's memory. - # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. - # TODO: Ensure this is set properly - size_mib: ${SPLUNK_BALLAST_SIZE_MIB} -receivers: - fluentforward: - endpoint: 127.0.0.1:24224 - hostmetrics: - collection_interval: 10s - scrapers: - cpu: - disk: - filesystem: - memory: - network: - # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) - load: - # Paging/Swap space utilization and I/O metrics - paging: - # Aggregated system process count metrics - processes: - # System processes metrics, disabled by default - # process: - jaeger: - protocols: - grpc: - endpoint: 0.0.0.0:14250 - thrift_binary: - endpoint: 0.0.0.0:6832 - thrift_compact: - endpoint: 0.0.0.0:6831 - thrift_http: - endpoint: 0.0.0.0:14268 - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:4317 - http: - endpoint: 0.0.0.0:4318 - - sapm: - endpoint: 0.0.0.0:7276 - signalfx: - endpoint: 0.0.0.0:9943 - # This section is used to collect OpenTelemetry metrics - # Even if just a SignalFx µAPM customer, these metrics are included - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: ['localhost:8888'] - # If you want to use the environment filter - # In the SignalFx dashboard - #labels: - #environment: demo - metric_relabel_configs: - - source_labels: [ __name__ ] - regex: '.*grpc_io.*' - action: drop - # Enable Zipkin to support Istio Mixer Adapter - # https://github.com/signalfx/signalfx-istio-adapter - zipkin: - endpoint: 0.0.0.0:9411 -processors: - batch: - # Optional: If you have a different environment tag name - # If this option is enabled it must be added to the pipeline section below - #attributes/copyfromexistingkey: - #actions: - #- key: environment - #from_attribute: YOUR_EXISTING_TAG_NAME - #action: upsert - # Optional: If you want to add an environment tag - # If this option is enabled it must be added to the pipeline section below - #attributes/newenvironment: - #actions: - #- key: environment - #value: "YOUR_ENVIRONMENT_NAME" - #action: insert - -exporters: - # Traces - sapm: - # TODO: Ensure this is set properly - access_token: "${SPLUNK_ACCESS_TOKEN}" - # TODO: Ensure this is set properly - endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" - # Metrics - signalfx: - # TODO: Ensure this is set properly - access_token: "${SPLUNK_ACCESS_TOKEN}" - # TODO: Ensure this is set properly - realm: "${SPLUNK_REALM}" - sync_host_metadata: true - # Logs (can also be used to send traces) - splunk_hec: - token: "${SPLUNK_HEC_TOKEN}" - endpoint: "${SPLUNK_HEC_URL}/services/collector" - source: "otel" - sourcetype: "otel" - index: "astronomyshop" - profiling_data_enabled: false - -service: - extensions: [health_check, http_forwarder, zpages] - # telemetry: - # logs: - # level: "debug" - - pipelines: - traces: - receivers: [jaeger, otlp, sapm, zipkin] - processors: [batch] - exporters: [ sapm, signalfx ] - metrics: - receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch] - exporters: [signalfx] - logs: - receivers: [otlp, signalfx, fluentforward] - processors: [batch] - exporters: [splunk_hec] diff --git a/src/otelcollector/splunk-otelcol-config-fluentd.yml b/src/otelcollector/splunk-otelcol-config-fluentd.yml index eb1b52d847..286acc24db 100644 --- a/src/otelcollector/splunk-otelcol-config-fluentd.yml +++ b/src/otelcollector/splunk-otelcol-config-fluentd.yml @@ -16,7 +16,7 @@ extensions: size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: fluentforward: - endpoint: 0.0.0.0:8006 + endpoint: 0.0.0.0:24224 hostmetrics: collection_interval: 10s scrapers: @@ -63,8 +63,8 @@ receivers: scrape_interval: 10s static_configs: - targets: ['localhost:8888'] - # If you want to use the environment filter - # In the SignalFx dashboard + # If you want to use the environment filter + # In the SignalFx dashboard #labels: #environment: demo metric_relabel_configs: @@ -91,6 +91,12 @@ processors: #- key: environment #value: "YOUR_ENVIRONMENT_NAME" #action: insert + resourcedetection: + detectors: + - env + - system + timeout: 10s + override: true exporters: # Traces @@ -124,13 +130,13 @@ service: pipelines: traces: receivers: [jaeger, otlp, sapm, zipkin] - processors: [batch] + processors: [batch, resourcedetection] exporters: [ sapm, signalfx ] metrics: receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch] + processors: [batch, resourcedetection] exporters: [signalfx] logs: receivers: [otlp, signalfx, fluentforward] - processors: [batch] + processors: [batch, resourcedetection] exporters: [splunk_hec] From 9d1552df4e04e3803c6363f5de19fbf5f1da3120 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Sat, 23 Sep 2023 11:31:29 -0700 Subject: [PATCH 11/22] updated default docker config --- docker-compose.yml | 25 ++++++++++++++++----- src/otelcollector/splunk-otelcol-config.yml | 14 ++++++++---- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d63ba82564..c12caedef4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -645,23 +645,36 @@ services: # OpenTelemetry Collector otelcol: - image: otel/opentelemetry-collector-contrib:0.84.0 + image: quay.io/signalfx/splunk-otel-collector:latest container_name: otel-col + environment: + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} deploy: resources: limits: memory: 125M restart: unless-stopped - command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ] + command: [ "--config=/etc/splunk-otelcol-config.yml" ] volumes: - - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - - ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml - - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml + - ./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint ports: - - "4317" # OTLP over gRPC receiver + - "4317:4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464" # Prometheus exporter - "8888" # metrics endpoint + - "13133" # health check + - "14250" # jaeger gRPC receiver + - "14268" # jaeger thrift receiver + - "6060" # http forward extension + - "9080" # SignalFx forwarder + - "9411" # Zipkin endpoint + - "9943" # SignalFx receiver depends_on: - jaeger logging: *logging diff --git a/src/otelcollector/splunk-otelcol-config.yml b/src/otelcollector/splunk-otelcol-config.yml index 97d531238d..3ed6c143ba 100644 --- a/src/otelcollector/splunk-otelcol-config.yml +++ b/src/otelcollector/splunk-otelcol-config.yml @@ -16,7 +16,7 @@ extensions: size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: fluentforward: - endpoint: 0.0.0.0:8006 + endpoint: 0.0.0.0:24224 hostmetrics: collection_interval: 10s scrapers: @@ -91,6 +91,12 @@ processors: #- key: environment #value: "YOUR_ENVIRONMENT_NAME" #action: insert + resourcedetection: + detectors: + - env + - system + timeout: 10s + override: true exporters: # Traces @@ -124,13 +130,13 @@ service: pipelines: traces: receivers: [jaeger, otlp, sapm, zipkin] - processors: [batch] + processors: [batch, resourcedetection] exporters: [ sapm, signalfx ] metrics: receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch] + processors: [batch, resourcedetection] exporters: [signalfx] logs: receivers: [otlp, signalfx, fluentforward] - processors: [batch] + processors: [batch, resourcedetection] exporters: [splunk_hec] From 589c0dace0bcad583108a2ed53d64ad884566591 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 15 Nov 2023 17:29:20 -0800 Subject: [PATCH 12/22] updated instructions --- README.md | 119 ++---------------------------------------------------- 1 file changed, 4 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index e3b338c414..daa09e35b2 100644 --- a/README.md +++ b/README.md @@ -1,132 +1,21 @@ -# OTel logo OpenTelemetry Demo - -[![Slack](https://img.shields.io/badge/slack-@cncf/otel/demo-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C03B4CWV4DA) -[![Version](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-demo?color=blueviolet)](https://github.com/open-telemetry/opentelemetry-demo/releases) -[![Commits](https://img.shields.io/github/commits-since/open-telemetry/opentelemetry-demo/latest?color=ff69b4&include_prereleases)](https://github.com/open-telemetry/opentelemetry-demo/graphs/commit-activity) -[![Downloads](https://img.shields.io/docker/pulls/otel/demo)](https://hub.docker.com/r/otel/demo) -[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=red)](https://github.com/open-telemetry/opentelemetry-demo/blob/main/LICENSE) ## Welcome to the OpenTelemetry Astronomy Shop Demo -This repository contains the OpenTelemetry Astronomy Shop, a microservice-based +This repository contains a fork of the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in -a near real-world environment. - -Our goals are threefold: - -- Provide a realistic example of a distributed system that can be used to - demonstrate OpenTelemetry instrumentation and observability. -- Build a base for vendors, tooling authors, and others to extend and - demonstrate their OpenTelemetry integrations. -- Create a living example for OpenTelemetry contributors to use for testing new - versions of the API, SDK, and other components or enhancements. - -We've already made [huge -progress](https://github.com/open-telemetry/opentelemetry-demo/blob/main/CHANGELOG.md), -and development is ongoing. We hope to represent the full feature set of -OpenTelemetry across its languages in the future. - -If you'd like to help (**which we would love**), check out our [contributing -guidance](./CONTRIBUTING.md). - -If you'd like to extend this demo or maintain a fork of it, read our -[fork guidance](https://opentelemetry.io/docs/demo/forking/). +a near real-world environment. It includes customizations for use with Splunk Observability Cloud. ## Quick start You can be up and running with the demo in a few minutes. Check out the docs for your preferred deployment method: -- [Docker](https://opentelemetry.io/docs/demo/docker_deployment/) -- [Kubernetes](https://opentelemetry.io/docs/demo/kubernetes_deployment/) +- [Docker](https://lantern.splunk.com/Data_Descriptors/Docker/Setting_up_the_OpenTelemetry_Demo_in_Docker) +- [Kubernetes](https://lantern.splunk.com/Data_Descriptors/Kubernetes/Setting_up_the_OpenTelemetry_Demo_in_Kubernetes) ## Documentation For detailed documentation, see [Demo Documentation][docs]. If you're curious about a specific feature, the [docs landing page][docs] can point you in the right direction. - -## Demos featuring the Astronomy Shop - -We welcome any vendor to fork the project to demonstrate their services and -adding a link below. The community is committed to maintaining the project and -keeping it up to date for you. - -| | | | -|-----------------------------------------|-----------------------------|----------------------------------------------------------------| -| [AlibabaCloud LogService][AlibabaCloud] | [Elastic][Elastic] | [OpenSearch][OpenSearch] | -| [AppDynamics][AppDynamics] | [Grafana Labs][GrafanaLabs] | [Sentry][Sentry] | -| [Aspecto][Aspecto] | [Guance][Guance] | [ServiceNow Cloud Observability][ServiceNowCloudObservability] | -| [Axiom][Axiom] | [Helios][Helios] | [Splunk][Splunk] | -| [Axoflow][Axoflow] | [Honeycomb.io][Honeycombio] | [Sumo Logic][SumoLogic] | -| [Azure Data Explorer][Azure] | [Instana][Instana] | [TelemetryHub][TelemetryHub] | -| [Coralogix][Coralogix] | [Kloudfuse][Kloudfuse] | [Teletrace][Teletrace] | -| [Datadog][Datadog] | [Logz.io][Logzio] | [Tracetest][Tracetest] | -| [Dynatrace][Dynatrace] | [New Relic][NewRelic] | [Uptrace][Uptrace] | - -## Contributing - -To get involved with the project see our [CONTRIBUTING](CONTRIBUTING.md) -documentation. Our [SIG Calls](CONTRIBUTING.md#join-a-sig-call) are every other -Monday at 8:30 AM PST and anyone is welcome. - -## Project leadership - -[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer) -([@open-telemetry/demo-maintainers](https://github.com/orgs/open-telemetry/teams/demo-maintainers)): - -- [Austin Parker](https://github.com/austinlparker), Honeycomb -- [Carter Socha](https://github.com/cartersocha), Lightstep -- [Juliano Costa](https://github.com/julianocosta89), Dynatrace -- [Pierre Tessier](https://github.com/puckpuck), Honeycomb - -[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver) -([@open-telemetry/demo-approvers](https://github.com/orgs/open-telemetry/teams/demo-approvers)): - -- [Cedric Ziel](https://github.com/cedricziel) Grafana Labs -- [Mikko Viitanen](https://github.com/mviitane), Dynatrace -- [Penghan Wang](https://github.com/wph95), AppDynamics -- [Reiley Yang](https://github.com/reyang), Microsoft -- [Ziqi Zhao](https://github.com/fatsheep9146), Alibaba - -Emeritus: - -- [Michael Maxwell](https://github.com/mic-max) -- [Morgan McLean](https://github.com/mtwo) - -### Thanks to all the people who have contributed - -[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-demo)](https://github.com/open-telemetry/opentelemetry-demo/graphs/contributors) - -[docs]: https://opentelemetry.io/docs/demo/ - - - -[AlibabaCloud]: https://github.com/aliyun-sls/opentelemetry-demo -[AppDynamics]: https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/ -[Aspecto]: https://github.com/aspecto-io/opentelemetry-demo -[Axiom]: https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces -[Axoflow]: https://axoflow.com/opentelemetry-support-in-more-detail-in-axosyslog-and-syslog-ng/ -[Azure]: https://github.com/Azure/Azure-kusto-opentelemetry-demo -[Coralogix]: https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix -[Datadog]: https://github.com/DataDog/opentelemetry-demo -[Dynatrace]: https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/ -[Elastic]: https://github.com/elastic/opentelemetry-demo -[GrafanaLabs]: https://github.com/grafana/opentelemetry-demo -[Guance]: https://github.com/GuanceCloud/opentelemetry-demo -[Helios]: https://otelsandbox.gethelios.dev -[Honeycombio]: https://github.com/honeycombio/opentelemetry-demo -[Instana]: https://github.com/instana/opentelemetry-demo -[Kloudfuse]: https://github.com/kloudfuse/opentelemetry-demo -[Logzio]: https://logz.io/learn/how-to-run-opentelemetry-demo-with-logz-io/ -[NewRelic]: https://github.com/newrelic/opentelemetry-demo -[OpenSearch]: https://github.com/opensearch-project/opentelemetry-demo -[Sentry]: https://github.com/getsentry/opentelemetry-demo -[ServiceNowCloudObservability]: https://docs.lightstep.com/otel/quick-start-operator#send-data-from-the-opentelemetry-demo -[Splunk]: https://github.com/signalfx/opentelemetry-demo -[SumoLogic]: https://www.sumologic.com/blog/common-opentelemetry-demo-application/ -[TelemetryHub]: https://github.com/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend -[Teletrace]: https://github.com/teletrace/opentelemetry-demo -[Tracetest]: https://github.com/kubeshop/opentelemetry-demo -[Uptrace]: https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo From 1e020cc7252d9ec6ed47fb2c6aa933e6f5066b14 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Mon, 11 Dec 2023 13:27:09 -0800 Subject: [PATCH 13/22] updated to automate chnages to docker-compose.yml --- README.md | 119 ++++- docker-compose.filelog.yml | 898 ---------------------------------- docker-compose.fluentd.yml | 899 ----------------------------------- docker-compose.yml | 95 ++-- splunk/README.md | 15 + splunk/update-demos.sh | 55 +++ src/fluentd/conf/fluent.conf | 30 -- 7 files changed, 218 insertions(+), 1893 deletions(-) delete mode 100644 docker-compose.filelog.yml delete mode 100644 docker-compose.fluentd.yml create mode 100644 splunk/README.md create mode 100755 splunk/update-demos.sh delete mode 100644 src/fluentd/conf/fluent.conf diff --git a/README.md b/README.md index daa09e35b2..a4286093db 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,132 @@ +# OTel logo OpenTelemetry Demo + +[![Slack](https://img.shields.io/badge/slack-@cncf/otel/demo-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C03B4CWV4DA) +[![Version](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-demo?color=blueviolet)](https://github.com/open-telemetry/opentelemetry-demo/releases) +[![Commits](https://img.shields.io/github/commits-since/open-telemetry/opentelemetry-demo/latest?color=ff69b4&include_prereleases)](https://github.com/open-telemetry/opentelemetry-demo/graphs/commit-activity) +[![Downloads](https://img.shields.io/docker/pulls/otel/demo)](https://hub.docker.com/r/otel/demo) +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=red)](https://github.com/open-telemetry/opentelemetry-demo/blob/main/LICENSE) ## Welcome to the OpenTelemetry Astronomy Shop Demo -This repository contains a fork of the OpenTelemetry Astronomy Shop, a microservice-based +This repository contains the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in -a near real-world environment. It includes customizations for use with Splunk Observability Cloud. +a near real-world environment. + +Our goals are threefold: + +- Provide a realistic example of a distributed system that can be used to + demonstrate OpenTelemetry instrumentation and observability. +- Build a base for vendors, tooling authors, and others to extend and + demonstrate their OpenTelemetry integrations. +- Create a living example for OpenTelemetry contributors to use for testing new + versions of the API, SDK, and other components or enhancements. + +We've already made [huge +progress](https://github.com/open-telemetry/opentelemetry-demo/blob/main/CHANGELOG.md), +and development is ongoing. We hope to represent the full feature set of +OpenTelemetry across its languages in the future. + +If you'd like to help (**which we would love**), check out our [contributing +guidance](./CONTRIBUTING.md). + +If you'd like to extend this demo or maintain a fork of it, read our +[fork guidance](https://opentelemetry.io/docs/demo/forking/). ## Quick start You can be up and running with the demo in a few minutes. Check out the docs for your preferred deployment method: -- [Docker](https://lantern.splunk.com/Data_Descriptors/Docker/Setting_up_the_OpenTelemetry_Demo_in_Docker) -- [Kubernetes](https://lantern.splunk.com/Data_Descriptors/Kubernetes/Setting_up_the_OpenTelemetry_Demo_in_Kubernetes) +- [Docker](https://opentelemetry.io/docs/demo/docker_deployment/) +- [Kubernetes](https://opentelemetry.io/docs/demo/kubernetes_deployment/) ## Documentation For detailed documentation, see [Demo Documentation][docs]. If you're curious about a specific feature, the [docs landing page][docs] can point you in the right direction. + +## Demos featuring the Astronomy Shop + +We welcome any vendor to fork the project to demonstrate their services and +adding a link below. The community is committed to maintaining the project and +keeping it up to date for you. + +| | | | +|-----------------------------------------|-----------------------------|----------------------------------------------------------------| +| [AlibabaCloud LogService][AlibabaCloud] | [Elastic][Elastic] | [OpenSearch][OpenSearch] | +| [AppDynamics][AppDynamics] | [Grafana Labs][GrafanaLabs] | [Sentry][Sentry] | +| [Aspecto][Aspecto] | [Guance][Guance] | [ServiceNow Cloud Observability][ServiceNowCloudObservability] | +| [Axiom][Axiom] | [Helios][Helios] | [Splunk][Splunk] | +| [Axoflow][Axoflow] | [Honeycomb.io][Honeycombio] | [Sumo Logic][SumoLogic] | +| [Azure Data Explorer][Azure] | [Instana][Instana] | [TelemetryHub][TelemetryHub] | +| [Coralogix][Coralogix] | [Kloudfuse][Kloudfuse] | [Teletrace][Teletrace] | +| [Datadog][Datadog] | [Logz.io][Logzio] | [Tracetest][Tracetest] | +| [Dynatrace][Dynatrace] | [New Relic][NewRelic] | [Uptrace][Uptrace] | + +## Contributing + +To get involved with the project see our [CONTRIBUTING](CONTRIBUTING.md) +documentation. Our [SIG Calls](CONTRIBUTING.md#join-a-sig-call) are every other +Monday at 8:30 AM PST and anyone is welcome. + +## Project leadership + +[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer) +([@open-telemetry/demo-maintainers](https://github.com/orgs/open-telemetry/teams/demo-maintainers)): + +- [Austin Parker](https://github.com/austinlparker), Honeycomb +- [Carter Socha](https://github.com/cartersocha), Lightstep +- [Juliano Costa](https://github.com/julianocosta89), Dynatrace +- [Pierre Tessier](https://github.com/puckpuck), Honeycomb + +[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver) +([@open-telemetry/demo-approvers](https://github.com/orgs/open-telemetry/teams/demo-approvers)): + +- [Cedric Ziel](https://github.com/cedricziel) Grafana Labs +- [Mikko Viitanen](https://github.com/mviitane), Dynatrace +- [Penghan Wang](https://github.com/wph95), AppDynamics +- [Reiley Yang](https://github.com/reyang), Microsoft +- [Ziqi Zhao](https://github.com/fatsheep9146), Alibaba + +Emeritus: + +- [Michael Maxwell](https://github.com/mic-max) +- [Morgan McLean](https://github.com/mtwo) + +### Thanks to all the people who have contributed + +[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-demo)](https://github.com/open-telemetry/opentelemetry-demo/graphs/contributors) + +[docs]: https://opentelemetry.io/docs/demo/ + + + +[AlibabaCloud]: https://github.com/aliyun-sls/opentelemetry-demo +[AppDynamics]: https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/ +[Aspecto]: https://github.com/aspecto-io/opentelemetry-demo +[Axiom]: https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces +[Axoflow]: https://axoflow.com/opentelemetry-support-in-more-detail-in-axosyslog-and-syslog-ng/ +[Azure]: https://github.com/Azure/Azure-kusto-opentelemetry-demo +[Coralogix]: https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix +[Datadog]: https://github.com/DataDog/opentelemetry-demo +[Dynatrace]: https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/ +[Elastic]: https://github.com/elastic/opentelemetry-demo +[GrafanaLabs]: https://github.com/grafana/opentelemetry-demo +[Guance]: https://github.com/GuanceCloud/opentelemetry-demo +[Helios]: https://otelsandbox.gethelios.dev +[Honeycombio]: https://github.com/honeycombio/opentelemetry-demo +[Instana]: https://github.com/instana/opentelemetry-demo +[Kloudfuse]: https://github.com/kloudfuse/opentelemetry-demo +[Logzio]: https://logz.io/learn/how-to-run-opentelemetry-demo-with-logz-io/ +[NewRelic]: https://github.com/newrelic/opentelemetry-demo +[OpenSearch]: https://github.com/opensearch-project/opentelemetry-demo +[Sentry]: https://github.com/getsentry/opentelemetry-demo +[ServiceNowCloudObservability]: https://docs.lightstep.com/otel/quick-start-operator#send-data-from-the-opentelemetry-demo +[Splunk]: https://github.com/signalfx/opentelemetry-demo +[SumoLogic]: https://www.sumologic.com/blog/common-opentelemetry-demo-application/ +[TelemetryHub]: https://github.com/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend +[Teletrace]: https://github.com/teletrace/opentelemetry-demo +[Tracetest]: https://github.com/kubeshop/opentelemetry-demo +[Uptrace]: https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo \ No newline at end of file diff --git a/docker-compose.filelog.yml b/docker-compose.filelog.yml deleted file mode 100644 index 3a88b2f2b0..0000000000 --- a/docker-compose.filelog.yml +++ /dev/null @@ -1,898 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -version: '3.9' -x-default-logging: &logging - driver: "json-file" - options: - max-size: "5m" - max-file: "2" - tag: "{{.Name}}|{{.ImageName}}|{{.ID}}" -networks: - default: - name: opentelemetry-demo - driver: bridge - -services: - # ****************** - # Core Demo Services - # ****************** - # Accounting service - accountingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - container_name: accounting-service - build: - context: ./ - dockerfile: ./src/accountingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=accountingservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # AdService - adservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - container_name: ad-service - build: - context: ./ - dockerfile: ./src/adservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - - ports: - - "${AD_SERVICE_PORT}" - environment: - - AD_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_LOGS_EXPORTER=otlp - - OTEL_SERVICE_NAME=adservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - - # Cart service - cartservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - container_name: cart-service - build: - context: ./ - dockerfile: ./src/cartservice/src/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - deploy: - resources: - limits: - memory: 160M - restart: unless-stopped - ports: - - "${CART_SERVICE_PORT}" - environment: - - CART_SERVICE_PORT - - REDIS_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=cartservice - - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} - depends_on: - redis-cart: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Checkout service - checkoutservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - container_name: checkout-service - build: - context: ./ - dockerfile: ./src/checkoutservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CHECKOUT_SERVICE_PORT}" - environment: - - CHECKOUT_SERVICE_PORT - - CART_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=checkoutservice - depends_on: - cartservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Currency service - currencyservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - container_name: currency-service - build: - context: ./src/currencyservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - args: - - GRPC_VERSION=1.46.0 - - OPENTELEMETRY_VERSION=1.5.0 - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CURRENCY_SERVICE_PORT}" - environment: - - CURRENCY_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Email service - emailservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - container_name: email-service - build: - context: ./src/emailservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - deploy: - resources: - limits: - memory: 100M - restart: unless-stopped - ports: - - "${EMAIL_SERVICE_PORT}" - environment: - - APP_ENV=production - - EMAIL_SERVICE_PORT - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=emailservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Feature Flag service - featureflagservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - container_name: feature-flag-service - build: - context: ./ - dockerfile: ./src/featureflagservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - deploy: - resources: - limits: - memory: 175M - restart: unless-stopped - ports: - - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API - environment: - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc - - OTEL_SERVICE_NAME=featureflagservice - - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs - healthcheck: - test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] - depends_on: - ffs_postgres: - condition: service_healthy - logging: *logging - - # Fraud Detection service - frauddetectionservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - container_name: frauddetection-service - build: - context: ./ - dockerfile: ./src/frauddetectionservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=frauddetectionservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Frontend - frontend: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - container_name: frontend - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - ports: - - "${FRONTEND_PORT}" - environment: - - PORT=${FRONTEND_PORT} - - FRONTEND_ADDR - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} - - ENV_PLATFORM - - OTEL_SERVICE_NAME=frontend - - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - WEB_OTEL_SERVICE_NAME=frontend-web - depends_on: - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - productcatalogservice: - condition: service_started - quoteservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Frontend Proxy (Envoy) - frontendproxy: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy - container_name: frontend-proxy - build: - context: ./ - dockerfile: src/frontendproxy/Dockerfile - deploy: - resources: - limits: - memory: 50M - ports: - - "${ENVOY_PORT}:${ENVOY_PORT}" - - 10000:10000 - environment: - - FRONTEND_PORT - - FRONTEND_HOST - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_SERVICE_HOST - - LOCUST_WEB_HOST - - LOCUST_WEB_PORT - - GRAFANA_SERVICE_PORT - - GRAFANA_SERVICE_HOST - - JAEGER_SERVICE_PORT - - JAEGER_SERVICE_HOST - - OTEL_COLLECTOR_HOST - - OTEL_COLLECTOR_PORT_GRPC - - OTEL_COLLECTOR_PORT_HTTP - - ENVOY_PORT - depends_on: - frontend: - condition: service_started - featureflagservice: - condition: service_started - loadgenerator: - condition: service_started - jaeger: - condition: service_started - grafana: - condition: service_started - - # Load Generator - loadgenerator: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - container_name: load-generator - build: - context: ./ - dockerfile: ./src/loadgenerator/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${LOCUST_WEB_PORT}" - environment: - - LOCUST_WEB_PORT - - LOCUST_USERS - - LOCUST_HOST - - LOCUST_HEADLESS - - LOCUST_AUTOSTART - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=loadgenerator - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - frontend: - condition: service_started - logging: *logging - - # Payment service - paymentservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - container_name: payment-service - build: - context: ./ - dockerfile: ./src/paymentservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${PAYMENT_SERVICE_PORT}" - environment: - - PAYMENT_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=paymentservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Product Catalog service - productcatalogservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - container_name: product-catalog-service - build: - context: ./ - dockerfile: ./src/productcatalogservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${PRODUCT_CATALOG_SERVICE_PORT}" - environment: - - PRODUCT_CATALOG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=productcatalogservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Quote service - quoteservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - container_name: quote-service - build: - context: ./ - dockerfile: ./src/quoteservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - deploy: - resources: - limits: - memory: 40M - restart: unless-stopped - ports: - - "${QUOTE_SERVICE_PORT}" - environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 - - OTEL_PHP_AUTOLOAD_ENABLED=true - - QUOTE_SERVICE_PORT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=quoteservice - - OTEL_PHP_INTERNAL_METRICS_ENABLED=true - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Recommendation service - recommendationservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - container_name: recommendation-service - build: - context: ./ - dockerfile: ./src/recommendationservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - deploy: - resources: - limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case - restart: unless-stopped - ports: - - "${RECOMMENDATION_SERVICE_PORT}" - environment: - - RECOMMENDATION_SERVICE_PORT - - PRODUCT_CATALOG_SERVICE_ADDR - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_PYTHON_LOG_CORRELATION=true - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=recommendationservice - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - featureflagservice: - condition: service_started - productcatalogservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Shipping service - shippingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - container_name: shipping-service - build: - context: ./ - dockerfile: ./src/shippingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${SHIPPING_SERVICE_PORT}" - environment: - - SHIPPING_SERVICE_PORT - - QUOTE_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=shippingservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # ****************** - # Dependent Services - # ****************** - # Postgres used by Feature Flag service - ffs_postgres: - image: postgres:16.0 - container_name: postgres - user: postgres - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - environment: - - POSTGRES_USER=ffs - - POSTGRES_DB=ffs - - POSTGRES_PASSWORD=ffs - healthcheck: - test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] - interval: 10s - timeout: 5s - retries: 5 - logging: *logging - - # Kafka used by Checkout, Accounting, and Fraud Detection services - kafka: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - container_name: kafka - build: - context: ./ - dockerfile: ./src/kafka/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - deploy: - resources: - limits: - memory: 500M - restart: unless-stopped - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=kafka - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - healthcheck: - test: nc -z kafka 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 - logging: *logging - - # Redis used by Cart service - redis-cart: - image: redis:7.2-alpine - container_name: redis-cart - user: redis - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${REDIS_PORT}" - logging: *logging - - - # ******************** - # Telemetry Components - # ******************** - # Jaeger - jaeger: - image: jaegertracing/all-in-one:1.51 - container_name: jaeger - command: - - "--memory.max-traces=8000" - - "--query.base-path=/jaeger/ui" - - "--prometheus.server-url=http://${PROMETHEUS_ADDR}" - - "--prometheus.query.normalize-calls=true" - - "--prometheus.query.normalize-duration=true" - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port - environment: - - METRICS_STORAGE_TYPE=prometheus - logging: *logging - - # Grafana - grafana: - image: grafana/grafana:10.2.0 - container_name: grafana - deploy: - resources: - limits: - memory: 100M - environment: - - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource" - volumes: - - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini - - ./src/grafana/provisioning/:/etc/grafana/provisioning/ - ports: - - "${GRAFANA_SERVICE_PORT}" - logging: *logging - - # OpenTelemetry Collector - otelcol: - image: quay.io/signalfx/splunk-otel-collector:latest - container_name: otel-col - user: 0:0 - environment: - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} - - ENVOY_PORT - deploy: - resources: - limits: - memory: 125M - restart: unless-stopped - command: [ "--config=/etc/splunk-otelcol-config.yml" ] - volumes: - - ./src/otelcollector/splunk-otelcol-config-filelog.yml:/etc/splunk-otelcol-config.yml - - ./logs:/logs - - ./checkpoint:/checkpoint - - /var/lib/docker/containers:/var/lib/docker/containers:ro - ports: - - "4317:4317" # OTLP over gRPC receiver - - "4318:4318" # OTLP over HTTP receiver - - "9464" # Prometheus exporter - - "8888" # metrics endpoint - - "13133" # health check - - "14250" # jaeger gRPC receiver - - "14268" # jaeger thrift receiver - - "6060" # http forward extension - - "9080" # SignalFx forwarder - - "9411" # Zipkin endpoint - - "9943" # SignalFx receiver - depends_on: - - jaeger - logging: *logging - - # Prometheus - prometheus: - image: quay.io/prometheus/prometheus:v2.47.2 - container_name: prometheus - command: - - --web.console.templates=/etc/prometheus/consoles - - --web.console.libraries=/etc/prometheus/console_libraries - - --storage.tsdb.retention.time=1h - - --config.file=/etc/prometheus/prometheus-config.yaml - - --storage.tsdb.path=/prometheus - - --web.enable-lifecycle - - --web.route-prefix=/ - - --enable-feature=exemplar-storage - - --enable-feature=otlp-write-receiver - volumes: - - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml - deploy: - resources: - limits: - memory: 300M - ports: - - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" - logging: *logging - - opensearch: - image: opensearchproject/opensearch:latest - container_name: opensearch - environment: - - cluster.name=demo-cluster - - node.name=demo-node - - bootstrap.memory_lock=true - - discovery.type=single-node - - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" - - "DISABLE_INSTALL_DEMO_CONFIG=true" - - "DISABLE_SECURITY_PLUGIN=true" - ulimits: - memlock: - soft: -1 - hard: -1 - nofile: - soft: 65536 - hard: 65536 - ports: - - "9200:9200" - logging: *logging - - dataprepper: - image: opensearchproject/data-prepper:latest - volumes: - - ./src/opensearch/pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml - - ./src/opensearch/data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml - ports: - - "21892" - logging: *logging - - # ***** - # Tests - # ***** - # Frontend Tests - frontendTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests - container_name: frontend-tests - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile.cypress - profiles: - - tests - volumes: - - ./src/frontend/cypress/videos:/app/cypress/videos - - ./src/frontend/cypress/screenshots:/app/cypress/screenshots - environment: - - CYPRESS_baseUrl=http://${FRONTEND_ADDR} - - FRONTEND_ADDR - - NODE_ENV=production - depends_on: - - frontend - - # Integration Tests - integrationTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests - container_name: integrationTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - depends_on: - - adservice - - cartservice - - checkoutservice - - currencyservice - - emailservice - - paymentservice - - productcatalogservice - - recommendationservice - - shippingservice - - quoteservice - - # Tracebased Tests - traceBasedTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests - container_name: traceBasedTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/tracetesting/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - FRONTEND_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - KAFKA_SERVICE_ADDR - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ./test/tracetesting:/app/test/tracetesting - - ./pb:/app/pb - depends_on: - tracetest-server: - condition: service_healthy - # adding demo services as dependencies - frontend: - condition: service_started - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - quoteservice: - condition: service_started - accountingservice: - condition: service_started - frauddetectionservice: - condition: service_started - - tracetest-server: - image: kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} - platform: linux/amd64 - container_name: tracetest-server - profiles: - - tests - - odd # Observabilty-Driven Development (ODD) - volumes: - - type: bind - source: ./test/tracetesting/tracetest-config.yaml - target: /app/tracetest.yaml - - type: bind - source: ./test/tracetesting/tracetest-provision.yaml - target: /app/provision.yaml - command: --provisioning-file /app/provision.yaml - ports: - - 11633:11633 - extra_hosts: - - "host.docker.internal:host-gateway" - depends_on: - tracetest-postgres: - condition: service_healthy - otelcol: - condition: service_started - healthcheck: - test: [ "CMD", "wget", "--spider", "localhost:11633" ] - interval: 1s - timeout: 3s - retries: 60 - - tracetest-postgres: - image: postgres:16.0 - container_name: tracetest-postgres - profiles: - - tests - - odd # Observabilty-Driven Development (ODD) - environment: - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - healthcheck: - test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" - interval: 1s - timeout: 5s - retries: 60 - ports: - - 5432 \ No newline at end of file diff --git a/docker-compose.fluentd.yml b/docker-compose.fluentd.yml deleted file mode 100644 index dfa1f483c8..0000000000 --- a/docker-compose.fluentd.yml +++ /dev/null @@ -1,899 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -version: '3.9' -x-default-logging: &logging - driver: "fluentd" - options: - fluentd-address: "localhost:24224" - fluentd-async: "true" - fluentd-retry-wait: 1s - fluentd-max-retries: 10 - -networks: - default: - name: opentelemetry-demo - driver: bridge - -services: - # ****************** - # Core Demo Services - # ****************** - # Accounting service - accountingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - container_name: accounting-service - build: - context: ./ - dockerfile: ./src/accountingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=accountingservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # AdService - adservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - container_name: ad-service - build: - context: ./ - dockerfile: ./src/adservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - - ports: - - "${AD_SERVICE_PORT}" - environment: - - AD_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_LOGS_EXPORTER=otlp - - OTEL_SERVICE_NAME=adservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - - # Cart service - cartservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - container_name: cart-service - build: - context: ./ - dockerfile: ./src/cartservice/src/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - deploy: - resources: - limits: - memory: 160M - restart: unless-stopped - ports: - - "${CART_SERVICE_PORT}" - environment: - - CART_SERVICE_PORT - - REDIS_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=cartservice - - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} - depends_on: - redis-cart: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Checkout service - checkoutservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - container_name: checkout-service - build: - context: ./ - dockerfile: ./src/checkoutservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CHECKOUT_SERVICE_PORT}" - environment: - - CHECKOUT_SERVICE_PORT - - CART_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=checkoutservice - depends_on: - cartservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Currency service - currencyservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - container_name: currency-service - build: - context: ./src/currencyservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - args: - - GRPC_VERSION=1.46.0 - - OPENTELEMETRY_VERSION=1.5.0 - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${CURRENCY_SERVICE_PORT}" - environment: - - CURRENCY_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Email service - emailservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - container_name: email-service - build: - context: ./src/emailservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - deploy: - resources: - limits: - memory: 100M - restart: unless-stopped - ports: - - "${EMAIL_SERVICE_PORT}" - environment: - - APP_ENV=production - - EMAIL_SERVICE_PORT - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=emailservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Feature Flag service - featureflagservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - container_name: feature-flag-service - build: - context: ./ - dockerfile: ./src/featureflagservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice - deploy: - resources: - limits: - memory: 175M - restart: unless-stopped - ports: - - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API - environment: - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc - - OTEL_SERVICE_NAME=featureflagservice - - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs - healthcheck: - test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] - depends_on: - ffs_postgres: - condition: service_healthy - logging: *logging - - # Fraud Detection service - frauddetectionservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - container_name: frauddetection-service - build: - context: ./ - dockerfile: ./src/frauddetectionservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - environment: - - KAFKA_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=frauddetectionservice - depends_on: - otelcol: - condition: service_started - kafka: - condition: service_healthy - logging: *logging - - # Frontend - frontend: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - container_name: frontend - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - deploy: - resources: - limits: - memory: 200M - restart: unless-stopped - ports: - - "${FRONTEND_PORT}" - environment: - - PORT=${FRONTEND_PORT} - - FRONTEND_ADDR - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} - - ENV_PLATFORM - - OTEL_SERVICE_NAME=frontend - - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - WEB_OTEL_SERVICE_NAME=frontend-web - depends_on: - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - productcatalogservice: - condition: service_started - quoteservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Frontend Proxy (Envoy) - frontendproxy: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy - container_name: frontend-proxy - build: - context: ./ - dockerfile: src/frontendproxy/Dockerfile - deploy: - resources: - limits: - memory: 50M - ports: - - "${ENVOY_PORT}:${ENVOY_PORT}" - - 10000:10000 - environment: - - FRONTEND_PORT - - FRONTEND_HOST - - FEATURE_FLAG_SERVICE_PORT - - FEATURE_FLAG_SERVICE_HOST - - LOCUST_WEB_HOST - - LOCUST_WEB_PORT - - GRAFANA_SERVICE_PORT - - GRAFANA_SERVICE_HOST - - JAEGER_SERVICE_PORT - - JAEGER_SERVICE_HOST - - OTEL_COLLECTOR_HOST - - OTEL_COLLECTOR_PORT_GRPC - - OTEL_COLLECTOR_PORT_HTTP - - ENVOY_PORT - depends_on: - frontend: - condition: service_started - featureflagservice: - condition: service_started - loadgenerator: - condition: service_started - jaeger: - condition: service_started - grafana: - condition: service_started - - # Load Generator - loadgenerator: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - container_name: load-generator - build: - context: ./ - dockerfile: ./src/loadgenerator/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${LOCUST_WEB_PORT}" - environment: - - LOCUST_WEB_PORT - - LOCUST_USERS - - LOCUST_HOST - - LOCUST_HEADLESS - - LOCUST_AUTOSTART - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=loadgenerator - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - frontend: - condition: service_started - logging: *logging - - # Payment service - paymentservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - container_name: payment-service - build: - context: ./ - dockerfile: ./src/paymentservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - ports: - - "${PAYMENT_SERVICE_PORT}" - environment: - - PAYMENT_SERVICE_PORT - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=paymentservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Product Catalog service - productcatalogservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - container_name: product-catalog-service - build: - context: ./ - dockerfile: ./src/productcatalogservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${PRODUCT_CATALOG_SERVICE_PORT}" - environment: - - PRODUCT_CATALOG_SERVICE_PORT - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=productcatalogservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Quote service - quoteservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - container_name: quote-service - build: - context: ./ - dockerfile: ./src/quoteservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice - deploy: - resources: - limits: - memory: 40M - restart: unless-stopped - ports: - - "${QUOTE_SERVICE_PORT}" - environment: - - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 - - OTEL_PHP_AUTOLOAD_ENABLED=true - - QUOTE_SERVICE_PORT - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=quoteservice - - OTEL_PHP_INTERNAL_METRICS_ENABLED=true - depends_on: - otelcol: - condition: service_started - logging: *logging - - # Recommendation service - recommendationservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - container_name: recommendation-service - build: - context: ./ - dockerfile: ./src/recommendationservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - deploy: - resources: - limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case - restart: unless-stopped - ports: - - "${RECOMMENDATION_SERVICE_PORT}" - environment: - - RECOMMENDATION_SERVICE_PORT - - PRODUCT_CATALOG_SERVICE_ADDR - - FEATURE_FLAG_GRPC_SERVICE_ADDR - - OTEL_PYTHON_LOG_CORRELATION=true - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=recommendationservice - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - depends_on: - featureflagservice: - condition: service_started - productcatalogservice: - condition: service_started - otelcol: - condition: service_started - logging: *logging - - # Shipping service - shippingservice: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - container_name: shipping-service - build: - context: ./ - dockerfile: ./src/shippingservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${SHIPPING_SERVICE_PORT}" - environment: - - SHIPPING_SERVICE_PORT - - QUOTE_SERVICE_ADDR - - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=shippingservice - depends_on: - otelcol: - condition: service_started - logging: *logging - - # ****************** - # Dependent Services - # ****************** - # Postgres used by Feature Flag service - ffs_postgres: - image: postgres:16.0 - container_name: postgres - user: postgres - deploy: - resources: - limits: - memory: 120M - restart: unless-stopped - environment: - - POSTGRES_USER=ffs - - POSTGRES_DB=ffs - - POSTGRES_PASSWORD=ffs - healthcheck: - test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] - interval: 10s - timeout: 5s - retries: 5 - logging: *logging - - # Kafka used by Checkout, Accounting, and Fraud Detection services - kafka: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - container_name: kafka - build: - context: ./ - dockerfile: ./src/kafka/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka - deploy: - resources: - limits: - memory: 500M - restart: unless-stopped - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=kafka - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - healthcheck: - test: nc -z kafka 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 - logging: *logging - - # Redis used by Cart service - redis-cart: - image: redis:7.2-alpine - container_name: redis-cart - user: redis - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped - ports: - - "${REDIS_PORT}" - logging: *logging - - - # ******************** - # Telemetry Components - # ******************** - # Jaeger - jaeger: - image: jaegertracing/all-in-one:1.51 - container_name: jaeger - command: - - "--memory.max-traces=8000" - - "--query.base-path=/jaeger/ui" - - "--prometheus.server-url=http://${PROMETHEUS_ADDR}" - - "--prometheus.query.normalize-calls=true" - - "--prometheus.query.normalize-duration=true" - deploy: - resources: - limits: - memory: 300M - restart: unless-stopped - ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port - environment: - - METRICS_STORAGE_TYPE=prometheus - logging: *logging - - # Grafana - grafana: - image: grafana/grafana:10.2.0 - container_name: grafana - deploy: - resources: - limits: - memory: 100M - environment: - - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource" - volumes: - - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini - - ./src/grafana/provisioning/:/etc/grafana/provisioning/ - ports: - - "${GRAFANA_SERVICE_PORT}" - logging: *logging - - # OpenTelemetry Collector - otelcol: - image: quay.io/signalfx/splunk-otel-collector:latest - container_name: otel-col - environment: - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} - - ENVOY_PORT - deploy: - resources: - limits: - memory: 125M - restart: unless-stopped - command: [ "--config=/etc/splunk-otelcol-config.yml" ] - volumes: - - ./src/otelcollector/splunk-otelcol-config-fluentd.yml:/etc/splunk-otelcol-config.yml - - ./logs:/logs - - ./checkpoint:/checkpoint - ports: - - "4317:4317" # OTLP over gRPC receiver - - "4318:4318" # OTLP over HTTP receiver - - "9464" # Prometheus exporter - - "8888" # metrics endpoint - - "13133" # health check - - "14250" # jaeger gRPC receiver - - "14268" # jaeger thrift receiver - - "6060" # http forward extension - - "9080" # SignalFx forwarder - - "9411" # Zipkin endpoint - - "9943" # SignalFx receiver - - "24224:24224" # Fluentforward receiver - depends_on: - - jaeger - logging: *logging - - # Prometheus - prometheus: - image: quay.io/prometheus/prometheus:v2.47.2 - container_name: prometheus - command: - - --web.console.templates=/etc/prometheus/consoles - - --web.console.libraries=/etc/prometheus/console_libraries - - --storage.tsdb.retention.time=1h - - --config.file=/etc/prometheus/prometheus-config.yaml - - --storage.tsdb.path=/prometheus - - --web.enable-lifecycle - - --web.route-prefix=/ - - --enable-feature=exemplar-storage - - --enable-feature=otlp-write-receiver - volumes: - - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml - deploy: - resources: - limits: - memory: 300M - ports: - - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" - logging: *logging - - opensearch: - image: opensearchproject/opensearch:latest - container_name: opensearch - environment: - - cluster.name=demo-cluster - - node.name=demo-node - - bootstrap.memory_lock=true - - discovery.type=single-node - - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" - - "DISABLE_INSTALL_DEMO_CONFIG=true" - - "DISABLE_SECURITY_PLUGIN=true" - ulimits: - memlock: - soft: -1 - hard: -1 - nofile: - soft: 65536 - hard: 65536 - ports: - - "9200:9200" - logging: *logging - - dataprepper: - image: opensearchproject/data-prepper:latest - volumes: - - ./src/opensearch/pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml - - ./src/opensearch/data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml - ports: - - "21892" - logging: *logging - - # ***** - # Tests - # ***** - # Frontend Tests - frontendTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests - container_name: frontend-tests - build: - context: ./ - dockerfile: ./src/frontend/Dockerfile.cypress - profiles: - - tests - volumes: - - ./src/frontend/cypress/videos:/app/cypress/videos - - ./src/frontend/cypress/screenshots:/app/cypress/screenshots - environment: - - CYPRESS_baseUrl=http://${FRONTEND_ADDR} - - FRONTEND_ADDR - - NODE_ENV=production - depends_on: - - frontend - - # Integration Tests - integrationTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests - container_name: integrationTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - depends_on: - - adservice - - cartservice - - checkoutservice - - currencyservice - - emailservice - - paymentservice - - productcatalogservice - - recommendationservice - - shippingservice - - quoteservice - - # Tracebased Tests - traceBasedTests: - image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests - container_name: traceBasedTests - profiles: - - tests - build: - context: ./ - dockerfile: ./test/tracetesting/Dockerfile - environment: - - AD_SERVICE_ADDR - - CART_SERVICE_ADDR - - CHECKOUT_SERVICE_ADDR - - CURRENCY_SERVICE_ADDR - - EMAIL_SERVICE_ADDR - - FRONTEND_ADDR - - PAYMENT_SERVICE_ADDR - - PRODUCT_CATALOG_SERVICE_ADDR - - RECOMMENDATION_SERVICE_ADDR - - SHIPPING_SERVICE_ADDR - - KAFKA_SERVICE_ADDR - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ./test/tracetesting:/app/test/tracetesting - - ./pb:/app/pb - depends_on: - tracetest-server: - condition: service_healthy - # adding demo services as dependencies - frontend: - condition: service_started - adservice: - condition: service_started - cartservice: - condition: service_started - checkoutservice: - condition: service_started - currencyservice: - condition: service_started - emailservice: - condition: service_started - paymentservice: - condition: service_started - productcatalogservice: - condition: service_started - recommendationservice: - condition: service_started - shippingservice: - condition: service_started - quoteservice: - condition: service_started - accountingservice: - condition: service_started - frauddetectionservice: - condition: service_started - - tracetest-server: - image: kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} - platform: linux/amd64 - container_name: tracetest-server - profiles: - - tests - - odd # Observabilty-Driven Development (ODD) - volumes: - - type: bind - source: ./test/tracetesting/tracetest-config.yaml - target: /app/tracetest.yaml - - type: bind - source: ./test/tracetesting/tracetest-provision.yaml - target: /app/provision.yaml - command: --provisioning-file /app/provision.yaml - ports: - - 11633:11633 - extra_hosts: - - "host.docker.internal:host-gateway" - depends_on: - tracetest-postgres: - condition: service_healthy - otelcol: - condition: service_started - healthcheck: - test: [ "CMD", "wget", "--spider", "localhost:11633" ] - interval: 1s - timeout: 3s - retries: 60 - - tracetest-postgres: - image: postgres:16.0 - container_name: tracetest-postgres - profiles: - - tests - - odd # Observabilty-Driven Development (ODD) - environment: - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - healthcheck: - test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" - interval: 1s - timeout: 5s - retries: 60 - ports: - - 5432 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0d776d7450..f7b8f952b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,10 @@ x-default-logging: &logging options: max-size: "5m" max-file: "2" - networks: default: name: opentelemetry-demo driver: bridge - services: # ****************** # Core Demo Services @@ -43,7 +41,6 @@ services: kafka: condition: service_healthy logging: *logging - # AdService adservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice @@ -72,7 +69,6 @@ services: otelcol: condition: service_started logging: *logging - # Cart service cartservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice @@ -102,7 +98,6 @@ services: otelcol: condition: service_started logging: *logging - # Checkout service checkoutservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice @@ -150,7 +145,6 @@ services: kafka: condition: service_healthy logging: *logging - # Currency service currencyservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice @@ -172,12 +166,11 @@ services: environment: - CURRENCY_SERVICE_PORT - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME depends_on: otelcol: condition: service_started logging: *logging - # Email service emailservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice @@ -203,7 +196,6 @@ services: otelcol: condition: service_started logging: *logging - # Feature Flag service featureflagservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice @@ -219,8 +211,8 @@ services: memory: 175M restart: unless-stopped ports: - - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API environment: - FEATURE_FLAG_SERVICE_PORT - FEATURE_FLAG_GRPC_SERVICE_PORT @@ -234,7 +226,6 @@ services: ffs_postgres: condition: service_healthy logging: *logging - # Fraud Detection service frauddetectionservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice @@ -261,7 +252,6 @@ services: kafka: condition: service_healthy logging: *logging - # Frontend frontend: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend @@ -315,7 +305,6 @@ services: otelcol: condition: service_started logging: *logging - # Frontend Proxy (Envoy) frontendproxy: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy @@ -356,7 +345,6 @@ services: condition: service_started grafana: condition: service_started - # Load Generator loadgenerator: image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator @@ -369,7 +357,7 @@ services: deploy: resources: limits: - memory: 120M + memory: 1G restart: unless-stopped ports: - "${LOCUST_WEB_PORT}" @@ -379,6 +367,7 @@ services: - LOCUST_HOST - LOCUST_HEADLESS - LOCUST_AUTOSTART + - LOCUST_BROWSER_TRAFFIC_ENABLED - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -388,7 +377,6 @@ services: frontend: condition: service_started logging: *logging - # Payment service paymentservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice @@ -415,7 +403,6 @@ services: otelcol: condition: service_started logging: *logging - # Product Catalog service productcatalogservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice @@ -443,7 +430,6 @@ services: otelcol: condition: service_started logging: *logging - # Quote service quoteservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice @@ -471,7 +457,6 @@ services: otelcol: condition: service_started logging: *logging - # Recommendation service recommendationservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice @@ -484,7 +469,7 @@ services: deploy: resources: limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case restart: unless-stopped ports: - "${RECOMMENDATION_SERVICE_PORT}" @@ -506,7 +491,6 @@ services: otelcol: condition: service_started logging: *logging - # Shipping service shippingservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice @@ -533,7 +517,6 @@ services: otelcol: condition: service_started logging: *logging - # ****************** # Dependent Services # ****************** @@ -557,7 +540,6 @@ services: timeout: 5s retries: 5 logging: *logging - # Kafka used by Checkout, Accounting, and Fraud Detection services kafka: image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka @@ -586,7 +568,6 @@ services: timeout: 10s retries: 10 logging: *logging - # Redis used by Cart service redis-cart: image: redis:7.2-alpine @@ -600,8 +581,6 @@ services: ports: - "${REDIS_PORT}" logging: *logging - - # ******************** # Telemetry Components # ******************** @@ -621,12 +600,11 @@ services: memory: 300M restart: unless-stopped ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port environment: - METRICS_STORAGE_TYPE=prometheus logging: *logging - # Grafana grafana: image: grafana/grafana:10.2.0 @@ -643,44 +621,42 @@ services: ports: - "${GRAFANA_SERVICE_PORT}" logging: *logging - # OpenTelemetry Collector otelcol: image: quay.io/signalfx/splunk-otel-collector:latest container_name: otel-col - environment: - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} - - ENVOY_PORT deploy: resources: limits: memory: 125M restart: unless-stopped - command: [ "--config=/etc/splunk-otelcol-config.yml" ] + command: ["--config=/etc/splunk-otelcol-config.yml"] volumes: - ./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml - ./logs:/logs - ./checkpoint:/checkpoint ports: - - "4317:4317" # OTLP over gRPC receiver - - "4318:4318" # OTLP over HTTP receiver - - "9464" # Prometheus exporter - - "8888" # metrics endpoint - - "13133" # health check - - "14250" # jaeger gRPC receiver - - "14268" # jaeger thrift receiver - - "6060" # http forward extension - - "9080" # SignalFx forwarder - - "9411" # Zipkin endpoint - - "9943" # SignalFx receiver + - "4317" # OTLP over gRPC receiver + - "4318" # OTLP over HTTP receiver + - "9464" + - "8888" + - "13133" + - "14250" + - "14268" + - "6060" + - "9080" + - "9411" + - "9943" depends_on: - jaeger logging: *logging - + environment: + - ENVOY_PORT + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} # Prometheus prometheus: image: quay.io/prometheus/prometheus:v2.47.2 @@ -704,7 +680,6 @@ services: ports: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging - opensearch: image: opensearchproject/opensearch:latest container_name: opensearch @@ -726,7 +701,6 @@ services: ports: - "9200:9200" logging: *logging - dataprepper: image: opensearchproject/data-prepper:latest volumes: @@ -735,7 +709,6 @@ services: ports: - "21892" logging: *logging - # ***** # Tests # ***** @@ -757,7 +730,6 @@ services: - NODE_ENV=production depends_on: - frontend - # Integration Tests integrationTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests @@ -788,7 +760,6 @@ services: - recommendationservice - shippingservice - quoteservice - # Tracebased Tests traceBasedTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests @@ -798,6 +769,8 @@ services: build: context: ./ dockerfile: ./test/tracetesting/Dockerfile + args: + - TRACETEST_IMAGE_VERSION environment: - AD_SERVICE_ADDR - CART_SERVICE_ADDR @@ -845,14 +818,13 @@ services: condition: service_started frauddetectionservice: condition: service_started - tracetest-server: image: kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} platform: linux/amd64 container_name: tracetest-server profiles: - tests - - odd # Observabilty-Driven Development (ODD) + - odd # Observabilty-Driven Development (ODD) volumes: - type: bind source: ./test/tracetesting/tracetest-config.yaml @@ -871,17 +843,16 @@ services: otelcol: condition: service_started healthcheck: - test: [ "CMD", "wget", "--spider", "localhost:11633" ] + test: ["CMD", "wget", "--spider", "localhost:11633"] interval: 1s timeout: 3s retries: 60 - tracetest-postgres: image: postgres:16.0 container_name: tracetest-postgres profiles: - tests - - odd # Observabilty-Driven Development (ODD) + - odd # Observabilty-Driven Development (ODD) environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres @@ -891,4 +862,4 @@ services: timeout: 5s retries: 60 ports: - - 5432 \ No newline at end of file + - 5432 diff --git a/splunk/README.md b/splunk/README.md new file mode 100644 index 0000000000..0a76331122 --- /dev/null +++ b/splunk/README.md @@ -0,0 +1,15 @@ + + +## Welcome to the OpenTelemetry Astronomy Shop Demo + +This repository contains a fork of the OpenTelemetry Astronomy Shop, a microservice-based +distributed system intended to illustrate the implementation of OpenTelemetry in +a near real-world environment. It includes customizations for use with Splunk Observability Cloud. + +## Quick start + +You can be up and running with the demo in a few minutes. Check out the docs for +your preferred deployment method: + +- [Docker](https://lantern.splunk.com/Data_Descriptors/Docker/Setting_up_the_OpenTelemetry_Demo_in_Docker) +- [Kubernetes](https://lantern.splunk.com/Data_Descriptors/Kubernetes/Setting_up_the_OpenTelemetry_Demo_in_Kubernetes) diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh new file mode 100755 index 0000000000..f2282cddfd --- /dev/null +++ b/splunk/update-demos.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +set -euo pipefail +# Purpose: Update demo applications with the latest upstream changes. +# Notes: +# This script performs updates for the OpenTelemetry Demo. +# Requirements: +# - yq: A portable command-line YAML processor. +# Both can be installed using brew: +# brew install yq +# +# Example Usage: +# ./update_demos.sh + +# Set default paths if environment variables are not set +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +function update_otel_demo_docker { + DOCKER_COMPOSE_PATH=${DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../docker-compose.yml"} + + # Download the YAML file + curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/docker-compose.yml \ + > "$DOCKER_COMPOSE_PATH" + + # replace the OpenTelemetry collector image with the Splunk distribution + yq eval -i '.services.otelcol.image = "quay.io/signalfx/splunk-otel-collector:latest"' "$DOCKER_COMPOSE_PATH" + + # add environment variables required by the Splunk distro of the OpenTelemetry collector + yq eval -i '.services.otelcol.environment += [ "SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN}" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_REALM=${SPLUNK_REALM}" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_URL=${SPLUNK_HEC_URL}" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB}" ]' "$DOCKER_COMPOSE_PATH" + + # update the command used to launch the collector to point to the Splunk-specific config + yq eval -i '.services.otelcol.command[0] = "--config=/etc/splunk-otelcol-config.yml" ' "$DOCKER_COMPOSE_PATH" + yq eval -i 'del(.services.otelcol.command[1])' "$DOCKER_COMPOSE_PATH" + + yq eval -i '.services.otelcol.volumes = [ "./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml", "./logs:/logs", "./checkpoint:/checkpoint" ]' "$DOCKER_COMPOSE_PATH" + + # add ports used by the Splunk distro of the OpenTelemetry collector + yq eval -i '.services.otelcol.ports += [ "9464" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "8888" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "13133" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "14250" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "14268" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "6060" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9080" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9411" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9943" ]' "$DOCKER_COMPOSE_PATH" + + echo "OpenTelemetry Demo update completed!" +} + +# ---- OpenTelemetry Demo Update ---- +update_otel_demo_docker diff --git a/src/fluentd/conf/fluent.conf b/src/fluentd/conf/fluent.conf deleted file mode 100644 index 22ed7ca7bb..0000000000 --- a/src/fluentd/conf/fluent.conf +++ /dev/null @@ -1,30 +0,0 @@ -@include conf.d/*.conf - - - @type forward - port 24224 - bind 0.0.0.0 - - - - @type forward - heartbeat_type udp - - host otelcol - port 8006 - - - @type memory - total_limit_size 600m - chunk_limit_size 1m - chunk_limit_records 100000 - flush_interval 5s - flush_thread_count 1 - overflow_action block - retry_max_times 3 - - - - - log_level info - From 8e03f74fcfc073060480c43e7fb04bfcbd4d1634 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Mon, 11 Dec 2023 17:26:39 -0800 Subject: [PATCH 14/22] automated merge of k8s config --- kubernetes/opentelemetry-demo.yaml | 1626 +++++++++++----------------- splunk/update-demos.sh | 42 +- 2 files changed, 684 insertions(+), 984 deletions(-) diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index 7e1bc2432b..625e2fe703 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -12,6 +12,10 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana namespace: otel-demo +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-sa.yaml apiVersion: v1 @@ -23,6 +27,10 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "1.51.0" app.kubernetes.io/component: all-in-one +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml apiVersion: v1 @@ -36,8 +44,11 @@ metadata: app.kubernetes.io/part-of: prometheus name: opentelemetry-demo-prometheus-server namespace: otel-demo - annotations: - {} + annotations: {} +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/serviceaccount.yaml apiVersion: v1 @@ -45,12 +56,15 @@ kind: ServiceAccount metadata: name: opentelemetry-demo labels: - opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/secret.yaml apiVersion: v1 @@ -67,6 +81,10 @@ data: admin-user: "YWRtaW4=" admin-password: "YWRtaW4=" ldap-toml: "" +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml apiVersion: v1 @@ -134,6 +152,10 @@ data: path: /var/lib/grafana/dashboards/default orgId: 1 type: file +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml apiVersion: v1 @@ -168,6 +190,10 @@ data: {} rules: | {} +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/grafana-dashboards.yaml apiVersion: v1 @@ -175,7 +201,6 @@ kind: ConfigMap metadata: name: opentelemetry-demo-grafana-dashboards labels: - opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo @@ -7602,6 +7627,10 @@ data: "version": 1, "weekStart": "" } +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml kind: ClusterRole @@ -7613,6 +7642,10 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana-clusterrole rules: [] +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7633,6 +7666,10 @@ rules: - apiGroups: ["extensions"] resources: ["replicasets"] verbs: ["get", "list", "watch"] +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7683,6 +7720,10 @@ rules: - "/metrics" verbs: - get +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml kind: ClusterRoleBinding @@ -7701,6 +7742,10 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-grafana-clusterrole apiGroup: rbac.authorization.k8s.io +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7716,9 +7761,13 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-otelcol subjects: -- kind: ServiceAccount - name: opentelemetry-demo-otelcol - namespace: otel-demo + - kind: ServiceAccount + name: opentelemetry-demo-otelcol + namespace: otel-demo +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7739,6 +7788,10 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: opentelemetry-demo-prometheus-server +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/role.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7751,6 +7804,10 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "10.1.5" rules: [] +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7767,9 +7824,13 @@ roleRef: kind: Role name: opentelemetry-demo-grafana subjects: -- kind: ServiceAccount - name: opentelemetry-demo-grafana - namespace: otel-demo + - kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/service.yaml apiVersion: v1 @@ -7791,6 +7852,9 @@ spec: selector: app.kubernetes.io/name: grafana app.kubernetes.io/instance: opentelemetry-demo + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-agent-svc.yaml apiVersion: v1 @@ -7824,6 +7888,9 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-collector-svc.yaml apiVersion: v1 @@ -7860,6 +7927,9 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-query-svc.yaml apiVersion: v1 @@ -7884,6 +7954,9 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/service.yaml apiVersion: v1 @@ -7909,6 +7982,9 @@ spec: app.kubernetes.io/instance: opentelemetry-demo sessionAffinity: None type: "ClusterIP" + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -7916,7 +7992,6 @@ kind: Service metadata: name: opentelemetry-demo-adservice labels: - opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -7930,8 +8005,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-adservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -7939,7 +8016,6 @@ kind: Service metadata: name: opentelemetry-demo-cartservice labels: - opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -7953,8 +8029,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-cartservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -7962,7 +8040,6 @@ kind: Service metadata: name: opentelemetry-demo-checkoutservice labels: - opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -7976,8 +8053,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-checkoutservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -7985,7 +8064,6 @@ kind: Service metadata: name: opentelemetry-demo-currencyservice labels: - opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -7999,8 +8077,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-currencyservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8008,7 +8088,6 @@ kind: Service metadata: name: opentelemetry-demo-emailservice labels: - opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -8022,8 +8101,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-emailservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8031,7 +8112,6 @@ kind: Service metadata: name: opentelemetry-demo-featureflagservice labels: - opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -8048,8 +8128,10 @@ spec: name: http targetPort: 8081 selector: - opentelemetry.io/name: opentelemetry-demo-featureflagservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8057,7 +8139,6 @@ kind: Service metadata: name: opentelemetry-demo-ffspostgres labels: - opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -8071,8 +8152,10 @@ spec: name: postgres targetPort: 5432 selector: - opentelemetry.io/name: opentelemetry-demo-ffspostgres + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8080,7 +8163,6 @@ kind: Service metadata: name: opentelemetry-demo-frontend labels: - opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -8094,8 +8176,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-frontend + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8103,7 +8187,6 @@ kind: Service metadata: name: opentelemetry-demo-frontendproxy labels: - opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -8117,8 +8200,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-frontendproxy + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8126,7 +8211,6 @@ kind: Service metadata: name: opentelemetry-demo-kafka labels: - opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -8143,8 +8227,10 @@ spec: name: controller targetPort: 9093 selector: - opentelemetry.io/name: opentelemetry-demo-kafka + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8152,7 +8238,6 @@ kind: Service metadata: name: opentelemetry-demo-loadgenerator labels: - opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -8166,8 +8251,10 @@ spec: name: tcp-service targetPort: 8089 selector: - opentelemetry.io/name: opentelemetry-demo-loadgenerator + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8175,7 +8262,6 @@ kind: Service metadata: name: opentelemetry-demo-paymentservice labels: - opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -8189,8 +8275,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-paymentservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8198,7 +8286,6 @@ kind: Service metadata: name: opentelemetry-demo-productcatalogservice labels: - opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -8212,8 +8299,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-productcatalogservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8221,7 +8310,6 @@ kind: Service metadata: name: opentelemetry-demo-quoteservice labels: - opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -8235,8 +8323,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-quoteservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8244,7 +8334,6 @@ kind: Service metadata: name: opentelemetry-demo-recommendationservice labels: - opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -8258,8 +8347,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-recommendationservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8267,7 +8358,6 @@ kind: Service metadata: name: opentelemetry-demo-redis labels: - opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -8281,8 +8371,10 @@ spec: name: redis targetPort: 6379 selector: - opentelemetry.io/name: opentelemetry-demo-redis + template: + spec: + containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8290,7 +8382,6 @@ kind: Service metadata: name: opentelemetry-demo-shippingservice labels: - opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -8304,8 +8395,10 @@ spec: name: tcp-service targetPort: 8080 selector: - opentelemetry.io/name: opentelemetry-demo-shippingservice + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml apiVersion: apps/v1 @@ -8338,7 +8431,6 @@ spec: checksum/secret: f37dc127378b75e32576182571ac9b3826d217955ddda163afa1fde86c1cc056 kubectl.kubernetes.io/default-container: grafana spec: - serviceAccountName: opentelemetry-demo-grafana automountServiceAccountToken: true securityContext: @@ -8355,7 +8447,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL seccompProfile: type: RuntimeDefault volumeMounts: @@ -8405,6 +8497,10 @@ spec: value: /var/lib/grafana/plugins - name: GF_PATHS_PROVISIONING value: /etc/grafana/provisioning + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP livenessProbe: failureThreshold: 10 httpGet: @@ -8459,7 +8555,7 @@ spec: annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" - spec: + spec: containers: - env: - name: METRICS_STORAGE_TYPE @@ -8472,6 +8568,10 @@ spec: value: "false" - name: COLLECTOR_OTLP_ENABLED value: "true" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP image: jaegertracing/all-in-one:1.51.0 imagePullPolicy: IfNotPresent name: jaeger @@ -8562,7 +8662,6 @@ spec: enableServiceLinks: true serviceAccountName: opentelemetry-demo-prometheus-server containers: - - name: prometheus-server image: "quay.io/prometheus/prometheus:v2.47.2" imagePullPolicy: "IfNotPresent" @@ -8605,6 +8704,8 @@ spec: - name: storage-volume mountPath: /data subPath: "" + env: + name: NODE_IP dnsPolicy: ClusterFirst securityContext: fsGroup: 65534 @@ -8617,8 +8718,7 @@ spec: configMap: name: opentelemetry-demo-prometheus-server - name: storage-volume - emptyDir: - {} + emptyDir: {} --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: apps/v1 @@ -8626,7 +8726,6 @@ kind: Deployment metadata: name: opentelemetry-demo-accountingservice labels: - opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8637,12 +8736,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-accountingservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8654,52 +8751,31 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-accountingservice' imagePullPolicy: IfNotPresent env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -8709,7 +8785,6 @@ kind: Deployment metadata: name: opentelemetry-demo-adservice labels: - opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8720,12 +8795,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-adservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8737,51 +8810,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-adservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: AD_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTLP_LOGS_EXPORTER - value: otlp - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: AD_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_LOGS_EXPORTER + value: otlp + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 300Mi @@ -8792,7 +8844,6 @@ kind: Deployment metadata: name: opentelemetry-demo-cartservice labels: - opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8803,12 +8854,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-cartservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8820,62 +8869,40 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-cartservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CART_SERVICE_PORT - value: "8080" - - name: ASPNETCORE_URLS - value: http://*:$(CART_SERVICE_PORT) - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: REDIS_ADDR - value: 'opentelemetry-demo-redis:6379' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CART_SERVICE_PORT + value: "8080" + - name: ASPNETCORE_URLS + value: http://*:$(CART_SERVICE_PORT) + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: REDIS_ADDR + value: 'opentelemetry-demo-redis:6379' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 160Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting - for redis; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting for redis; sleep 2; done; image: busybox:latest name: wait-for-redis --- @@ -8885,7 +8912,6 @@ kind: Deployment metadata: name: opentelemetry-demo-checkoutservice labels: - opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8896,12 +8922,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-checkoutservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8913,70 +8937,48 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-checkoutservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CHECKOUT_SERVICE_PORT - value: "8080" - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: EMAIL_SERVICE_ADDR - value: http://opentelemetry-demo-emailservice:8080 - - name: PAYMENT_SERVICE_ADDR - value: 'opentelemetry-demo-paymentservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CHECKOUT_SERVICE_PORT + value: "8080" + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: EMAIL_SERVICE_ADDR + value: http://opentelemetry-demo-emailservice:8080 + - name: PAYMENT_SERVICE_ADDR + value: 'opentelemetry-demo-paymentservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -8986,7 +8988,6 @@ kind: Deployment metadata: name: opentelemetry-demo-currencyservice labels: - opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -8997,12 +8998,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-currencyservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9014,47 +9013,26 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-currencyservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CURRENCY_SERVICE_PORT - value: "8080" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CURRENCY_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -9065,7 +9043,6 @@ kind: Deployment metadata: name: opentelemetry-demo-emailservice labels: - opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9076,12 +9053,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-emailservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9093,49 +9068,28 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-emailservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: EMAIL_SERVICE_PORT - value: "8080" - - name: APP_ENV - value: production - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4318/v1/traces - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: EMAIL_SERVICE_PORT + value: "8080" + - name: APP_ENV + value: production + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(NODE_IP):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 100Mi @@ -9146,7 +9100,6 @@ kind: Deployment metadata: name: opentelemetry-demo-featureflagservice labels: - opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9157,12 +9110,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-featureflagservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9174,55 +9125,34 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-featureflagservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 50053 - name: grpc - - containerPort: 8081 - name: http + - containerPort: 50053 + name: grpc + - containerPort: 8081 + name: http env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_GRPC_SERVICE_PORT - value: "50053" - - name: DATABASE_URL - value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: grpc - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_GRPC_SERVICE_PORT + value: "50053" + - name: DATABASE_URL + value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: grpc + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 175Mi @@ -9234,10 +9164,9 @@ spec: periodSeconds: 10 initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo - waiting for ffspostgres; sleep 2; done + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo waiting for ffspostgres; sleep 2; done image: busybox:latest name: wait-for-ffspostgres --- @@ -9247,7 +9176,6 @@ kind: Deployment metadata: name: opentelemetry-demo-ffspostgres labels: - opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9258,12 +9186,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-ffspostgres template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9275,45 +9201,28 @@ spec: image: 'postgres:14' imagePullPolicy: IfNotPresent ports: - - - containerPort: 5432 - name: postgres + - containerPort: 5432 + name: postgres env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: POSTGRES_DB - value: ffs - - name: POSTGRES_USER - value: ffs - - name: POSTGRES_PASSWORD - value: ffs - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: POSTGRES_DB + value: ffs + - name: POSTGRES_USER + value: ffs + - name: POSTGRES_PASSWORD + value: ffs + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 120Mi @@ -9328,7 +9237,6 @@ kind: Deployment metadata: name: opentelemetry-demo-frauddetectionservice labels: - opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9339,12 +9247,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-frauddetectionservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9356,52 +9262,31 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frauddetectionservice' imagePullPolicy: IfNotPresent env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 200Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9411,7 +9296,6 @@ kind: Deployment metadata: name: opentelemetry-demo-frontend labels: - opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9422,12 +9306,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-frontend template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9439,70 +9321,49 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontend' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_ADDR - value: :8080 - - name: AD_SERVICE_ADDR - value: 'opentelemetry-demo-adservice:8080' - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CHECKOUT_SERVICE_ADDR - value: 'opentelemetry-demo-checkoutservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: RECOMMENDATION_SERVICE_ADDR - value: 'opentelemetry-demo-recommendationservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: WEB_OTEL_SERVICE_NAME - value: frontend-web - - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://localhost:8080/otlp-http/v1/traces - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_ADDR + value: :8080 + - name: AD_SERVICE_ADDR + value: 'opentelemetry-demo-adservice:8080' + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CHECKOUT_SERVICE_ADDR + value: 'opentelemetry-demo-checkoutservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: RECOMMENDATION_SERVICE_ADDR + value: 'opentelemetry-demo-recommendationservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: WEB_OTEL_SERVICE_NAME + value: frontend-web + - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://localhost:8080/otlp-http/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: - memory: 400Mi + memory: 200Mi securityContext: runAsGroup: 1001 runAsNonRoot: true @@ -9514,7 +9375,6 @@ kind: Deployment metadata: name: opentelemetry-demo-frontendproxy labels: - opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9525,12 +9385,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-frontendproxy template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9542,73 +9400,50 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontendproxy' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: ENVOY_PORT - value: "8080" - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_HOST - value: 'opentelemetry-demo-frontend' - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_SERVICE_HOST - value: 'opentelemetry-demo-featureflagservice' - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_WEB_HOST - value: 'opentelemetry-demo-loadgenerator' - - name: GRAFANA_SERVICE_PORT - value: "80" - - name: GRAFANA_SERVICE_HOST - value: 'opentelemetry-demo-grafana' - - name: JAEGER_SERVICE_PORT - value: "16686" - - name: JAEGER_SERVICE_HOST - value: 'opentelemetry-demo-jaeger-query' - - name: OTEL_COLLECTOR_PORT_GRPC - value: "4317" - - name: OTEL_COLLECTOR_PORT_HTTP - value: "4318" - - name: OTEL_COLLECTOR_PORT - value: "4317" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_COLLECTOR_HOST - value: $(NODE_IP) - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: ENVOY_PORT + value: "8080" + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_HOST + value: 'opentelemetry-demo-frontend' + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_SERVICE_HOST + value: 'opentelemetry-demo-featureflagservice' + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_WEB_HOST + value: 'opentelemetry-demo-loadgenerator' + - name: GRAFANA_SERVICE_PORT + value: "80" + - name: GRAFANA_SERVICE_HOST + value: 'opentelemetry-demo-grafana' + - name: JAEGER_SERVICE_PORT + value: "16686" + - name: JAEGER_SERVICE_HOST + value: 'opentelemetry-demo-jaeger-query' + - name: OTEL_COLLECTOR_PORT_GRPC + value: "4317" + - name: OTEL_COLLECTOR_PORT_HTTP + value: "4318" + - name: OTEL_COLLECTOR_HOST + value: $(OTEL_COLLECTOR_NAME) + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 50Mi @@ -9623,7 +9458,6 @@ kind: Deployment metadata: name: opentelemetry-demo-kafka labels: - opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9634,12 +9468,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-kafka template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9651,51 +9483,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-kafka' imagePullPolicy: IfNotPresent ports: - - - containerPort: 9092 - name: plaintext - - containerPort: 9093 - name: controller + - containerPort: 9092 + name: plaintext + - containerPort: 9093 + name: controller env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://opentelemetry-demo-kafka:9092 - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: KAFKA_HEAP_OPTS - value: -Xmx200M -Xms200M - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: KAFKA_HEAP_OPTS + value: -Xmx200M -Xms200M + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 500Mi @@ -9710,7 +9521,6 @@ kind: Deployment metadata: name: opentelemetry-demo-loadgenerator labels: - opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9721,12 +9531,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-loadgenerator template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9738,62 +9546,43 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-loadgenerator' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8089 - name: service + - containerPort: 8089 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_USERS - value: "10" - - name: LOCUST_SPAWN_RATE - value: "1" - - name: LOCUST_HOST - value: http://opentelemetry-demo-frontendproxy:8080 - - name: LOCUST_HEADLESS - value: "false" - - name: LOCUST_AUTOSTART - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4318/v1/traces - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_USERS + value: "10" + - name: LOCUST_SPAWN_RATE + value: "1" + - name: LOCUST_HOST + value: http://opentelemetry-demo-frontendproxy:8080 + - name: LOCUST_HEADLESS + value: "false" + - name: LOCUST_AUTOSTART + value: "true" + - name: LOCUST_BROWSER_TRAFFIC_ENABLED + value: "false" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: - memory: 120Mi + memory: 1Gi --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: apps/v1 @@ -9801,7 +9590,6 @@ kind: Deployment metadata: name: opentelemetry-demo-paymentservice labels: - opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9812,12 +9600,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-paymentservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9829,47 +9615,26 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-paymentservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PAYMENT_SERVICE_PORT - value: "8080" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PAYMENT_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 120Mi @@ -9884,7 +9649,6 @@ kind: Deployment metadata: name: opentelemetry-demo-productcatalogservice labels: - opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9895,12 +9659,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-productcatalogservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9912,49 +9674,28 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-productcatalogservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PRODUCT_CATALOG_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PRODUCT_CATALOG_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -9965,7 +9706,6 @@ kind: Deployment metadata: name: opentelemetry-demo-quoteservice labels: - opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9976,12 +9716,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-quoteservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9993,49 +9731,28 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-quoteservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: QUOTE_SERVICE_PORT - value: "8080" - - name: OTEL_PHP_AUTOLOAD_ENABLED - value: "true" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4318 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: QUOTE_SERVICE_PORT + value: "8080" + - name: OTEL_PHP_AUTOLOAD_ENABLED + value: "true" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 40Mi @@ -10050,7 +9767,6 @@ kind: Deployment metadata: name: opentelemetry-demo-recommendationservice labels: - opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10061,12 +9777,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-recommendationservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10078,55 +9792,34 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-recommendationservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: RECOMMENDATION_SERVICE_PORT - value: "8080" - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_PYTHON_LOG_CORRELATION - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: RECOMMENDATION_SERVICE_PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_PYTHON_LOG_CORRELATION + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 500Mi @@ -10137,7 +9830,6 @@ kind: Deployment metadata: name: opentelemetry-demo-redis labels: - opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10148,12 +9840,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-redis template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10165,39 +9855,22 @@ spec: image: 'redis:alpine' imagePullPolicy: IfNotPresent ports: - - - containerPort: 6379 - name: redis + - containerPort: 6379 + name: redis env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -10212,7 +9885,6 @@ kind: Deployment metadata: name: opentelemetry-demo-shippingservice labels: - opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10223,12 +9895,10 @@ spec: replicas: 1 selector: matchLabels: - opentelemetry.io/name: opentelemetry-demo-shippingservice template: metadata: labels: - opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10240,49 +9910,28 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-shippingservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + - containerPort: 8080 + name: service env: - - 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_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: SHIPPING_SERVICE_PORT - value: "8080" - - name: QUOTE_SERVICE_ADDR - value: http://opentelemetry-demo-quoteservice:8080 - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4317/v1/traces - - 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),deployment.environment=development + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: SHIPPING_SERVICE_PORT + value: "8080" + - name: QUOTE_SERVICE_ADDR + value: http://opentelemetry-demo-quoteservice:8080 + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(NODE_IP):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -10298,6 +9947,10 @@ metadata: name: opentelemetry-demo-grafana-test namespace: otel-demo annotations: +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test-configmap.yaml apiVersion: v1 @@ -10318,6 +9971,10 @@ data: code=$(wget --server-response --spider --timeout 90 --tries 10 ${url} 2>&1 | awk '/^ HTTP/{print $2}') [ "$code" == "200" ] } +spec: + template: + spec: + containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test.yaml apiVersion: v1 @@ -10346,3 +10003,6 @@ spec: configMap: name: opentelemetry-demo-grafana-test restartPolicy: Never + template: + spec: + containers: [] diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index f2282cddfd..cd0c594ded 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -48,8 +48,48 @@ function update_otel_demo_docker { yq eval -i '.services.otelcol.ports += [ "9411" ]' "$DOCKER_COMPOSE_PATH" yq eval -i '.services.otelcol.ports += [ "9943" ]' "$DOCKER_COMPOSE_PATH" - echo "OpenTelemetry Demo update completed!" + echo "Completed updating docker-compose.yml for the OpenTelemetry demo app!" +} + +function update_otel_demo_k8s { + K8S_PATH=${K8S_PATH:-"$SCRIPT_DIR/../kubernetes/opentelemetry-demo.yaml"} + + # Download the YAML file + curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/kubernetes/opentelemetry-demo.yaml \ + > "$K8S_PATH" + + # delete the opentelemetry-demo-otelcol ServiceAccount, ConfigMap, Service, and Deployment objects + yq eval -i 'select(.kind != "ServiceAccount" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" + yq eval -i 'select(.kind != "ConfigMap" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" + yq eval -i 'select(.kind != "Service" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" + yq eval -i 'select(.kind != "Deployment" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" + + # delete the OTEL_COLLECTOR_NAME environment variable from all containers + yq eval -i 'del(.spec.template.spec.containers[].env[] | select(.name == "OTEL_COLLECTOR_NAME"))' "$K8S_PATH" + + # add a NODE_IP environment variable for all containers + # - name: NODE_IP + # valueFrom: + # fieldRef: + # fieldPath: status.hostIP + + yq eval -i '(.spec.template.spec.containers[].env) += { "name": "NODE_IP" }' "$K8S_PATH" + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "NODE_IP") | .valueFrom.fieldRef.fieldPath) = "status.hostIP"' "$K8S_PATH" + + # update the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to use the NODE_IP + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_ENDPOINT") | .value) ="http://$(NODE_IP):4317"' "$K8S_PATH" + + # update the OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable to use the NODE_IP + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") | .value) ="http://$(NODE_IP):4318/v1/traces"' "$K8S_PATH" + + # append the deployment.environment resource attribute + # - name: OTEL_RESOURCE_ATTRIBUTES + # value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_RESOURCE_ATTRIBUTES") | .value) += ",deployment.environment=development"' "$K8S_PATH" + + echo "Completed updating the kubernetes/opentelemetry-demo.yaml for the OpenTelemetry demo app!" } # ---- OpenTelemetry Demo Update ---- update_otel_demo_docker +update_otel_demo_k8s From 8c16e5241f211e8aa7a139ace98bdeefca40241b Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Thu, 14 Dec 2023 09:29:11 -0800 Subject: [PATCH 15/22] updated structure to preserve original files --- docker-compose.yml | 77 +- kubernetes/opentelemetry-demo.yaml | 1529 ++- splunk/README.md | 9 + splunk/docker-compose.yml | 865 ++ splunk/opentelemetry-demo.yaml | 10011 ++++++++++++++++ .../otelcol-config-filelog.yml | 0 .../otelcol-config-fluentd.yml | 0 .../otelcol-config.yml | 0 splunk/update-demos.sh | 78 +- 9 files changed, 11870 insertions(+), 699 deletions(-) create mode 100644 splunk/docker-compose.yml create mode 100644 splunk/opentelemetry-demo.yaml rename src/otelcollector/splunk-otelcol-config-filelog.yml => splunk/otelcol-config-filelog.yml (100%) rename src/otelcollector/splunk-otelcol-config-fluentd.yml => splunk/otelcol-config-fluentd.yml (100%) rename src/otelcollector/splunk-otelcol-config.yml => splunk/otelcol-config.yml (100%) diff --git a/docker-compose.yml b/docker-compose.yml index f7b8f952b3..934da68c22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,10 +7,12 @@ x-default-logging: &logging options: max-size: "5m" max-file: "2" + networks: default: name: opentelemetry-demo driver: bridge + services: # ****************** # Core Demo Services @@ -41,6 +43,7 @@ services: kafka: condition: service_healthy logging: *logging + # AdService adservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice @@ -69,6 +72,7 @@ services: otelcol: condition: service_started logging: *logging + # Cart service cartservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice @@ -98,6 +102,7 @@ services: otelcol: condition: service_started logging: *logging + # Checkout service checkoutservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice @@ -145,6 +150,7 @@ services: kafka: condition: service_healthy logging: *logging + # Currency service currencyservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice @@ -166,11 +172,12 @@ services: environment: - CURRENCY_SERVICE_PORT - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME depends_on: otelcol: condition: service_started logging: *logging + # Email service emailservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice @@ -196,6 +203,7 @@ services: otelcol: condition: service_started logging: *logging + # Feature Flag service featureflagservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice @@ -211,8 +219,8 @@ services: memory: 175M restart: unless-stopped ports: - - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API environment: - FEATURE_FLAG_SERVICE_PORT - FEATURE_FLAG_GRPC_SERVICE_PORT @@ -226,6 +234,7 @@ services: ffs_postgres: condition: service_healthy logging: *logging + # Fraud Detection service frauddetectionservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice @@ -252,6 +261,7 @@ services: kafka: condition: service_healthy logging: *logging + # Frontend frontend: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend @@ -305,6 +315,7 @@ services: otelcol: condition: service_started logging: *logging + # Frontend Proxy (Envoy) frontendproxy: image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy @@ -345,6 +356,7 @@ services: condition: service_started grafana: condition: service_started + # Load Generator loadgenerator: image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator @@ -377,6 +389,7 @@ services: frontend: condition: service_started logging: *logging + # Payment service paymentservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice @@ -403,6 +416,7 @@ services: otelcol: condition: service_started logging: *logging + # Product Catalog service productcatalogservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice @@ -430,6 +444,7 @@ services: otelcol: condition: service_started logging: *logging + # Quote service quoteservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice @@ -457,6 +472,7 @@ services: otelcol: condition: service_started logging: *logging + # Recommendation service recommendationservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice @@ -469,7 +485,7 @@ services: deploy: resources: limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case restart: unless-stopped ports: - "${RECOMMENDATION_SERVICE_PORT}" @@ -491,6 +507,7 @@ services: otelcol: condition: service_started logging: *logging + # Shipping service shippingservice: image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice @@ -517,6 +534,7 @@ services: otelcol: condition: service_started logging: *logging + # ****************** # Dependent Services # ****************** @@ -540,6 +558,7 @@ services: timeout: 5s retries: 5 logging: *logging + # Kafka used by Checkout, Accounting, and Fraud Detection services kafka: image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka @@ -568,6 +587,7 @@ services: timeout: 10s retries: 10 logging: *logging + # Redis used by Cart service redis-cart: image: redis:7.2-alpine @@ -581,6 +601,8 @@ services: ports: - "${REDIS_PORT}" logging: *logging + + # ******************** # Telemetry Components # ******************** @@ -600,11 +622,12 @@ services: memory: 300M restart: unless-stopped ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port environment: - METRICS_STORAGE_TYPE=prometheus logging: *logging + # Grafana grafana: image: grafana/grafana:10.2.0 @@ -621,42 +644,29 @@ services: ports: - "${GRAFANA_SERVICE_PORT}" logging: *logging + # OpenTelemetry Collector otelcol: - image: quay.io/signalfx/splunk-otel-collector:latest + image: otel/opentelemetry-collector-contrib:0.88.0 container_name: otel-col deploy: resources: limits: memory: 125M restart: unless-stopped - command: ["--config=/etc/splunk-otelcol-config.yml"] + command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: - - ./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml - - ./logs:/logs - - ./checkpoint:/checkpoint + - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml + - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - - "4317" # OTLP over gRPC receiver - - "4318" # OTLP over HTTP receiver - - "9464" - - "8888" - - "13133" - - "14250" - - "14268" - - "6060" - - "9080" - - "9411" - - "9943" + - "4317" # OTLP over gRPC receiver + - "4318" # OTLP over HTTP receiver depends_on: - jaeger logging: *logging environment: - ENVOY_PORT - - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} - - SPLUNK_REALM=${SPLUNK_REALM} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} + # Prometheus prometheus: image: quay.io/prometheus/prometheus:v2.47.2 @@ -680,6 +690,7 @@ services: ports: - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" logging: *logging + opensearch: image: opensearchproject/opensearch:latest container_name: opensearch @@ -701,6 +712,7 @@ services: ports: - "9200:9200" logging: *logging + dataprepper: image: opensearchproject/data-prepper:latest volumes: @@ -709,6 +721,7 @@ services: ports: - "21892" logging: *logging + # ***** # Tests # ***** @@ -730,6 +743,7 @@ services: - NODE_ENV=production depends_on: - frontend + # Integration Tests integrationTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests @@ -760,6 +774,7 @@ services: - recommendationservice - shippingservice - quoteservice + # Tracebased Tests traceBasedTests: image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests @@ -818,13 +833,14 @@ services: condition: service_started frauddetectionservice: condition: service_started + tracetest-server: image: kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} platform: linux/amd64 container_name: tracetest-server profiles: - tests - - odd # Observabilty-Driven Development (ODD) + - odd # Observabilty-Driven Development (ODD) volumes: - type: bind source: ./test/tracetesting/tracetest-config.yaml @@ -843,16 +859,17 @@ services: otelcol: condition: service_started healthcheck: - test: ["CMD", "wget", "--spider", "localhost:11633"] + test: [ "CMD", "wget", "--spider", "localhost:11633" ] interval: 1s timeout: 3s retries: 60 + tracetest-postgres: image: postgres:16.0 container_name: tracetest-postgres profiles: - tests - - odd # Observabilty-Driven Development (ODD) + - odd # Observabilty-Driven Development (ODD) environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index 625e2fe703..130594cf2c 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -12,10 +12,6 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana namespace: otel-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-sa.yaml apiVersion: v1 @@ -27,10 +23,17 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "1.51.0" app.kubernetes.io/component: all-in-one -spec: - template: - spec: - containers: [] +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: opentelemetry-demo-otelcol + namespace: otel-demo + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" --- # Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml apiVersion: v1 @@ -44,11 +47,8 @@ metadata: app.kubernetes.io/part-of: prometheus name: opentelemetry-demo-prometheus-server namespace: otel-demo - annotations: {} -spec: - template: - spec: - containers: [] + annotations: + {} --- # Source: opentelemetry-demo/templates/serviceaccount.yaml apiVersion: v1 @@ -56,15 +56,12 @@ kind: ServiceAccount metadata: name: opentelemetry-demo labels: + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/secret.yaml apiVersion: v1 @@ -81,10 +78,6 @@ data: admin-user: "YWRtaW4=" admin-password: "YWRtaW4=" ldap-toml: "" -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml apiVersion: v1 @@ -152,10 +145,156 @@ data: path: /var/lib/grafana/dashboards/default orgId: 1 type: file -spec: - template: - spec: - containers: [] +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: opentelemetry-demo-otelcol + namespace: otel-demo + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" +data: + relay: | + connectors: + spanmetrics: null + exporters: + debug: {} + logging: {} + otlp: + endpoint: 'opentelemetry-demo-jaeger-collector:4317' + tls: + insecure: true + otlphttp/prometheus: + endpoint: http://opentelemetry-demo-prometheus-server:9090/api/v1/otlp + tls: + insecure: true + extensions: + health_check: {} + memory_ballast: + size_in_percentage: 40 + processors: + batch: {} + filter/ottl: + error_mode: ignore + metrics: + metric: + - name == "rpc.server.duration" + k8sattributes: + extract: + metadata: + - k8s.namespace.name + - k8s.deployment.name + - k8s.statefulset.name + - k8s.daemonset.name + - k8s.cronjob.name + - k8s.job.name + - k8s.node.name + - k8s.pod.name + - k8s.pod.uid + - k8s.pod.start_time + passthrough: false + pod_association: + - sources: + - from: resource_attribute + name: k8s.pod.ip + - sources: + - from: resource_attribute + name: k8s.pod.uid + - sources: + - from: connection + memory_limiter: + check_interval: 5s + limit_percentage: 80 + spike_limit_percentage: 25 + resource: + attributes: + - action: insert + from_attribute: k8s.pod.uid + key: service.instance.id + transform: + metric_statements: + - context: metric + statements: + - set(description, "") where name == "queueSize" + - set(description, "") where name == "rpc.server.duration" + - set(description, "") where name == "http.client.duration" + receivers: + jaeger: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:14250 + thrift_compact: + endpoint: ${env:MY_POD_IP}:6831 + thrift_http: + endpoint: ${env:MY_POD_IP}:14268 + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + http: + cors: + allowed_origins: + - http://* + - https://* + endpoint: ${env:MY_POD_IP}:4318 + prometheus: + config: + scrape_configs: + - job_name: opentelemetry-collector + scrape_interval: 10s + static_configs: + - targets: + - ${env:MY_POD_IP}:8888 + zipkin: + endpoint: ${env:MY_POD_IP}:9411 + service: + extensions: + - health_check + - memory_ballast + pipelines: + logs: + exporters: + - debug + processors: + - k8sattributes + - memory_limiter + - batch + receivers: + - otlp + metrics: + exporters: + - otlphttp/prometheus + - debug + processors: + - k8sattributes + - memory_limiter + - filter/ottl + - transform + - resource + - batch + receivers: + - otlp + - spanmetrics + traces: + exporters: + - otlp + - debug + - spanmetrics + processors: + - k8sattributes + - memory_limiter + - resource + - batch + receivers: + - otlp + - jaeger + - zipkin + telemetry: + metrics: + address: ${env:MY_POD_IP}:8888 --- # Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml apiVersion: v1 @@ -190,10 +329,6 @@ data: {} rules: | {} -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/grafana-dashboards.yaml apiVersion: v1 @@ -201,12 +336,14 @@ kind: ConfigMap metadata: name: opentelemetry-demo-grafana-dashboards labels: + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo data: + demo-dashboard.json: |- { "annotations": { @@ -7627,10 +7764,6 @@ data: "version": 1, "weekStart": "" } -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml kind: ClusterRole @@ -7642,10 +7775,6 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana-clusterrole rules: [] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7666,10 +7795,6 @@ rules: - apiGroups: ["extensions"] resources: ["replicasets"] verbs: ["get", "list", "watch"] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7720,10 +7845,6 @@ rules: - "/metrics" verbs: - get -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml kind: ClusterRoleBinding @@ -7742,10 +7863,6 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-grafana-clusterrole apiGroup: rbac.authorization.k8s.io -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7761,13 +7878,9 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-otelcol subjects: - - kind: ServiceAccount - name: opentelemetry-demo-otelcol - namespace: otel-demo -spec: - template: - spec: - containers: [] +- kind: ServiceAccount + name: opentelemetry-demo-otelcol + namespace: otel-demo --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7788,10 +7901,6 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: opentelemetry-demo-prometheus-server -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/role.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7804,10 +7913,6 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "10.1.5" rules: [] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7824,13 +7929,9 @@ roleRef: kind: Role name: opentelemetry-demo-grafana subjects: - - kind: ServiceAccount - name: opentelemetry-demo-grafana - namespace: otel-demo -spec: - template: - spec: - containers: [] +- kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo --- # Source: opentelemetry-demo/charts/grafana/templates/service.yaml apiVersion: v1 @@ -7852,9 +7953,6 @@ spec: selector: app.kubernetes.io/name: grafana app.kubernetes.io/instance: opentelemetry-demo - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-agent-svc.yaml apiVersion: v1 @@ -7888,9 +7986,6 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-collector-svc.yaml apiVersion: v1 @@ -7927,9 +8022,6 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-query-svc.yaml apiVersion: v1 @@ -7954,9 +8046,60 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-otelcol + namespace: otel-demo + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" + component: standalone-collector +spec: + type: ClusterIP + ports: + + - name: jaeger-compact + port: 6831 + targetPort: 6831 + protocol: UDP + - name: jaeger-grpc + port: 14250 + targetPort: 14250 + protocol: TCP + - name: jaeger-thrift + port: 14268 + targetPort: 14268 + protocol: TCP + - name: metrics + port: 8888 + targetPort: 8888 + protocol: TCP + - name: otlp + port: 4317 + targetPort: 4317 + protocol: TCP + appProtocol: grpc + - name: otlp-http + port: 4318 + targetPort: 4318 + protocol: TCP + - name: prometheus + port: 9464 + targetPort: 9464 + protocol: TCP + - name: zipkin + port: 9411 + targetPort: 9411 + protocol: TCP + selector: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + component: standalone-collector + internalTrafficPolicy: Cluster --- # Source: opentelemetry-demo/charts/prometheus/templates/service.yaml apiVersion: v1 @@ -7982,9 +8125,6 @@ spec: app.kubernetes.io/instance: opentelemetry-demo sessionAffinity: None type: "ClusterIP" - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -7992,6 +8132,7 @@ kind: Service metadata: name: opentelemetry-demo-adservice labels: + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8005,10 +8146,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-adservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8016,6 +8155,7 @@ kind: Service metadata: name: opentelemetry-demo-cartservice labels: + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8029,10 +8169,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-cartservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8040,6 +8178,7 @@ kind: Service metadata: name: opentelemetry-demo-checkoutservice labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8053,10 +8192,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-checkoutservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8064,6 +8201,7 @@ kind: Service metadata: name: opentelemetry-demo-currencyservice labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -8077,10 +8215,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-currencyservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8088,6 +8224,7 @@ kind: Service metadata: name: opentelemetry-demo-emailservice labels: + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -8101,10 +8238,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-emailservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8112,6 +8247,7 @@ kind: Service metadata: name: opentelemetry-demo-featureflagservice labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -8128,10 +8264,8 @@ spec: name: http targetPort: 8081 selector: + opentelemetry.io/name: opentelemetry-demo-featureflagservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8139,6 +8273,7 @@ kind: Service metadata: name: opentelemetry-demo-ffspostgres labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -8152,10 +8287,8 @@ spec: name: postgres targetPort: 5432 selector: + opentelemetry.io/name: opentelemetry-demo-ffspostgres - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8163,6 +8296,7 @@ kind: Service metadata: name: opentelemetry-demo-frontend labels: + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -8176,10 +8310,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-frontend - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8187,6 +8319,7 @@ kind: Service metadata: name: opentelemetry-demo-frontendproxy labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -8200,10 +8333,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-frontendproxy - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8211,6 +8342,7 @@ kind: Service metadata: name: opentelemetry-demo-kafka labels: + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -8227,10 +8359,8 @@ spec: name: controller targetPort: 9093 selector: + opentelemetry.io/name: opentelemetry-demo-kafka - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8238,6 +8368,7 @@ kind: Service metadata: name: opentelemetry-demo-loadgenerator labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -8251,10 +8382,8 @@ spec: name: tcp-service targetPort: 8089 selector: + opentelemetry.io/name: opentelemetry-demo-loadgenerator - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8262,6 +8391,7 @@ kind: Service metadata: name: opentelemetry-demo-paymentservice labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -8275,10 +8405,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-paymentservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8286,6 +8414,7 @@ kind: Service metadata: name: opentelemetry-demo-productcatalogservice labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -8299,10 +8428,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8310,6 +8437,7 @@ kind: Service metadata: name: opentelemetry-demo-quoteservice labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -8323,10 +8451,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-quoteservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8334,6 +8460,7 @@ kind: Service metadata: name: opentelemetry-demo-recommendationservice labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -8347,10 +8474,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-recommendationservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8358,6 +8483,7 @@ kind: Service metadata: name: opentelemetry-demo-redis labels: + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -8371,10 +8497,8 @@ spec: name: redis targetPort: 6379 selector: + opentelemetry.io/name: opentelemetry-demo-redis - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8382,6 +8506,7 @@ kind: Service metadata: name: opentelemetry-demo-shippingservice labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -8395,10 +8520,8 @@ spec: name: tcp-service targetPort: 8080 selector: + opentelemetry.io/name: opentelemetry-demo-shippingservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml apiVersion: apps/v1 @@ -8431,6 +8554,7 @@ spec: checksum/secret: f37dc127378b75e32576182571ac9b3826d217955ddda163afa1fde86c1cc056 kubectl.kubernetes.io/default-container: grafana spec: + serviceAccountName: opentelemetry-demo-grafana automountServiceAccountToken: true securityContext: @@ -8447,7 +8571,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL seccompProfile: type: RuntimeDefault volumeMounts: @@ -8497,10 +8621,6 @@ spec: value: /var/lib/grafana/plugins - name: GF_PATHS_PROVISIONING value: /etc/grafana/provisioning - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP livenessProbe: failureThreshold: 10 httpGet: @@ -8555,7 +8675,7 @@ spec: annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" - spec: + spec: containers: - env: - name: METRICS_STORAGE_TYPE @@ -8568,10 +8688,6 @@ spec: value: "false" - name: COLLECTOR_OTLP_ENABLED value: "true" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP image: jaegertracing/all-in-one:1.51.0 imagePullPolicy: IfNotPresent name: jaeger @@ -8627,6 +8743,107 @@ spec: serviceAccountName: opentelemetry-demo-jaeger volumes: --- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-otelcol + namespace: otel-demo + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" +spec: + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + component: standalone-collector + strategy: + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: b3a79c8981833bbaa41a646bc8488db5dbc926b0cc4e4b44fc68c316f6230bd9 + opentelemetry_community_demo: "true" + prometheus.io/port: "9464" + prometheus.io/scrape: "true" + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + component: standalone-collector + + spec: + + serviceAccountName: opentelemetry-demo-otelcol + securityContext: + {} + containers: + - name: opentelemetry-collector + command: + - /otelcol-contrib + - --config=/conf/relay.yaml + securityContext: + {} + image: "otel/opentelemetry-collector-contrib:0.88.0" + imagePullPolicy: IfNotPresent + ports: + + - name: jaeger-compact + containerPort: 6831 + protocol: UDP + - name: jaeger-grpc + containerPort: 14250 + protocol: TCP + - name: jaeger-thrift + containerPort: 14268 + protocol: TCP + - name: metrics + containerPort: 8888 + protocol: TCP + - name: otlp + containerPort: 4317 + protocol: TCP + - name: otlp-http + containerPort: 4318 + protocol: TCP + - name: prometheus + containerPort: 9464 + protocol: TCP + - name: zipkin + containerPort: 9411 + protocol: TCP + env: + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + livenessProbe: + httpGet: + path: / + port: 13133 + readinessProbe: + httpGet: + path: / + port: 13133 + resources: + limits: + memory: 200Mi + volumeMounts: + - mountPath: /conf + name: opentelemetry-collector-configmap + volumes: + - name: opentelemetry-collector-configmap + configMap: + name: opentelemetry-demo-otelcol + items: + - key: relay + path: relay.yaml + hostNetwork: false +--- # Source: opentelemetry-demo/charts/prometheus/templates/deploy.yaml apiVersion: apps/v1 kind: Deployment @@ -8662,6 +8879,7 @@ spec: enableServiceLinks: true serviceAccountName: opentelemetry-demo-prometheus-server containers: + - name: prometheus-server image: "quay.io/prometheus/prometheus:v2.47.2" imagePullPolicy: "IfNotPresent" @@ -8704,8 +8922,6 @@ spec: - name: storage-volume mountPath: /data subPath: "" - env: - name: NODE_IP dnsPolicy: ClusterFirst securityContext: fsGroup: 65534 @@ -8718,7 +8934,8 @@ spec: configMap: name: opentelemetry-demo-prometheus-server - name: storage-volume - emptyDir: {} + emptyDir: + {} --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: apps/v1 @@ -8726,6 +8943,7 @@ kind: Deployment metadata: name: opentelemetry-demo-accountingservice labels: + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8736,10 +8954,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-accountingservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8751,31 +8971,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-accountingservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -8785,6 +9004,7 @@ kind: Deployment metadata: name: opentelemetry-demo-adservice labels: + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8795,10 +9015,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-adservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8810,30 +9032,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-adservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: AD_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_LOGS_EXPORTER - value: otlp - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: AD_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_LOGS_EXPORTER + value: otlp + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 300Mi @@ -8844,6 +9065,7 @@ kind: Deployment metadata: name: opentelemetry-demo-cartservice labels: + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8854,10 +9076,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-cartservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8869,40 +9093,40 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-cartservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CART_SERVICE_PORT - value: "8080" - - name: ASPNETCORE_URLS - value: http://*:$(CART_SERVICE_PORT) - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: REDIS_ADDR - value: 'opentelemetry-demo-redis:6379' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CART_SERVICE_PORT + value: "8080" + - name: ASPNETCORE_URLS + value: http://*:$(CART_SERVICE_PORT) + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: REDIS_ADDR + value: 'opentelemetry-demo-redis:6379' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 160Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting for redis; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting + for redis; sleep 2; done; image: busybox:latest name: wait-for-redis --- @@ -8912,6 +9136,7 @@ kind: Deployment metadata: name: opentelemetry-demo-checkoutservice labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8922,10 +9147,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8937,48 +9164,48 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-checkoutservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CHECKOUT_SERVICE_PORT - value: "8080" - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: EMAIL_SERVICE_ADDR - value: http://opentelemetry-demo-emailservice:8080 - - name: PAYMENT_SERVICE_ADDR - value: 'opentelemetry-demo-paymentservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CHECKOUT_SERVICE_PORT + value: "8080" + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: EMAIL_SERVICE_ADDR + value: http://opentelemetry-demo-emailservice:8080 + - name: PAYMENT_SERVICE_ADDR + value: 'opentelemetry-demo-paymentservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -8988,6 +9215,7 @@ kind: Deployment metadata: name: opentelemetry-demo-currencyservice labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -8998,10 +9226,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-currencyservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9013,26 +9243,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-currencyservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CURRENCY_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CURRENCY_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9043,6 +9272,7 @@ kind: Deployment metadata: name: opentelemetry-demo-emailservice labels: + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9053,10 +9283,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-emailservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9068,28 +9300,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-emailservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: EMAIL_SERVICE_PORT - value: "8080" - - name: APP_ENV - value: production - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4318/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: EMAIL_SERVICE_PORT + value: "8080" + - name: APP_ENV + value: production + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 100Mi @@ -9100,6 +9331,7 @@ kind: Deployment metadata: name: opentelemetry-demo-featureflagservice labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9110,10 +9342,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9125,34 +9359,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-featureflagservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 50053 - name: grpc - - containerPort: 8081 - name: http + + - containerPort: 50053 + name: grpc + - containerPort: 8081 + name: http env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_GRPC_SERVICE_PORT - value: "50053" - - name: DATABASE_URL - value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: grpc - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_GRPC_SERVICE_PORT + value: "50053" + - name: DATABASE_URL + value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: grpc + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 175Mi @@ -9164,9 +9397,10 @@ spec: periodSeconds: 10 initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo waiting for ffspostgres; sleep 2; done + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo + waiting for ffspostgres; sleep 2; done image: busybox:latest name: wait-for-ffspostgres --- @@ -9176,6 +9410,7 @@ kind: Deployment metadata: name: opentelemetry-demo-ffspostgres labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9186,10 +9421,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9201,28 +9438,27 @@ spec: image: 'postgres:14' imagePullPolicy: IfNotPresent ports: - - containerPort: 5432 - name: postgres + + - containerPort: 5432 + name: postgres env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: POSTGRES_DB - value: ffs - - name: POSTGRES_USER - value: ffs - - name: POSTGRES_PASSWORD - value: ffs - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: POSTGRES_DB + value: ffs + - name: POSTGRES_USER + value: ffs + - name: POSTGRES_PASSWORD + value: ffs + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9237,6 +9473,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frauddetectionservice labels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9247,10 +9484,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9262,31 +9501,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frauddetectionservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9296,6 +9534,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontend labels: + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9306,10 +9545,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-frontend template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9321,46 +9562,45 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontend' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_ADDR - value: :8080 - - name: AD_SERVICE_ADDR - value: 'opentelemetry-demo-adservice:8080' - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CHECKOUT_SERVICE_ADDR - value: 'opentelemetry-demo-checkoutservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: RECOMMENDATION_SERVICE_ADDR - value: 'opentelemetry-demo-recommendationservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: WEB_OTEL_SERVICE_NAME - value: frontend-web - - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://localhost:8080/otlp-http/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_ADDR + value: :8080 + - name: AD_SERVICE_ADDR + value: 'opentelemetry-demo-adservice:8080' + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CHECKOUT_SERVICE_ADDR + value: 'opentelemetry-demo-checkoutservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: RECOMMENDATION_SERVICE_ADDR + value: 'opentelemetry-demo-recommendationservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: WEB_OTEL_SERVICE_NAME + value: frontend-web + - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://localhost:8080/otlp-http/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi @@ -9375,6 +9615,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontendproxy labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9385,10 +9626,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9400,50 +9643,49 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontendproxy' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: ENVOY_PORT - value: "8080" - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_HOST - value: 'opentelemetry-demo-frontend' - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_SERVICE_HOST - value: 'opentelemetry-demo-featureflagservice' - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_WEB_HOST - value: 'opentelemetry-demo-loadgenerator' - - name: GRAFANA_SERVICE_PORT - value: "80" - - name: GRAFANA_SERVICE_HOST - value: 'opentelemetry-demo-grafana' - - name: JAEGER_SERVICE_PORT - value: "16686" - - name: JAEGER_SERVICE_HOST - value: 'opentelemetry-demo-jaeger-query' - - name: OTEL_COLLECTOR_PORT_GRPC - value: "4317" - - name: OTEL_COLLECTOR_PORT_HTTP - value: "4318" - - name: OTEL_COLLECTOR_HOST - value: $(OTEL_COLLECTOR_NAME) - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: ENVOY_PORT + value: "8080" + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_HOST + value: 'opentelemetry-demo-frontend' + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_SERVICE_HOST + value: 'opentelemetry-demo-featureflagservice' + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_WEB_HOST + value: 'opentelemetry-demo-loadgenerator' + - name: GRAFANA_SERVICE_PORT + value: "80" + - name: GRAFANA_SERVICE_HOST + value: 'opentelemetry-demo-grafana' + - name: JAEGER_SERVICE_PORT + value: "16686" + - name: JAEGER_SERVICE_HOST + value: 'opentelemetry-demo-jaeger-query' + - name: OTEL_COLLECTOR_PORT_GRPC + value: "4317" + - name: OTEL_COLLECTOR_PORT_HTTP + value: "4318" + - name: OTEL_COLLECTOR_HOST + value: $(OTEL_COLLECTOR_NAME) + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 50Mi @@ -9458,6 +9700,7 @@ kind: Deployment metadata: name: opentelemetry-demo-kafka labels: + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9468,10 +9711,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-kafka template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9483,30 +9728,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-kafka' imagePullPolicy: IfNotPresent ports: - - containerPort: 9092 - name: plaintext - - containerPort: 9093 - name: controller + + - containerPort: 9092 + name: plaintext + - containerPort: 9093 + name: controller env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://opentelemetry-demo-kafka:9092 - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: KAFKA_HEAP_OPTS - value: -Xmx200M -Xms200M - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: KAFKA_HEAP_OPTS + value: -Xmx200M -Xms200M + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -9521,6 +9765,7 @@ kind: Deployment metadata: name: opentelemetry-demo-loadgenerator labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9531,10 +9776,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9546,40 +9793,39 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-loadgenerator' imagePullPolicy: IfNotPresent ports: - - containerPort: 8089 - name: service + + - containerPort: 8089 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_USERS - value: "10" - - name: LOCUST_SPAWN_RATE - value: "1" - - name: LOCUST_HOST - value: http://opentelemetry-demo-frontendproxy:8080 - - name: LOCUST_HEADLESS - value: "false" - - name: LOCUST_AUTOSTART - value: "true" - - name: LOCUST_BROWSER_TRAFFIC_ENABLED - value: "false" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_USERS + value: "10" + - name: LOCUST_SPAWN_RATE + value: "1" + - name: LOCUST_HOST + value: http://opentelemetry-demo-frontendproxy:8080 + - name: LOCUST_HEADLESS + value: "false" + - name: LOCUST_AUTOSTART + value: "true" + - name: LOCUST_BROWSER_TRAFFIC_ENABLED + value: "false" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 1Gi @@ -9590,6 +9836,7 @@ kind: Deployment metadata: name: opentelemetry-demo-paymentservice labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9600,10 +9847,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-paymentservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9615,26 +9864,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-paymentservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PAYMENT_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PAYMENT_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9649,6 +9897,7 @@ kind: Deployment metadata: name: opentelemetry-demo-productcatalogservice labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9659,10 +9908,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9674,28 +9925,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-productcatalogservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PRODUCT_CATALOG_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PRODUCT_CATALOG_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9706,6 +9956,7 @@ kind: Deployment metadata: name: opentelemetry-demo-quoteservice labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9716,10 +9967,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-quoteservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9731,28 +9984,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-quoteservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: QUOTE_SERVICE_PORT - value: "8080" - - name: OTEL_PHP_AUTOLOAD_ENABLED - value: "true" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: QUOTE_SERVICE_PORT + value: "8080" + - name: OTEL_PHP_AUTOLOAD_ENABLED + value: "true" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 40Mi @@ -9767,6 +10019,7 @@ kind: Deployment metadata: name: opentelemetry-demo-recommendationservice labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -9777,10 +10030,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -9792,34 +10047,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-recommendationservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: RECOMMENDATION_SERVICE_PORT - value: "8080" - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_PYTHON_LOG_CORRELATION - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: RECOMMENDATION_SERVICE_PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_PYTHON_LOG_CORRELATION + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -9830,6 +10084,7 @@ kind: Deployment metadata: name: opentelemetry-demo-redis labels: + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -9840,10 +10095,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-redis template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -9855,22 +10112,21 @@ spec: image: 'redis:alpine' imagePullPolicy: IfNotPresent ports: - - containerPort: 6379 - name: redis + + - containerPort: 6379 + name: redis env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9885,6 +10141,7 @@ kind: Deployment metadata: name: opentelemetry-demo-shippingservice labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -9895,10 +10152,12 @@ spec: replicas: 1 selector: matchLabels: + opentelemetry.io/name: opentelemetry-demo-shippingservice template: metadata: labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -9910,28 +10169,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-shippingservice' imagePullPolicy: IfNotPresent ports: - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: SHIPPING_SERVICE_PORT - value: "8080" - - name: QUOTE_SERVICE_ADDR - value: http://opentelemetry-demo-quoteservice:8080 - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4318/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: SHIPPING_SERVICE_PORT + value: "8080" + - name: QUOTE_SERVICE_ADDR + value: http://opentelemetry-demo-quoteservice:8080 + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9947,10 +10205,6 @@ metadata: name: opentelemetry-demo-grafana-test namespace: otel-demo annotations: -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test-configmap.yaml apiVersion: v1 @@ -9971,10 +10225,6 @@ data: code=$(wget --server-response --spider --timeout 90 --tries 10 ${url} 2>&1 | awk '/^ HTTP/{print $2}') [ "$code" == "200" ] } -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test.yaml apiVersion: v1 @@ -10003,6 +10253,3 @@ spec: configMap: name: opentelemetry-demo-grafana-test restartPolicy: Never - template: - spec: - containers: [] diff --git a/splunk/README.md b/splunk/README.md index 0a76331122..b5efc694d2 100644 --- a/splunk/README.md +++ b/splunk/README.md @@ -6,6 +6,15 @@ This repository contains a fork of the OpenTelemetry Astronomy Shop, a microserv distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment. It includes customizations for use with Splunk Observability Cloud. + +## Update Docker and Kubernetes Scripts + +After synchronizing changes with the upstream repository, the following command can be used to update the Splunk versions of the docker-compose.yml and kubernetes/opentelemetry-demo.yaml files, which are optimized for use with Splunk Observability Cloud: + +```` +./update-demos.sh +```` + ## Quick start You can be up and running with the demo in a few minutes. Check out the docs for diff --git a/splunk/docker-compose.yml b/splunk/docker-compose.yml new file mode 100644 index 0000000000..28eb3302cf --- /dev/null +++ b/splunk/docker-compose.yml @@ -0,0 +1,865 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +version: '3.9' +x-default-logging: &logging + driver: "json-file" + options: + max-size: "5m" + max-file: "2" +networks: + default: + name: opentelemetry-demo + driver: bridge +services: + # ****************** + # Core Demo Services + # ****************** + # Accounting service + accountingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + container_name: accounting-service + build: + context: ./ + dockerfile: ./src/accountingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=accountingservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + # AdService + adservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + container_name: ad-service + build: + context: ./ + dockerfile: ./src/adservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - "${AD_SERVICE_PORT}" + environment: + - AD_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_LOGS_EXPORTER=otlp + - OTEL_SERVICE_NAME=adservice + depends_on: + otelcol: + condition: service_started + logging: *logging + # Cart service + cartservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + container_name: cart-service + build: + context: ./ + dockerfile: ./src/cartservice/src/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + deploy: + resources: + limits: + memory: 160M + restart: unless-stopped + ports: + - "${CART_SERVICE_PORT}" + environment: + - CART_SERVICE_PORT + - REDIS_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=cartservice + - ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT} + depends_on: + redis-cart: + condition: service_started + otelcol: + condition: service_started + logging: *logging + # Checkout service + checkoutservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + container_name: checkout-service + build: + context: ./ + dockerfile: ./src/checkoutservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CHECKOUT_SERVICE_PORT}" + environment: + - CHECKOUT_SERVICE_PORT + - CART_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=checkoutservice + depends_on: + cartservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + # Currency service + currencyservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + container_name: currency-service + build: + context: ./src/currencyservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + args: + - GRPC_VERSION=1.46.0 + - OPENTELEMETRY_VERSION=1.5.0 + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${CURRENCY_SERVICE_PORT}" + environment: + - CURRENCY_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + depends_on: + otelcol: + condition: service_started + logging: *logging + # Email service + emailservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + container_name: email-service + build: + context: ./src/emailservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + deploy: + resources: + limits: + memory: 100M + restart: unless-stopped + ports: + - "${EMAIL_SERVICE_PORT}" + environment: + - APP_ENV=production + - EMAIL_SERVICE_PORT + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=emailservice + depends_on: + otelcol: + condition: service_started + logging: *logging + # Feature Flag service + featureflagservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + container_name: feature-flag-service + build: + context: ./ + dockerfile: ./src/featureflagservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + deploy: + resources: + limits: + memory: 175M + restart: unless-stopped + ports: + - "${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + environment: + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + - OTEL_SERVICE_NAME=featureflagservice + - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs + healthcheck: + test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] + depends_on: + ffs_postgres: + condition: service_healthy + logging: *logging + # Fraud Detection service + frauddetectionservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + container_name: frauddetection-service + build: + context: ./ + dockerfile: ./src/frauddetectionservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + environment: + - KAFKA_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=frauddetectionservice + depends_on: + otelcol: + condition: service_started + kafka: + condition: service_healthy + logging: *logging + # Frontend + frontend: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + container_name: frontend + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + ports: + - "${FRONTEND_PORT}" + environment: + - PORT=${FRONTEND_PORT} + - FRONTEND_ADDR + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES} + - ENV_PLATFORM + - OTEL_SERVICE_NAME=frontend + - PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - WEB_OTEL_SERVICE_NAME=frontend-web + depends_on: + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + productcatalogservice: + condition: service_started + quoteservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + # Frontend Proxy (Envoy) + frontendproxy: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy + container_name: frontend-proxy + build: + context: ./ + dockerfile: src/frontendproxy/Dockerfile + deploy: + resources: + limits: + memory: 50M + ports: + - "${ENVOY_PORT}:${ENVOY_PORT}" + - 10000:10000 + environment: + - FRONTEND_PORT + - FRONTEND_HOST + - FEATURE_FLAG_SERVICE_PORT + - FEATURE_FLAG_SERVICE_HOST + - LOCUST_WEB_HOST + - LOCUST_WEB_PORT + - GRAFANA_SERVICE_PORT + - GRAFANA_SERVICE_HOST + - JAEGER_SERVICE_PORT + - JAEGER_SERVICE_HOST + - OTEL_COLLECTOR_HOST + - OTEL_COLLECTOR_PORT_GRPC + - OTEL_COLLECTOR_PORT_HTTP + - ENVOY_PORT + depends_on: + frontend: + condition: service_started + featureflagservice: + condition: service_started + loadgenerator: + condition: service_started + jaeger: + condition: service_started + grafana: + condition: service_started + # Load Generator + loadgenerator: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + container_name: load-generator + build: + context: ./ + dockerfile: ./src/loadgenerator/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + deploy: + resources: + limits: + memory: 1G + restart: unless-stopped + ports: + - "${LOCUST_WEB_PORT}" + environment: + - LOCUST_WEB_PORT + - LOCUST_USERS + - LOCUST_HOST + - LOCUST_HEADLESS + - LOCUST_AUTOSTART + - LOCUST_BROWSER_TRAFFIC_ENABLED + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=loadgenerator + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + frontend: + condition: service_started + logging: *logging + # Payment service + paymentservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + container_name: payment-service + build: + context: ./ + dockerfile: ./src/paymentservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + ports: + - "${PAYMENT_SERVICE_PORT}" + environment: + - PAYMENT_SERVICE_PORT + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=paymentservice + depends_on: + otelcol: + condition: service_started + logging: *logging + # Product Catalog service + productcatalogservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + container_name: product-catalog-service + build: + context: ./ + dockerfile: ./src/productcatalogservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${PRODUCT_CATALOG_SERVICE_PORT}" + environment: + - PRODUCT_CATALOG_SERVICE_PORT + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=productcatalogservice + depends_on: + otelcol: + condition: service_started + logging: *logging + # Quote service + quoteservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + container_name: quote-service + build: + context: ./ + dockerfile: ./src/quoteservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-quoteservice + deploy: + resources: + limits: + memory: 40M + restart: unless-stopped + ports: + - "${QUOTE_SERVICE_PORT}" + environment: + - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318 + - OTEL_PHP_AUTOLOAD_ENABLED=true + - QUOTE_SERVICE_PORT + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=quoteservice + - OTEL_PHP_INTERNAL_METRICS_ENABLED=true + depends_on: + otelcol: + condition: service_started + logging: *logging + # Recommendation service + recommendationservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + container_name: recommendation-service + build: + context: ./ + dockerfile: ./src/recommendationservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + deploy: + resources: + limits: + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + restart: unless-stopped + ports: + - "${RECOMMENDATION_SERVICE_PORT}" + environment: + - RECOMMENDATION_SERVICE_PORT + - PRODUCT_CATALOG_SERVICE_ADDR + - FEATURE_FLAG_GRPC_SERVICE_ADDR + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=recommendationservice + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + depends_on: + featureflagservice: + condition: service_started + productcatalogservice: + condition: service_started + otelcol: + condition: service_started + logging: *logging + # Shipping service + shippingservice: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + container_name: shipping-service + build: + context: ./ + dockerfile: ./src/shippingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${SHIPPING_SERVICE_PORT}" + environment: + - SHIPPING_SERVICE_PORT + - QUOTE_SERVICE_ADDR + - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=shippingservice + depends_on: + otelcol: + condition: service_started + logging: *logging + # ****************** + # Dependent Services + # ****************** + # Postgres used by Feature Flag service + ffs_postgres: + image: postgres:16.0 + container_name: postgres + user: postgres + deploy: + resources: + limits: + memory: 120M + restart: unless-stopped + environment: + - POSTGRES_USER=ffs + - POSTGRES_DB=ffs + - POSTGRES_PASSWORD=ffs + healthcheck: + test: ["CMD-SHELL", "pg_isready -d ffs -U ffs"] + interval: 10s + timeout: 5s + retries: 5 + logging: *logging + # Kafka used by Checkout, Accounting, and Fraud Detection services + kafka: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + container_name: kafka + build: + context: ./ + dockerfile: ./src/kafka/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka + deploy: + resources: + limits: + memory: 500M + restart: unless-stopped + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=kafka + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + healthcheck: + test: nc -z kafka 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 + logging: *logging + # Redis used by Cart service + redis-cart: + image: redis:7.2-alpine + container_name: redis-cart + user: redis + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "${REDIS_PORT}" + logging: *logging + # ******************** + # Telemetry Components + # ******************** + # Jaeger + jaeger: + image: jaegertracing/all-in-one:1.51 + container_name: jaeger + command: + - "--memory.max-traces=8000" + - "--query.base-path=/jaeger/ui" + - "--prometheus.server-url=http://${PROMETHEUS_ADDR}" + - "--prometheus.query.normalize-calls=true" + - "--prometheus.query.normalize-duration=true" + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port + environment: + - METRICS_STORAGE_TYPE=prometheus + logging: *logging + # Grafana + grafana: + image: grafana/grafana:10.2.0 + container_name: grafana + deploy: + resources: + limits: + memory: 100M + environment: + - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource" + volumes: + - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./src/grafana/provisioning/:/etc/grafana/provisioning/ + ports: + - "${GRAFANA_SERVICE_PORT}" + logging: *logging + # OpenTelemetry Collector + otelcol: + image: quay.io/signalfx/splunk-otel-collector:latest + container_name: otel-col + deploy: + resources: + limits: + memory: 125M + restart: unless-stopped + command: ["--config=/etc/otelcol-config.yml"] + volumes: + - ./splunk/otelcol-config.yml:/etc/otelcol-config.yml + - ./logs:/logs + - ./checkpoint:/checkpoint + ports: + - "4317" # OTLP over gRPC receiver + - "4318" # OTLP over HTTP receiver + - "9464" + - "8888" + - "13133" + - "14250" + - "14268" + - "6060" + - "9080" + - "9411" + - "9943" + depends_on: + - jaeger + logging: *logging + environment: + - ENVOY_PORT + - SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN} + - SPLUNK_REALM=${SPLUNK_REALM} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} + # Prometheus + prometheus: + image: quay.io/prometheus/prometheus:v2.47.2 + container_name: prometheus + command: + - --web.console.templates=/etc/prometheus/consoles + - --web.console.libraries=/etc/prometheus/console_libraries + - --storage.tsdb.retention.time=1h + - --config.file=/etc/prometheus/prometheus-config.yaml + - --storage.tsdb.path=/prometheus + - --web.enable-lifecycle + - --web.route-prefix=/ + - --enable-feature=exemplar-storage + - --enable-feature=otlp-write-receiver + volumes: + - ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml + deploy: + resources: + limits: + memory: 300M + ports: + - "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}" + logging: *logging + opensearch: + image: opensearchproject/opensearch:latest + container_name: opensearch + environment: + - cluster.name=demo-cluster + - node.name=demo-node + - bootstrap.memory_lock=true + - discovery.type=single-node + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + - "DISABLE_INSTALL_DEMO_CONFIG=true" + - "DISABLE_SECURITY_PLUGIN=true" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + ports: + - "9200:9200" + logging: *logging + dataprepper: + image: opensearchproject/data-prepper:latest + volumes: + - ./src/opensearch/pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml + - ./src/opensearch/data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml + ports: + - "21892" + logging: *logging + # ***** + # Tests + # ***** + # Frontend Tests + frontendTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests + container_name: frontend-tests + build: + context: ./ + dockerfile: ./src/frontend/Dockerfile.cypress + profiles: + - tests + volumes: + - ./src/frontend/cypress/videos:/app/cypress/videos + - ./src/frontend/cypress/screenshots:/app/cypress/screenshots + environment: + - CYPRESS_baseUrl=http://${FRONTEND_ADDR} + - FRONTEND_ADDR + - NODE_ENV=production + depends_on: + - frontend + # Integration Tests + integrationTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests + container_name: integrationTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/Dockerfile + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + depends_on: + - adservice + - cartservice + - checkoutservice + - currencyservice + - emailservice + - paymentservice + - productcatalogservice + - recommendationservice + - shippingservice + - quoteservice + # Tracebased Tests + traceBasedTests: + image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests + container_name: traceBasedTests + profiles: + - tests + build: + context: ./ + dockerfile: ./test/tracetesting/Dockerfile + args: + - TRACETEST_IMAGE_VERSION + environment: + - AD_SERVICE_ADDR + - CART_SERVICE_ADDR + - CHECKOUT_SERVICE_ADDR + - CURRENCY_SERVICE_ADDR + - EMAIL_SERVICE_ADDR + - FRONTEND_ADDR + - PAYMENT_SERVICE_ADDR + - PRODUCT_CATALOG_SERVICE_ADDR + - RECOMMENDATION_SERVICE_ADDR + - SHIPPING_SERVICE_ADDR + - KAFKA_SERVICE_ADDR + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - ./test/tracetesting:/app/test/tracetesting + - ./pb:/app/pb + depends_on: + tracetest-server: + condition: service_healthy + # adding demo services as dependencies + frontend: + condition: service_started + adservice: + condition: service_started + cartservice: + condition: service_started + checkoutservice: + condition: service_started + currencyservice: + condition: service_started + emailservice: + condition: service_started + paymentservice: + condition: service_started + productcatalogservice: + condition: service_started + recommendationservice: + condition: service_started + shippingservice: + condition: service_started + quoteservice: + condition: service_started + accountingservice: + condition: service_started + frauddetectionservice: + condition: service_started + tracetest-server: + image: kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} + platform: linux/amd64 + container_name: tracetest-server + profiles: + - tests + - odd # Observabilty-Driven Development (ODD) + volumes: + - type: bind + source: ./test/tracetesting/tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./test/tracetesting/tracetest-provision.yaml + target: /app/provision.yaml + command: --provisioning-file /app/provision.yaml + ports: + - 11633:11633 + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + tracetest-postgres: + condition: service_healthy + otelcol: + condition: service_started + healthcheck: + test: ["CMD", "wget", "--spider", "localhost:11633"] + interval: 1s + timeout: 3s + retries: 60 + tracetest-postgres: + image: postgres:16.0 + container_name: tracetest-postgres + profiles: + - tests + - odd # Observabilty-Driven Development (ODD) + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + ports: + - 5432 diff --git a/splunk/opentelemetry-demo.yaml b/splunk/opentelemetry-demo.yaml new file mode 100644 index 0000000000..d40c449c15 --- /dev/null +++ b/splunk/opentelemetry-demo.yaml @@ -0,0 +1,10011 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# This file is generated by 'make generate-kubernetes-manifests' +--- +# Source: opentelemetry-demo/charts/grafana/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" + name: opentelemetry-demo-grafana + namespace: otel-demo +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/jaeger/templates/allinone-sa.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: opentelemetry-demo-jaeger + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "1.51.0" + app.kubernetes.io/component: all-in-one +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server + namespace: otel-demo + annotations: {} +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: opentelemetry-demo + labels: + opentelemetry.io/name: opentelemetry-demo + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/name: opentelemetry-demo + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/secret.yaml +apiVersion: v1 +kind: Secret +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +type: Opaque +data: + admin-user: "YWRtaW4=" + admin-password: "YWRtaW4=" + ldap-toml: "" +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +data: + grafana.ini: | + [analytics] + check_for_updates = true + [auth] + disable_login_form = true + [auth.anonymous] + enabled = true + org_name = Main Org. + org_role = Admin + [grafana_net] + url = https://grafana.net + [log] + mode = console + [paths] + data = /var/lib/grafana/ + logs = /var/log/grafana + plugins = /var/lib/grafana/plugins + provisioning = /etc/grafana/provisioning + [server] + domain = '' + root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana + serve_from_sub_path = true + datasources.yaml: | + apiVersion: 1 + datasources: + - editable: true + isDefault: true + jsonData: + exemplarTraceIdDestinations: + - datasourceUid: webstore-traces + name: trace_id + - name: trace_id + url: http://localhost:8080/jaeger/ui/trace/$${__value.raw} + urlDisplayLabel: View in Jaeger UI + name: Prometheus + type: prometheus + uid: webstore-metrics + url: http://opentelemetry-demo-prometheus-server:9090 + - editable: true + isDefault: false + name: Jaeger + type: jaeger + uid: webstore-traces + url: http://opentelemetry-demo-jaeger-query:16686/jaeger/ui + dashboardproviders.yaml: | + apiVersion: 1 + providers: + - disableDeletion: false + editable: true + folder: "" + name: default + options: + path: /var/lib/grafana/dashboards/default + orgId: 1 + type: file +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server + namespace: otel-demo +data: + allow-snippet-annotations: "false" + alerting_rules.yml: | + {} + alerts: | + {} + prometheus.yml: | + global: + evaluation_interval: 1m + scrape_interval: 1m + scrape_timeout: 10s + rule_files: + - /etc/config/recording_rules.yml + - /etc/config/alerting_rules.yml + - /etc/config/rules + - /etc/config/alerts + scrape_configs: [] + recording_rules.yml: | + {} + rules: | + {} +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/grafana-dashboards.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: opentelemetry-demo-grafana-dashboards + labels: + opentelemetry.io/name: opentelemetry-demo + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/name: opentelemetry-demo + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +data: + demo-dashboard.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 14, + "panels": [], + "title": "Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"system\"}[$__rate_interval])*100", + "hide": false, + "interval": "2m", + "legendFormat": "{{job}} ({{type}})", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"user\"}[$__rate_interval])*100", + "hide": false, + "interval": "2m", + "legendFormat": "{{job}} ({{type}})", + "range": true, + "refId": "B" + } + ], + "title": "Python services (CPU%)", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "opentelemetry-demo/(.*)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "process_runtime_cpython_memory_bytes{type=\"rss\"}", + "legendFormat": "{{job}}", + "range": true, + "refId": "A" + } + ], + "title": "Python services (Memory)", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "opentelemetry-demo/(.*)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "rate(app_recommendations_counter_total{recommendation_type=\"catalog\"}[$__rate_interval])", + "interval": "2m", + "legendFormat": "recommendations", + "range": true, + "refId": "A" + } + ], + "title": "Recommendations Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": " sum by (span_name) (rate(calls_total{status_code=\"STATUS_CODE_ERROR\", service_name=\"${service}\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "{{ span_name }}", + "range": true, + "refId": "A" + } + ], + "title": "Error Rate for ${service} by span name", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dtdurationms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 17 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "legendFormat": "quantile50", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "hide": false, + "legendFormat": "quantile95", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "hide": false, + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "hide": false, + "legendFormat": "quantile999", + "range": true, + "refId": "D" + } + ], + "title": "Latency for ${service}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 17 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum by (span_name) (rate(duration_milliseconds_count{service_name=\"${service}\"}[$__rate_interval]))", + "legendFormat": "{{ span_name }}", + "range": true, + "refId": "A" + } + ], + "title": "Requests Rate for ${service} by span name", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "rate(otel_trace_span_processor_spans{job=\"opentelemetry-demo/quoteservice\"}[2m])*120", + "interval": "2m", + "legendFormat": "{{state}}", + "range": true, + "refId": "A" + } + ], + "title": "Quote Service batch span processor", + "type": "timeseries" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": "", + "current": { + "selected": false, + "text": "frontend", + "value": "frontend" + }, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "definition": "duration_milliseconds_bucket", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "service", + "options": [], + "query": { + "query": "duration_milliseconds_bucket", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/.*service_name=\\\"([^\\\"]+)\\\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Demo Dashboard", + "uid": "W2gX2zHVk", + "version": 1, + "weekStart": "" + } + opentelemetry-collector-data-flow.json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "otelcol metrics dashboard", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 6, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 8, + "panels": [], + "title": "Process", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Otel Collector Instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "count(count(otelcol_process_cpu_seconds{service_instance_id=~\".*\"}) by (service_instance_id))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Instance", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "otelcol_process_cpu_seconds", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 24, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "avg(rate(otelcol_process_cpu_seconds{}[$__rate_interval])*100) by (instance)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Cpu", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Memory Rss\navg(otelcol_process_memory_rss{}) by (instance)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 38, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "avg(otelcol_process_memory_rss{}) by (instance)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Memory", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "", + "gridPos": { + "h": 4, + "w": 15, + "x": 9, + "y": 1 + }, + "id": 32, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "## Opentelemetry Collector Data Ingress/Egress\n\n`service_version:` ${service_version}\n\n`opentelemetry collector:` contrib\n\n", + "mode": "markdown" + }, + "pluginVersion": "9.1.0", + "type": "text" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 10, + "panels": [], + "title": "Trace Pipeline", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "(avg(sum by(job) (rate(otelcol_exporter_sent_spans{}[$__range]))) / avg(sum by(job) (rate(otelcol_receiver_accepted_spans{}[$__range])))) ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "semi-dark-red", + "value": 0 + }, + { + "color": "super-light-orange", + "value": 0.4 + }, + { + "color": "dark-blue", + "value": 0.9 + }, + { + "color": "super-light-orange", + "value": 1.2 + }, + { + "color": "dark-red", + "value": 2.1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 19, + "w": 3, + "x": 0, + "y": 6 + }, + "id": 55, + "options": { + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(sum by(job) (rate(otelcol_exporter_sent_spans{}[$__range])))", + "format": "time_series", + "hide": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "export" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "avg(sum by(job) (rate(otelcol_receiver_accepted_spans{}[$__range])))", + "format": "time_series", + "hide": true, + "legendFormat": "__auto", + "range": true, + "refId": "acc" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "(avg(sum by(job) (rate(otelcol_exporter_sent_spans{}[$__range]))) / avg(sum by(job) (rate(otelcol_receiver_accepted_spans{}[$__range])))) ", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Export Ratio", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "gridPos": { + "h": 11, + "w": 21, + "x": 3, + "y": 6 + }, + "id": 4, + "options": { + "nodes": { + "mainStatUnit": "flops" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "label_join(label_join(\n(rate(otelcol_receiver_accepted_spans{}[$__interval]))\n, \"id\", \"\", \"transport\", \"receiver\")\n, \"title\", \"\", \"transport\", \"receiver\")\n\nor\n\nlabel_replace(label_replace(\nsum by(service_name) (rate(otelcol_receiver_accepted_spans{}[$__interval]))\n, \"id\", \"processor\", \"dummynode\", \"\")\n, \"title\", \"processor\", \"dummynode\", \"\")\n\nor\nlabel_replace(label_replace(\n(rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n, \"id\", \"$0\", \"processor\", \".*\")\n, \"title\", \"$0\", \"processor\", \".*\")\n\nor\nlabel_replace(label_replace(\nsum by(exporter) (rate(otelcol_exporter_sent_spans{}[$__interval]))\n, \"id\", \"exporter\", \"dummynode\", \"\")\n, \"title\", \"exporter\", \"dummynode\", \"\")\n \nor\nlabel_replace(label_replace(\nsum by(exporter) (rate(otelcol_exporter_sent_spans{}[$__interval]))\n, \"id\", \"$0\", \"exporter\", \".*\")\n, \"title\", \"$0\", \"exporter\", \".*\")", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "label_join(\nlabel_replace(label_join(\n(rate(otelcol_receiver_accepted_spans{}[$__interval]))\n\n ,\"source\",\"\",\"transport\",\"receiver\")\n,\"target\",\"processor\",\"\",\"\")\n,\"id\",\"-\",\"source\",\"target\")\n\n or\n\n label_join(\nlabel_replace(label_replace(\n (rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n ,\"source\",\"processor\",\"\",\"\")\n,\"target\",\"$0\",\"processor\",\".*\")\n,\"id\",\"-\",\"source\",\"target\")\n\nor\n label_join(\nlabel_replace(label_replace(\n (rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n ,\"source\",\"$0\",\"processor\",\".*\")\n,\"target\",\"exporter\",\"\",\"\")\n,\"id\",\"-\",\"source\",\"target\")\n\nor\n label_join(\nlabel_replace(label_replace(\n (rate(otelcol_exporter_sent_spans{}[$__interval]))\n ,\"source\",\"exporter\",\"\",\"\")\n,\"target\",\"$0\",\"exporter\",\".*\")\n,\"id\",\"-\",\"source\",\"target\")\n\n", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "transformations": [], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Spans Accepted by Receiver and Transport", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "noValue": "no data", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 3, + "y": 17 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_accepted_spans{}[$__rate_interval])) by (receiver,transport)", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepted", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Spans Accepted ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 8, + "y": 17 + }, + "id": 13, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_accepted_spans{}[$__rate_interval])) ", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Batch Processed", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 11, + "y": 17 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_processor_batch_batch_send_size_sum{}[$__rate_interval])) by (processor)", + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Batch", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 16, + "y": 17 + }, + "id": 14, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_sent_spans{}[$__interval])) ", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Sent by Exporter", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 19, + "y": 17 + }, + "id": 30, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_sent_spans{}[$__rate_interval])) by (exporter)", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Sent", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "noValue": "no data", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 3, + "y": 22 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_refused_spans{}[$__rate_interval])) by (receiver,transport)", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Refused", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Spans Accepted ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 8, + "y": 22 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_refused_spans{}[$__rate_interval])) ", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "otelcol_exporter_send_failed_spans", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 16, + "y": 22 + }, + "id": 19, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_send_failed_spans{}[$__rate_interval])) ", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Sent by Exporter\notelcol_exporter_send_failed_spans", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 22 + }, + "id": 20, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_send_failed_spans{}[$__rate_interval])) by (exporter)", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Failed", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 22, + "panels": [], + "title": "Metrics Pipeline", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "avg(sum by(job) (rate(otelcol_exporter_sent_metric_points{}[$__range]))) versus avg(sum by(job) (rate(otelcol_receiver_accepted_metric_points{}[$__range])))", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "semi-dark-red", + "value": 0 + }, + { + "color": "super-light-orange", + "value": 0.4 + }, + { + "color": "dark-blue", + "value": 0.9 + }, + { + "color": "super-light-orange", + "value": 1.2 + }, + { + "color": "dark-red", + "value": 2.1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 19, + "w": 3, + "x": 0, + "y": 26 + }, + "id": 54, + "options": { + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/.*/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(sum by(job) (rate(otelcol_exporter_sent_metric_points{}[$__range])))", + "format": "time_series", + "hide": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "export" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "avg(sum by(job) (rate(otelcol_receiver_accepted_metric_points{}[$__range])))", + "format": "time_series", + "hide": true, + "legendFormat": "__auto", + "range": true, + "refId": "acc" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "( avg(sum by(job) (rate(otelcol_exporter_sent_metric_points{}[$__range]))) /avg(sum by(job) (rate(otelcol_receiver_accepted_metric_points{}[$__range]))))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Export Ratio", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "percent", + "binary": { + "left": "avg(sum by(job) (rate(otelcol_exporter_sent_metric_points{}[3600s])))", + "operator": "/", + "reducer": "sum", + "right": "avg(sum by(job) (rate(otelcol_receiver_accepted_metric_points{}[3600s])))" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "(sum(rate(otelcol_exporter_sent_metric_points{exporter=\"prometheus\"}[1m0s])) )": true, + "Time": true, + "avg(sum by(job) (rate(otelcol_exporter_sent_metric_points{}[3600s])))": true, + "avg(sum by(job) (rate(otelcol_receiver_accepted_metric_points{}[3600s])))": true, + "{instance=\"otelcol:9464\", job=\"otel\"}": true + }, + "indexByName": {}, + "renameByName": { + "Time": "", + "percent": "Percent", + "{exporter=\"debug\", instance=\"otelcol:8888\", job=\"otel-collector\", service_instance_id=\"fbfa720a-ebf9-45c8-a79a-9d3b6021a663\", service_name=\"otelcol-contrib\", service_version=\"0.70.0\"}": "" + } + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Metrics Signalling Pipelines", + "gridPos": { + "h": 11, + "w": 21, + "x": 3, + "y": 26 + }, + "id": 25, + "options": { + "nodes": { + "mainStatUnit": "flops" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "\nlabel_join(label_join(\n(rate(otelcol_receiver_accepted_metric_points{}[$__interval]))\n, \"id\", \"\", \"transport\", \"receiver\")\n, \"title\", \"\", \"transport\", \"receiver\")\n\nor\n\nlabel_replace(label_replace(\nsum by(service_name) (rate(otelcol_receiver_accepted_spans{}[$__interval]))\n, \"id\", \"processor\", \"dummynode\", \"\")\n, \"title\", \"processor\", \"dummynode\", \"\")\n\n\n\nor\nlabel_replace(label_replace(\n(rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n, \"id\", \"$0\", \"processor\", \".*\")\n, \"title\", \"$0\", \"processor\", \".*\")\n\n\n\n\n\nor\nlabel_replace(label_replace(\nsum (rate(otelcol_exporter_sent_metric_points{}[$__interval]))\n, \"id\", \"exporter\", \"dummynode\", \"\")\n, \"title\", \"exporter\", \"dummynode\", \"\")\n\nor\nlabel_replace(label_replace(\nsum by(exporter) (rate(otelcol_exporter_sent_metric_points{}[$__interval]))\n, \"id\", \"$0\", \"exporter\", \".*\")\n, \"title\", \"$0\", \"exporter\", \".*\")", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "label_join(\nlabel_replace(label_join(\n(rate(otelcol_receiver_accepted_metric_points{}[$__interval]))\n\n,\"source\",\"\",\"transport\",\"receiver\")\n,\"target\",\"processor\",\"\",\"\")\n,\"id\",\"-\",\"source\",\"target\")\n\n\nor\n\nlabel_join(\nlabel_replace(label_replace(\n(rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n,\"source\",\"processor\",\"\",\"\")\n,\"target\",\"$0\",\"processor\",\".*\")\n,\"id\",\"-\",\"source\",\"target\")\n\n\n\n\n\nor\n\n\nlabel_join(\nlabel_replace(label_replace(\n(rate(otelcol_processor_batch_batch_send_size_count{}[$__interval]))\n,\"source\",\"$0\",\"processor\",\".*\")\n,\"target\",\"exporter\",\"\",\"\")\n,\"id\",\"-\",\"source\",\"target\")\n\nor\nlabel_join(\nlabel_replace(label_replace(\n(rate(otelcol_exporter_sent_metric_points{}[$__interval]))\n,\"source\",\"exporter\",\"\",\"\")\n,\"target\",\"$0\",\"exporter\",\".*\")\n,\"id\",\"-\",\"source\",\"target\")", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "transformations": [], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "otelcol_receiver_accepted_metric_points", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "noValue": "no data", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 3, + "y": 37 + }, + "id": 26, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_accepted_metric_points{}[$__rate_interval])) by (receiver,transport)", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepted", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "otelcol_receiver_accepted_metric_points\nTotal Accepted ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 8, + "y": 37 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_accepted_metric_points{}[$__rate_interval])) ", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 11, + "y": 37 + }, + "id": 28, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_processor_batch_batch_send_size_sum{}[$__rate_interval])) by (processor)", + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Batch", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Export ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 16, + "y": 37 + }, + "id": 29, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_sent_metric_points{}[$__rate_interval])) ", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Sent by Exporter", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 19, + "y": 37 + }, + "id": 16, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_sent_metric_points{}[$__rate_interval])) by (exporter) ", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Sent", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "noValue": "no data", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 3, + "y": 42 + }, + "id": 47, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_refused_metric_points{}[$__rate_interval])) by (receiver,transport)", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Refused", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Refused \nsum(rate(otelcol_receiver_refused_metric_points{}[$__rate_interval])) ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 8, + "y": 42 + }, + "id": 48, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "sum(rate(otelcol_receiver_refused_metric_points{}[$__rate_interval])) ", + "legendFormat": "{{receiver}}-{{transport}}", + "range": true, + "refId": "A" + } + ], + "title": "Total ", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Total Failed Export ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 16, + "y": 42 + }, + "id": 49, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_send_failed_metric_points{}[$__rate_interval])) ", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Total", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Sent by Exporter\notelcol_exporter_send_failed_spans", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 42 + }, + "id": 50, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(otelcol_exporter_send_failed_metric_points{}[$__rate_interval])) by (exporter)", + "format": "time_series", + "instant": false, + "legendFormat": "{{processor}}", + "range": true, + "refId": "A" + } + ], + "title": "Failed", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 45 + }, + "id": 35, + "panels": [], + "title": "Prometheus Scrape", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "otelcol prometheus exporter 9464 export rate versus prometheus scrape metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "semi-dark-red", + "value": 0 + }, + { + "color": "super-light-orange", + "value": 0.4 + }, + { + "color": "dark-blue", + "value": 0.9 + }, + { + "color": "super-light-orange", + "value": 1.2 + }, + { + "color": "dark-red", + "value": 2.1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 0, + "y": 46 + }, + "id": 53, + "options": { + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/.*/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum_over_time(scrape_samples_scraped{job=\"otel\"}[$__range])/ count_over_time(scrape_samples_scraped{job=\"otel\"}[$__range])/(5*30)) ", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "accepted" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "(sum(rate(otelcol_exporter_sent_metric_points{exporter=\"prometheus\"}[$__rate_interval])) )", + "format": "time_series", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Exported/Scraped", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "percent", + "binary": { + "left": "{instance=\"otelcol:9464\", job=\"otel\"}", + "operator": "/", + "reducer": "sum", + "right": "(sum(rate(otelcol_exporter_sent_metric_points{exporter=\"prometheus\"}[1m0s])) )" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "(sum(rate(otelcol_exporter_sent_metric_points{exporter=\"prometheus\"}[1m0s])) )": true, + "Time": true, + "{instance=\"otelcol:9464\", job=\"otel\"}": true + }, + "indexByName": {}, + "renameByName": { + "percent": "Percent" + } + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "sum_over_time(scrape_samples_scraped[$__range])/ count_over_time(scrape_samples_scraped[$__range])", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 5, + "x": 3, + "y": 46 + }, + "id": 37, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value_and_name" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum_over_time(scrape_samples_scraped[$__range])/ count_over_time(scrape_samples_scraped[$__range])/(5*30)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}/{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "Samples Scraped", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "scrape_samples_scraped{job!=\"\"}\nTotal Samples Scraped", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 8, + "y": 46 + }, + "id": 42, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum_over_time(scrape_samples_scraped[$__range])/ count_over_time(scrape_samples_scraped[$__range])/(5*30)", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Total", + "transformations": [ + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "include": [ + "{instance=\"otelcol:9464\", job=\"otel\"}", + "{instance=\"otelcol:8888\", job=\"otel-collector\"}" + ], + "reducer": "sum" + }, + "replaceFields": true + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 11, + "y": 46 + }, + "id": 41, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "label_replace(label_replace(label_replace(\nsum (scrape_samples_scraped{job!=\"\"}) by (instance)\n, \"id\", \"$0\", \"instance\", \".*\")\n, \"title\", \"$0\", \"instance\", \".*\")\n,\"mainstat\",\"\",\"\",\"\")\n\nor \n\nlabel_replace(label_replace(label_replace(\nsum (scrape_samples_scraped{job!=\"\"})\n, \"id\", \"prometheus\", \"\", \"\")\n, \"title\", \"prometheus\", \"\", \"\")\n,\"mainstat\",\"\",\"\",\"\")\n", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "label_join(\nlabel_replace(label_replace(\nsum (scrape_samples_scraped{job!=\"\"}) by (instance)\n,\"source\",\"$0\",\"instance\",\".*\")\n,\"target\",\"prometheus\",\"\",\"\")\n,\"id\",\"-\",\"source\",\"target\")", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "Sent by Exporter", + "gridPos": { + "h": 9, + "w": 5, + "x": 19, + "y": 46 + }, + "id": 52, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "\n \n## Prometheus Config\n\n`evaluation_interval:` 30s\n\n`scrape_interval:` 5s", + "mode": "markdown" + }, + "pluginVersion": "9.1.0", + "type": "text" + } + ], + "refresh": false, + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "selected": false, + "text": "0.70.0", + "value": "0.70.0" + }, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "definition": "query_result(sum(otelcol_process_uptime{}) by (service_version))\n", + "hide": 2, + "includeAll": false, + "label": "service_version", + "multi": true, + "name": "service_version", + "options": [], + "query": { + "query": "query_result(sum(otelcol_process_uptime{}) by (service_version))\n", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*service_version=\"(.*)\".*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Opentelemetry Collector Data Flow", + "uid": "rl5_tea4k", + "version": 2, + "weekStart": "" + } + opentelemetry-collector.json: |- + { + "__inputs": [], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.0.3" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "panel", + "id": "nodeGraph", + "name": "Node Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Visualize OpenTelemetry (OTEL) collector metrics (tested with OTEL contrib v0.84.0)", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 15983, + "graphTooltip": 1, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 23, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Receivers", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Accepted: count/rate of spans successfully pushed into the pipeline.\nRefused: count/rate of spans that could not be pushed into the pipeline.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Refused.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 28, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_accepted_spans{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Accepted: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_refused_spans{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Refused: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Spans ${metric:text}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Accepted: count/rate of metric points successfully pushed into the pipeline.\nRefused: count/rate of metric points that could not be pushed into the pipeline.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Refused.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 1 + }, + "id": 32, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_accepted_metric_points{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Accepted: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_refused_metric_points{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Refused: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Metric Points ${metric:text}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Accepted: count/rate of log records successfully pushed into the pipeline.\nRefused: count/rate of log records that could not be pushed into the pipeline.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Refused.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 47, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_accepted_log_records{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Accepted: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_receiver_refused_log_records{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])) by (receiver $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Refused: {{receiver}} {{transport}} {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Log Records ${metric:text}", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 34, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Processors", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*Refused.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/.*Dropped.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 18 + }, + "id": 36, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_processor_batch_batch_send_size_count{processor=~\"$processor\",job=\"$job\"}[$__rate_interval])) by (processor)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Batch send size count: {{processor}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_processor_batch_batch_send_size_sum{processor=~\"$processor\",job=\"$job\"}[$__rate_interval])) by (processor)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Batch send size sum: {{processor}}", + "refId": "A" + } + ], + "title": "Batch Metrics", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Number of units in the batch", + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 18 + }, + "id": 49, + "interval": "$minstep", + "links": [], + "maxDataPoints": 50, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": true, + "scale": "exponential", + "scheme": "Reds", + "steps": 57 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "show": true, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false + } + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(otelcol_processor_batch_batch_send_size_bucket{processor=~\"$processor\",job=\"$job\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "hide": false, + "instant": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "refId": "B" + } + ], + "title": "Batch Send Size Heatmap", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Number of times the batch was sent due to a size trigger. Number of times the batch was sent due to a timeout trigger.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*Refused.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/.*Dropped.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 18 + }, + "id": 56, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_processor_batch_batch_size_trigger_send{processor=~\"$processor\",job=\"$job\"}[$__rate_interval])) by (processor)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Batch sent due to a size trigger: {{processor}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_processor_batch_timeout_trigger_send{processor=~\"$processor\"}[$__rate_interval])) by (processor)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Batch sent due to a timeout trigger: {{processor}}", + "refId": "A" + } + ], + "title": "Batch Metrics", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 25, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Exporters", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Sent: count/rate of spans successfully sent to destination.\nEngueue: count/rate of spans failed to be added to the sending queue.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Failed:.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 27 + }, + "id": 37, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_sent_spans{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Sent: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_enqueue_failed_spans{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Enqueue: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_send_failed_spans{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Failed: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "C" + } + ], + "title": "Spans ${metric:text}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Sent: count/rate of metric points successfully sent to destination.\nEngueue: count/rate of metric points failed to be added to the sending queue.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Failed:.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 27 + }, + "id": 38, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_sent_metric_points{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Sent: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_enqueue_failed_metric_points{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Enqueue: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_send_failed_metric_points{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Failed: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "C" + } + ], + "title": "Metric Points ${metric:text}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Sent: count/rate of log records successfully sent to destination.\nEngueue: count/rate of log records failed to be added to the sending queue.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Failed:.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 27 + }, + "id": 48, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_sent_log_records{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Sent: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_enqueue_failed_log_records{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Enqueue: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(${metric:value}(otelcol_exporter_send_failed_log_records{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])) by (exporter $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Failed: {{exporter}} {{service_instance_id}}", + "range": true, + "refId": "C" + } + ], + "title": "Log Records ${metric:text}", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Current size of the retry queue (in batches)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 36 + }, + "id": 10, + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(otelcol_exporter_queue_size{exporter=~\"$exporter\",job=\"$job\"}) by (exporter)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Max queue size: {{exporter}}", + "range": true, + "refId": "A" + } + ], + "title": "Exporter Queue Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Fixed capacity of the retry queue (in batches)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 55, + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(otelcol_exporter_queue_capacity{exporter=~\"$exporter\",job=\"$job\"}) by (exporter)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Queue capacity: {{exporter}}", + "range": true, + "refId": "A" + } + ], + "title": "Exporter Queue Capacity", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 45 + }, + "id": 21, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Collector", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Total physical memory (resident set size)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Avg Memory RSS " + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Min Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Min Memory RSS " + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 46 + }, + "id": 40, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(otelcol_process_memory_rss{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Max Memory RSS {{service_instance_id}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(otelcol_process_memory_rss{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Avg Memory RSS {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(otelcol_process_memory_rss{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Min Memory RSS {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Total RSS Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys')", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Avg Memory RSS " + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Min Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Min Memory RSS " + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 46 + }, + "id": 52, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(otelcol_process_runtime_total_sys_memory_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Max Memory RSS {{service_instance_id}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(otelcol_process_runtime_total_sys_memory_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Avg Memory RSS {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(otelcol_process_runtime_total_sys_memory_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Min Memory RSS {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Total Runtime Sys Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc')", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Avg Memory RSS " + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Min Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg Memory RSS " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Min Memory RSS " + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 46 + }, + "id": 53, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(otelcol_process_runtime_heap_alloc_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Max Memory RSS {{service_instance_id}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(otelcol_process_runtime_heap_alloc_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Avg Memory RSS {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(otelcol_process_runtime_heap_alloc_bytes{job=\"$job\"}) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Min Memory RSS {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Total Runtime Heap Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Total CPU user and system time in percentage", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max CPU usage " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Avg CPU usage " + }, + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Avg CPU usage " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + }, + { + "id": "custom.fillBelowTo", + "value": "Min CPU usage " + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Min CPU usage " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 55 + }, + "id": 39, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(rate(otelcol_process_cpu_seconds{job=\"$job\"}[$__rate_interval])*100) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Max CPU usage {{service_instance_id}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(rate(otelcol_process_cpu_seconds{job=\"$job\"}[$__rate_interval])*100) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Avg CPU usage {{service_instance_id}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(rate(otelcol_process_cpu_seconds{job=\"$job\"}[$__rate_interval])*100) by (job $grouping)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Min CPU usage {{service_instance_id}}", + "range": true, + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Number of service instances, which are reporting metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 55 + }, + "id": 41, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count(otelcol_process_cpu_seconds{service_instance_id=~\".*\",job=\"$job\"}) by (service_instance_id))", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Service instance count", + "range": true, + "refId": "B" + } + ], + "title": "Service Instance Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 55 + }, + "id": 54, + "interval": "$minstep", + "links": [], + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(otelcol_process_uptime{service_instance_id=~\".*\",job=\"$job\"}) by (service_instance_id)", + "format": "time_series", + "hide": false, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "Service instance uptime: {{service_instance_id}}", + "range": true, + "refId": "B" + } + ], + "title": "Uptime by Service Instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 57, + "interval": "$minstep", + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(otelcol_process_uptime{service_instance_id=~\".*\",job=\"$job\"}) by (service_instance_id,service_name,service_version)", + "format": "table", + "hide": false, + "instant": true, + "interval": "$minstep", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "Service Instance Details", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 69 + }, + "id": 59, + "panels": [], + "title": "Data Flows", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Receivers -> Processor(s) -> Exporters (Node Graph panel is beta, so this panel may not show data correctly).", + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 70 + }, + "id": 58, + "options": { + "nodes": { + "mainStatUnit": "flops" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers\nlabel_replace(\n label_join(\n label_join(\n sum(${metric:value}(\n otelcol_receiver_accepted_spans{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])\n ) by (receiver)\n , \"id\", \"-rcv-\", \"transport\", \"receiver\"\n )\n , \"title\", \"\", \"transport\", \"receiver\"\n )\n , \"icon\", \"arrow-to-right\", \"\", \"\"\n)\n\n# dummy processor\nor\nlabel_replace(\n label_replace(\n label_replace(\n (sum(rate(otelcol_process_uptime{job=\"$job\"}[$__interval])))\n , \"id\", \"processor\", \"\", \"\"\n )\n , \"title\", \"Processor(s)\", \"\", \"\"\n )\n , \"icon\", \"arrow-random\", \"\", \"\"\n)\n\n# exporters\nor\nlabel_replace(\n label_join(\n label_join(\n sum(${metric:value}(\n otelcol_exporter_sent_spans{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])\n ) by (exporter)\n , \"id\", \"-exp-\", \"transport\", \"exporter\"\n )\n , \"title\", \"\", \"transport\", \"exporter\"\n )\n , \"icon\", \"arrow-from-right\", \"\", \"\"\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers -> processor\r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_receiver_accepted_spans{job=\"$job\"}[$__interval])) by (receiver))\r\n ,\"source\", \"-rcv-\", \"transport\", \"receiver\"\r\n )\r\n ,\"target\", \"processor\", \"\", \"\"\r\n )\r\n , \"id\", \"-\", \"source\", \"target\"\r\n)\r\n\r\n# processor -> exporters\r\nor\r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_exporter_sent_spans{job=\"$job\"}[$__interval])) by (exporter))\r\n , \"target\", \"-exp-\", \"transport\", \"exporter\"\r\n )\r\n , \"source\", \"processor\", \"\", \"\"\r\n )\r\n , \"id\", \"-\", \"source\", \"target\"\r\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "title": "Spans Flow", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "mainstat" + } + }, + { + "disabled": true, + "id": "calculateField", + "options": { + "alias": "secondarystat", + "mode": "reduceRow", + "reduce": { + "include": [ + "mainstat" + ], + "reducer": "sum" + } + } + } + ], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Receivers -> Processor(s) -> Exporters (Node Graph panel is beta, so this panel may not show data correctly).", + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 70 + }, + "id": 60, + "options": { + "nodes": { + "mainStatUnit": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers\nlabel_replace(\n label_join(\n label_join(\n (sum(\n ${metric:value}(otelcol_receiver_accepted_metric_points{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])\n ) by (receiver))\n , \"id\", \"-rcv-\", \"transport\", \"receiver\"\n )\n , \"title\", \"\", \"transport\", \"receiver\"\n )\n , \"icon\", \"arrow-to-right\", \"\", \"\"\n)\n\n# dummy processor\nor\nlabel_replace(\n label_replace(\n label_replace(\n (sum(rate(otelcol_process_uptime{job=\"$job\"}[$__interval])))\n , \"id\", \"processor\", \"\", \"\"\n )\n , \"title\", \"Processor(s)\", \"\", \"\"\n )\n , \"icon\", \"arrow-random\", \"\", \"\"\n)\n\n# exporters\nor\nlabel_replace(\n label_join(\n label_join(\n (sum(\n ${metric:value}(otelcol_exporter_sent_metric_points{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])\n ) by (exporter))\n , \"id\", \"-exp-\", \"transport\", \"exporter\"\n )\n , \"title\", \"\", \"transport\", \"exporter\"\n )\n , \"icon\", \"arrow-from-right\", \"\", \"\"\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers -> processor\r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_receiver_accepted_metric_points{job=\"$job\"}[$__interval])) by (receiver))\r\n , \"source\", \"-rcv-\", \"transport\", \"receiver\"\r\n )\r\n , \"target\", \"processor\", \"\", \"\"\r\n )\r\n , \"id\", \"-\", \"source\", \"target\"\r\n)\r\n\r\n# processor -> exporters\r\nor \r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_exporter_sent_metric_points{job=\"$job\"}[$__interval])) by (exporter))\r\n , \"target\", \"-exp-\", \"transport\", \"exporter\"\r\n )\r\n , \"source\", \"processor\", \"\", \"\"\r\n )\r\n , \"id\", \"-\", \"source\", \"target\"\r\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "title": "Metric Points Flow", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "mainstat" + } + }, + { + "disabled": true, + "id": "calculateField", + "options": { + "alias": "secondarystat", + "mode": "reduceRow", + "reduce": { + "include": [ + "Value #nodes" + ], + "reducer": "sum" + } + } + } + ], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Receivers -> Processor(s) -> Exporters (Node Graph panel is beta, so this panel may not show data correctly).", + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 70 + }, + "id": 61, + "options": { + "nodes": { + "mainStatUnit": "flops" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers\nlabel_replace(\n label_join(\n label_join(\n sum(${metric:value}(\n otelcol_receiver_accepted_log_records{receiver=~\"$receiver\",job=\"$job\"}[$__rate_interval])\n ) by (receiver)\n , \"id\", \"-rcv-\", \"transport\", \"receiver\"\n )\n , \"title\", \"\", \"transport\", \"receiver\"\n )\n , \"icon\", \"arrow-to-right\", \"\", \"\"\n)\n\n# dummy processor\nor\nlabel_replace(\n label_replace(\n label_replace(\n (sum(rate(otelcol_process_uptime{job=\"$job\"}[$__interval])))\n , \"id\", \"processor\", \"\", \"\"\n )\n , \"title\", \"Processor(s)\", \"\", \"\"\n )\n , \"icon\", \"arrow-random\", \"\", \"\"\n)\n\n# exporters\nor\nlabel_replace(\n label_join(\n label_join(\n sum(${metric:value}(\n otelcol_exporter_sent_log_records{exporter=~\"$exporter\",job=\"$job\"}[$__rate_interval])\n ) by (exporter)\n , \"id\", \"-exp-\", \"transport\", \"exporter\"\n )\n , \"title\", \"\", \"transport\", \"exporter\"\n )\n , \"icon\", \"arrow-from-right\", \"\", \"\"\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "nodes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "# receivers -> processor\r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_receiver_accepted_log_records{job=\"$job\"}[$__interval])) by (receiver))\r\n , \"source\", \"-rcv-\", \"transport\", \"receiver\"\r\n )\r\n , \"target\", \"processor\", \"\", \"\"\r\n )\r\n , \"id\", \"-edg-\", \"source\", \"target\"\r\n)\r\n\r\n# processor -> exporters\r\nor \r\nlabel_join(\r\n label_replace(\r\n label_join(\r\n (sum(rate(otelcol_exporter_sent_log_records{job=\"$job\"}[$__interval])) by (exporter))\r\n ,\"target\",\"-exp-\",\"transport\",\"exporter\"\r\n )\r\n ,\"source\",\"processor\",\"\",\"\"\r\n )\r\n ,\"id\",\"-edg-\",\"source\",\"target\"\r\n)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "edges" + } + ], + "title": "Log Records Flow", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "mainstat" + } + }, + { + "disabled": true, + "id": "calculateField", + "options": { + "alias": "secondarystat", + "mode": "reduceRow", + "reduce": { + "include": [ + "mainstat" + ], + "reducer": "sum" + } + } + } + ], + "type": "nodeGraph" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editable": true, + "error": false, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 79 + }, + "id": 45, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": " | \nOTEL collector troubleshooting (how to enable telemetry metrics) | \nScaling the Collector (metrics to watch) | \nInstalled from Grafana.com dashboards", + "mode": "html" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Documentation", + "type": "text" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "opentelemetry", + "monitoring" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(otelcol_process_uptime, job)", + "hide": 0, + "includeAll": false, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(otelcol_process_uptime, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "auto": true, + "auto_count": 300, + "auto_min": "10s", + "current": { + "selected": false, + "text": "auto", + "value": "$__auto_interval_minstep" + }, + "hide": 0, + "label": "Min step", + "name": "minstep", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_minstep" + }, + { + "selected": false, + "text": "10s", + "value": "10s" + }, + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + } + ], + "query": "10s,30s,1m,5m", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "current": { + "selected": true, + "text": "Rate", + "value": "rate" + }, + "hide": 0, + "includeAll": false, + "label": "Base metric", + "multi": false, + "name": "metric", + "options": [ + { + "selected": true, + "text": "Rate", + "value": "rate" + }, + { + "selected": false, + "text": "Count", + "value": "increase" + } + ], + "query": "Rate : rate, Count : increase", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(receiver)", + "hide": 0, + "includeAll": true, + "label": "Receiver", + "multi": false, + "name": "receiver", + "options": [], + "query": { + "query": "label_values(receiver)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(processor)", + "hide": 0, + "includeAll": true, + "label": "Processor", + "multi": false, + "name": "processor", + "options": [], + "query": { + "query": "label_values(processor)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(exporter)", + "hide": 0, + "includeAll": true, + "label": "Exporter", + "multi": false, + "name": "exporter", + "options": [], + "query": { + "query": "label_values(exporter)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": true, + "text": "None (basic metrics)", + "value": "" + }, + "description": "Detailed metrics must be configured in the collector configuration. They add grouping by transport protocol (http/grpc) for receivers. ", + "hide": 0, + "includeAll": false, + "label": "Additional groupping", + "multi": false, + "name": "grouping", + "options": [ + { + "selected": true, + "text": "None (basic metrics)", + "value": "" + }, + { + "selected": false, + "text": "By transport (detailed metrics)", + "value": ",transport" + }, + { + "selected": false, + "text": "By service instance id", + "value": ",service_instance_id" + } + ], + "query": "None (basic metrics) : , By transport (detailed metrics) : \\,transport, By service instance id : \\,service_instance_id", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "utc", + "title": "OpenTelemetry Collector", + "uid": "BKf2sowmj", + "version": 72, + "weekStart": "" + } + spanmetrics-dashboard.json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Spanmetrics way of demo application view.", + "author": { + "name": "devrimdemiroz" + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 24, + "panels": [], + "title": "Service Level - Throughput and Latencies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 2 + }, + { + "color": "#EAB839", + "value": 64 + }, + { + "color": "orange", + "value": 128 + }, + { + "color": "red", + "value": 256 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 20, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, + "interval": "5m", + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name)))", + "format": "time_series", + "hide": true, + "instant": false, + "interval": "", + "legendFormat": "{{service_name}}-quantile_0.50", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])) by (le,service_name)))", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{le}} - {{service_name}}", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile999", + "range": true, + "refId": "D" + } + ], + "title": "Top 3x3 - Service Latency - quantile95", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-blue", + "value": 1 + }, + { + "color": "#EAB839", + "value": 2 + }, + { + "color": "red", + "value": 10 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "interval": "5m", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum by (service_name) (rate(calls_total{service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])))", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{service_name}}", + "range": false, + "refId": "A" + } + ], + "title": "Top 7 Services Mean Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-reds" + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 15 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 15, + "interval": "5m", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum(rate(calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])) by (service_name))", + "instant": true, + "interval": "", + "legendFormat": "{{service_name}}", + "range": false, + "refId": "A" + } + ], + "title": "Top 7 Services Mean ERROR Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 14, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "refId": "A" + } + ], + "title": "span_names Level - Throughput", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "bRate" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "color", + "value": { + "mode": "continuous-BlYlRd" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "eRate" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "color", + "value": { + "mode": "continuous-RdYlGr" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Error Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 663 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 667 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Service" + }, + "properties": [ + { + "id": "custom.width", + "value": null + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 22, + "interval": "5m", + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "exemplar": false, + "expr": "topk(7, sum(rate(calls_total{service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])) by (span_name,service_name)) ", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "Rate" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "exemplar": false, + "expr": "topk(7, sum(rate(calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])) by (span_name,service_name))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "Error Rate" + } + ], + "title": "Top 7 span_names and Errors (APM Table)", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "span_name" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true + }, + "indexByName": {}, + "renameByName": { + "Value #Error Rate": "Error Rate", + "Value #Rate": "Rate", + "service_name 1": "Rate in Service", + "service_name 2": "Error Rate in Service" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "bRate", + "mode": "reduceRow", + "reduce": { + "include": [ + "Rate" + ], + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "eRate", + "mode": "reduceRow", + "reduce": { + "include": [ + "Error Rate" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Error Rate": true, + "Rate": true, + "bRate": false + }, + "indexByName": { + "Error Rate": 4, + "Error Rate in Service": 6, + "Rate": 1, + "Rate in Service": 5, + "bRate": 2, + "eRate": 3, + "span_name": 0 + }, + "renameByName": { + "Rate in Service": "Service", + "bRate": "Rate", + "eRate": "Error Rate", + "span_name": "span_name Name" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Rate" + } + ] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 20, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "refId": "A" + } + ], + "title": "span_name Level - Latencies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 2 + }, + { + "color": "#EAB839", + "value": 64 + }, + { + "color": "orange", + "value": 128 + }, + { + "color": "red", + "value": 256 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 25, + "interval": "5m", + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name)))", + "format": "time_series", + "hide": true, + "instant": false, + "interval": "", + "legendFormat": "{{service_name}}-quantile_0.50", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__range])) by (le,span_name)))", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{span_name}}", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile999", + "range": true, + "refId": "D" + } + ], + "title": "Top 3x3 - span_name Latency - quantile95", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 10, + "interval": "5m", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7, sum by (span_name,service_name)(increase(duration_milliseconds_sum{service_name=~\"${service}\", span_name=~\"$span_name\"}[5m]) / increase(duration_milliseconds_count{service_name=~\"${service}\",span_name=~\"$span_name\"}[5m\n])))", + "instant": true, + "interval": "", + "legendFormat": "{{span_name}} [{{service_name}}]", + "range": false, + "refId": "A" + } + ], + "title": "Top 7 Highest Endpoint Latencies Mean Over Range ", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 16, + "interval": "5m", + "options": { + "legend": { + "calcs": [ + "mean", + "logmin", + "max", + "delta" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": true, + "expr": "topk(7,sum by (span_name,service_name)(increase(duration_milliseconds_sum{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval]) / increase(duration_milliseconds_count{service_name=~\"$service\", span_name=~\"$span_name\"}[$__rate_interval])))", + "instant": false, + "interval": "", + "legendFormat": "[{{service_name}}] {{span_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Top 7 Latencies Over Range ", + "type": "timeseries" + } + ], + "refresh": "5m", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "definition": "query_result(count by (service_name)(count_over_time(calls_total[$__range])))", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "service", + "options": [], + "query": { + "query": "query_result(count by (service_name)(count_over_time(calls_total[$__range])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*service_name=\"(.*)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "definition": "query_result(sum ({__name__=~\".*calls_total\",service_name=~\"$service\"}) by (span_name))", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "span_name", + "options": [], + "query": { + "query": "query_result(sum ({__name__=~\".*calls_total\",service_name=~\"$service\"}) by (span_name))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*span_name=\"(.*)\".*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Spanmetrics Demo Dashboard", + "uid": "W2gX2zHVk48", + "version": 1, + "weekStart": "" + } +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" + name: opentelemetry-demo-grafana-clusterrole +rules: [] +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opentelemetry-demo-otelcol + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" +rules: + - apiGroups: [""] + resources: ["pods", "namespaces"] + verbs: ["get", "watch", "list"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["extensions"] + resources: ["replicasets"] + verbs: ["get", "list", "watch"] +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server +rules: + - apiGroups: + - "" + resources: + - nodes + - nodes/proxy + - nodes/metrics + - services + - endpoints + - pods + - ingresses + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "extensions" + - "networking.k8s.io" + resources: + - ingresses/status + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - "discovery.k8s.io" + resources: + - endpointslices + verbs: + - get + - list + - watch + - nonResourceURLs: + - "/metrics" + verbs: + - get +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: opentelemetry-demo-grafana-clusterrolebinding + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +subjects: + - kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo +roleRef: + kind: ClusterRole + name: opentelemetry-demo-grafana-clusterrole + apiGroup: rbac.authorization.k8s.io +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: opentelemetry-demo-otelcol + labels: + app.kubernetes.io/name: otelcol + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "0.88.0" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-demo-otelcol +subjects: + - kind: ServiceAccount + name: opentelemetry-demo-otelcol + namespace: otel-demo +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server +subjects: + - kind: ServiceAccount + name: opentelemetry-demo-prometheus-server + namespace: otel-demo +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-demo-prometheus-server +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +rules: [] +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: opentelemetry-demo-grafana +subjects: + - kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +spec: + type: ClusterIP + ports: + - name: service + port: 80 + protocol: TCP + targetPort: 3000 + selector: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/jaeger/templates/allinone-agent-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-jaeger-agent + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "1.51.0" + app.kubernetes.io/component: service-agent +spec: + clusterIP: None + ports: + - name: zk-compact-trft + port: 5775 + protocol: UDP + targetPort: 0 + - name: config-rest + port: 5778 + targetPort: 0 + - name: jg-compact-trft + port: 6831 + protocol: UDP + targetPort: 0 + - name: jg-binary-trft + port: 6832 + protocol: UDP + targetPort: 0 + selector: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/jaeger/templates/allinone-collector-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-jaeger-collector + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "1.51.0" + app.kubernetes.io/component: service-collector +spec: + clusterIP: None + ports: + - name: http-zipkin + port: 9411 + targetPort: 0 + - name: grpc-http + port: 14250 + targetPort: 0 + - name: c-tchan-trft + port: 14267 + targetPort: 0 + - name: http-c-binary-trft + port: 14268 + targetPort: 0 + - name: otlp-grpc + port: 4317 + targetPort: 0 + - name: otlp-http + port: 4318 + targetPort: 0 + selector: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/jaeger/templates/allinone-query-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-jaeger-query + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "1.51.0" + app.kubernetes.io/component: service-query +spec: + clusterIP: None + ports: + - name: http-query + port: 16686 + targetPort: 16686 + - name: grpc-query + port: 16685 + targetPort: 16685 + selector: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: all-in-one + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/prometheus/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server + namespace: otel-demo +spec: + ports: + - name: http + port: 9090 + protocol: TCP + targetPort: 9090 + selector: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + sessionAffinity: None + type: "ClusterIP" + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-adservice + labels: + opentelemetry.io/name: opentelemetry-demo-adservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: adservice + app.kubernetes.io/name: opentelemetry-demo-adservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-adservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-cartservice + labels: + opentelemetry.io/name: opentelemetry-demo-cartservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: cartservice + app.kubernetes.io/name: opentelemetry-demo-cartservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-cartservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-checkoutservice + labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: checkoutservice + app.kubernetes.io/name: opentelemetry-demo-checkoutservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-checkoutservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-currencyservice + labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: currencyservice + app.kubernetes.io/name: opentelemetry-demo-currencyservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-currencyservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-emailservice + labels: + opentelemetry.io/name: opentelemetry-demo-emailservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: emailservice + app.kubernetes.io/name: opentelemetry-demo-emailservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-emailservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-featureflagservice + labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: featureflagservice + app.kubernetes.io/name: opentelemetry-demo-featureflagservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 50053 + name: grpc + targetPort: 50053 + - port: 8081 + name: http + targetPort: 8081 + selector: + opentelemetry.io/name: opentelemetry-demo-featureflagservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-ffspostgres + labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: ffspostgres + app.kubernetes.io/name: opentelemetry-demo-ffspostgres + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 5432 + name: postgres + targetPort: 5432 + selector: + opentelemetry.io/name: opentelemetry-demo-ffspostgres + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-frontend + labels: + opentelemetry.io/name: opentelemetry-demo-frontend + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontend + app.kubernetes.io/name: opentelemetry-demo-frontend + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-frontend + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-frontendproxy + labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontendproxy + app.kubernetes.io/name: opentelemetry-demo-frontendproxy + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-frontendproxy + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-kafka + labels: + opentelemetry.io/name: opentelemetry-demo-kafka + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: kafka + app.kubernetes.io/name: opentelemetry-demo-kafka + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 9092 + name: plaintext + targetPort: 9092 + - port: 9093 + name: controller + targetPort: 9093 + selector: + opentelemetry.io/name: opentelemetry-demo-kafka + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-loadgenerator + labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: loadgenerator + app.kubernetes.io/name: opentelemetry-demo-loadgenerator + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8089 + name: tcp-service + targetPort: 8089 + selector: + opentelemetry.io/name: opentelemetry-demo-loadgenerator + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-paymentservice + labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: paymentservice + app.kubernetes.io/name: opentelemetry-demo-paymentservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-paymentservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-productcatalogservice + labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: productcatalogservice + app.kubernetes.io/name: opentelemetry-demo-productcatalogservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-quoteservice + labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: quoteservice + app.kubernetes.io/name: opentelemetry-demo-quoteservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-quoteservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-recommendationservice + labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: recommendationservice + app.kubernetes.io/name: opentelemetry-demo-recommendationservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-recommendationservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-redis + labels: + opentelemetry.io/name: opentelemetry-demo-redis + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: redis + app.kubernetes.io/name: opentelemetry-demo-redis + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 6379 + name: redis + targetPort: 6379 + selector: + opentelemetry.io/name: opentelemetry-demo-redis + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: v1 +kind: Service +metadata: + name: opentelemetry-demo-shippingservice + labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: shippingservice + app.kubernetes.io/name: opentelemetry-demo-shippingservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + type: ClusterIP + ports: + - port: 8080 + name: tcp-service + targetPort: 8080 + selector: + opentelemetry.io/name: opentelemetry-demo-shippingservice + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-grafana + namespace: otel-demo + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +spec: + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + strategy: + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + annotations: + checksum/config: 743ad05e1a852116d6bfeab2e3fbec57091448a15bc97c5b8d5c8ed5d89f9531 + checksum/dashboards-json-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret: f37dc127378b75e32576182571ac9b3826d217955ddda163afa1fde86c1cc056 + kubectl.kubernetes.io/default-container: grafana + spec: + serviceAccountName: opentelemetry-demo-grafana + automountServiceAccountToken: true + securityContext: + fsGroup: 472 + runAsGroup: 472 + runAsNonRoot: true + runAsUser: 472 + enableServiceLinks: true + containers: + - name: grafana + image: "docker.io/grafana/grafana:10.1.5" + imagePullPolicy: IfNotPresent + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault + volumeMounts: + - name: config + mountPath: "/etc/grafana/grafana.ini" + subPath: grafana.ini + - name: storage + mountPath: "/var/lib/grafana" + - name: dashboards-default + mountPath: "/var/lib/grafana/dashboards/default" + - name: config + mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml" + subPath: "datasources.yaml" + - name: config + mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" + subPath: "dashboardproviders.yaml" + ports: + - name: grafana + containerPort: 3000 + protocol: TCP + - name: gossip-tcp + containerPort: 9094 + protocol: TCP + - name: gossip-udp + containerPort: 9094 + protocol: UDP + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: GF_SECURITY_ADMIN_USER + valueFrom: + secretKeyRef: + name: opentelemetry-demo-grafana + key: admin-user + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: opentelemetry-demo-grafana + key: admin-password + - name: GF_PATHS_DATA + value: /var/lib/grafana/ + - name: GF_PATHS_LOGS + value: /var/log/grafana + - name: GF_PATHS_PLUGINS + value: /var/lib/grafana/plugins + - name: GF_PATHS_PROVISIONING + value: /etc/grafana/provisioning + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + livenessProbe: + failureThreshold: 10 + httpGet: + path: /api/health + port: 3000 + initialDelaySeconds: 60 + timeoutSeconds: 30 + readinessProbe: + httpGet: + path: /api/health + port: 3000 + resources: + limits: + memory: 150Mi + volumes: + - name: config + configMap: + name: opentelemetry-demo-grafana + - name: dashboards-default + configMap: + name: opentelemetry-demo-grafana-dashboards + - name: storage + emptyDir: {} +--- +# Source: opentelemetry-demo/charts/jaeger/templates/allinone-deploy.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-jaeger + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "1.51.0" + app.kubernetes.io/component: all-in-one + prometheus.io/port: "14269" + prometheus.io/scrape: "true" +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: all-in-one + template: + metadata: + labels: + app.kubernetes.io/name: jaeger + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: all-in-one + annotations: + prometheus.io/port: "14269" + prometheus.io/scrape: "true" + spec: + containers: + - env: + - name: METRICS_STORAGE_TYPE + value: prometheus + - name: SPAN_STORAGE_TYPE + value: memory + - name: COLLECTOR_ZIPKIN_HOST_PORT + value: :9411 + - name: JAEGER_DISABLED + value: "false" + - name: COLLECTOR_OTLP_ENABLED + value: "true" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + image: jaegertracing/all-in-one:1.51.0 + imagePullPolicy: IfNotPresent + name: jaeger + args: + - "--memory.max-traces=8000" + - "--query.base-path=/jaeger/ui" + - "--prometheus.server-url=http://opentelemetry-demo-prometheus-server:9090" + - "--prometheus.query.normalize-calls=true" + - "--prometheus.query.normalize-duration=true" + ports: + - containerPort: 5775 + protocol: UDP + - containerPort: 6831 + protocol: UDP + - containerPort: 6832 + protocol: UDP + - containerPort: 5778 + protocol: TCP + - containerPort: 16686 + protocol: TCP + - containerPort: 16685 + protocol: TCP + - containerPort: 9411 + protocol: TCP + - containerPort: 4317 + protocol: TCP + - containerPort: 4318 + protocol: TCP + livenessProbe: + failureThreshold: 5 + httpGet: + path: / + port: 14269 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 15 + successThreshold: 1 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 14269 + scheme: HTTP + initialDelaySeconds: 1 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + memory: 300Mi + volumeMounts: + serviceAccountName: opentelemetry-demo-jaeger + volumes: +--- +# Source: opentelemetry-demo/charts/prometheus/templates/deploy.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + name: opentelemetry-demo-prometheus-server + namespace: otel-demo +spec: + selector: + matchLabels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + replicas: 1 + revisionHistoryLimit: 10 + strategy: + type: Recreate + rollingUpdate: null + template: + metadata: + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: prometheus + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: v2.47.2 + app.kubernetes.io/part-of: prometheus + spec: + enableServiceLinks: true + serviceAccountName: opentelemetry-demo-prometheus-server + containers: + - name: prometheus-server + image: "quay.io/prometheus/prometheus:v2.47.2" + imagePullPolicy: "IfNotPresent" + args: + - --storage.tsdb.retention.time=15d + - --config.file=/etc/config/prometheus.yml + - --storage.tsdb.path=/data + - --web.console.libraries=/etc/prometheus/console_libraries + - --web.console.templates=/etc/prometheus/consoles + - --enable-feature=exemplar-storage + - --enable-feature=otlp-write-receiver + ports: + - containerPort: 9090 + readinessProbe: + httpGet: + path: /-/ready + port: 9090 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 5 + timeoutSeconds: 4 + failureThreshold: 3 + successThreshold: 1 + livenessProbe: + httpGet: + path: /-/healthy + port: 9090 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 15 + timeoutSeconds: 10 + failureThreshold: 3 + successThreshold: 1 + resources: + limits: + memory: 300Mi + volumeMounts: + - name: config-volume + mountPath: /etc/config + - name: storage-volume + mountPath: /data + subPath: "" + env: + name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + dnsPolicy: ClusterFirst + securityContext: + fsGroup: 65534 + runAsGroup: 65534 + runAsNonRoot: true + runAsUser: 65534 + terminationGracePeriodSeconds: 300 + volumes: + - name: config-volume + configMap: + name: opentelemetry-demo-prometheus-server + - name: storage-volume + emptyDir: {} +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-accountingservice + labels: + opentelemetry.io/name: opentelemetry-demo-accountingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: accountingservice + app.kubernetes.io/name: opentelemetry-demo-accountingservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-accountingservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-accountingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: accountingservice + app.kubernetes.io/name: opentelemetry-demo-accountingservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: accountingservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-accountingservice' + imagePullPolicy: IfNotPresent + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi + initContainers: + - command: + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + image: busybox:latest + name: wait-for-kafka +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-adservice + labels: + opentelemetry.io/name: opentelemetry-demo-adservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: adservice + app.kubernetes.io/name: opentelemetry-demo-adservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-adservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-adservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: adservice + app.kubernetes.io/name: opentelemetry-demo-adservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: adservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-adservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: AD_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_LOGS_EXPORTER + value: otlp + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 300Mi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-cartservice + labels: + opentelemetry.io/name: opentelemetry-demo-cartservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: cartservice + app.kubernetes.io/name: opentelemetry-demo-cartservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-cartservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-cartservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: cartservice + app.kubernetes.io/name: opentelemetry-demo-cartservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: cartservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-cartservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CART_SERVICE_PORT + value: "8080" + - name: ASPNETCORE_URLS + value: http://*:$(CART_SERVICE_PORT) + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: REDIS_ADDR + value: 'opentelemetry-demo-redis:6379' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 160Mi + initContainers: + - command: + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting for redis; sleep 2; done; + image: busybox:latest + name: wait-for-redis +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-checkoutservice + labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: checkoutservice + app.kubernetes.io/name: opentelemetry-demo-checkoutservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-checkoutservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: checkoutservice + app.kubernetes.io/name: opentelemetry-demo-checkoutservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: checkoutservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-checkoutservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CHECKOUT_SERVICE_PORT + value: "8080" + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: EMAIL_SERVICE_ADDR + value: http://opentelemetry-demo-emailservice:8080 + - name: PAYMENT_SERVICE_ADDR + value: 'opentelemetry-demo-paymentservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi + initContainers: + - command: + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + image: busybox:latest + name: wait-for-kafka +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-currencyservice + labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: currencyservice + app.kubernetes.io/name: opentelemetry-demo-currencyservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-currencyservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-currencyservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: currencyservice + app.kubernetes.io/name: opentelemetry-demo-currencyservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: currencyservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-currencyservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CURRENCY_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-emailservice + labels: + opentelemetry.io/name: opentelemetry-demo-emailservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: emailservice + app.kubernetes.io/name: opentelemetry-demo-emailservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-emailservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-emailservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: emailservice + app.kubernetes.io/name: opentelemetry-demo-emailservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: emailservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-emailservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: EMAIL_SERVICE_PORT + value: "8080" + - name: APP_ENV + value: production + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(NODE_IP):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 100Mi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-featureflagservice + labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: featureflagservice + app.kubernetes.io/name: opentelemetry-demo-featureflagservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-featureflagservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: featureflagservice + app.kubernetes.io/name: opentelemetry-demo-featureflagservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: featureflagservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-featureflagservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 50053 + name: grpc + - containerPort: 8081 + name: http + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_GRPC_SERVICE_PORT + value: "50053" + - name: DATABASE_URL + value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: grpc + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 175Mi + livenessProbe: + httpGet: + path: /featureflags/ + port: 8081 + initialDelaySeconds: 30 + periodSeconds: 10 + initContainers: + - command: + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo waiting for ffspostgres; sleep 2; done + image: busybox:latest + name: wait-for-ffspostgres +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-ffspostgres + labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: ffspostgres + app.kubernetes.io/name: opentelemetry-demo-ffspostgres + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-ffspostgres + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: ffspostgres + app.kubernetes.io/name: opentelemetry-demo-ffspostgres + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: ffspostgres + image: 'postgres:14' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 5432 + name: postgres + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: POSTGRES_DB + value: ffs + - name: POSTGRES_USER + value: ffs + - name: POSTGRES_PASSWORD + value: ffs + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 120Mi + securityContext: + runAsGroup: 999 + runAsNonRoot: true + runAsUser: 999 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-frauddetectionservice + labels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frauddetectionservice + app.kubernetes.io/name: opentelemetry-demo-frauddetectionservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frauddetectionservice + app.kubernetes.io/name: opentelemetry-demo-frauddetectionservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: frauddetectionservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-frauddetectionservice' + imagePullPolicy: IfNotPresent + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 200Mi + initContainers: + - command: + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka; sleep 2; done; + image: busybox:latest + name: wait-for-kafka +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-frontend + labels: + opentelemetry.io/name: opentelemetry-demo-frontend + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontend + app.kubernetes.io/name: opentelemetry-demo-frontend + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-frontend + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-frontend + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontend + app.kubernetes.io/name: opentelemetry-demo-frontend + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: frontend + image: 'ghcr.io/open-telemetry/demo:1.6.0-frontend' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_ADDR + value: :8080 + - name: AD_SERVICE_ADDR + value: 'opentelemetry-demo-adservice:8080' + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CHECKOUT_SERVICE_ADDR + value: 'opentelemetry-demo-checkoutservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: RECOMMENDATION_SERVICE_ADDR + value: 'opentelemetry-demo-recommendationservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: WEB_OTEL_SERVICE_NAME + value: frontend-web + - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://localhost:8080/otlp-http/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 200Mi + securityContext: + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-frontendproxy + labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontendproxy + app.kubernetes.io/name: opentelemetry-demo-frontendproxy + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-frontendproxy + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: frontendproxy + app.kubernetes.io/name: opentelemetry-demo-frontendproxy + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: frontendproxy + image: 'ghcr.io/open-telemetry/demo:1.6.0-frontendproxy' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: ENVOY_PORT + value: "8080" + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_HOST + value: 'opentelemetry-demo-frontend' + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_SERVICE_HOST + value: 'opentelemetry-demo-featureflagservice' + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_WEB_HOST + value: 'opentelemetry-demo-loadgenerator' + - name: GRAFANA_SERVICE_PORT + value: "80" + - name: GRAFANA_SERVICE_HOST + value: 'opentelemetry-demo-grafana' + - name: JAEGER_SERVICE_PORT + value: "16686" + - name: JAEGER_SERVICE_HOST + value: 'opentelemetry-demo-jaeger-query' + - name: OTEL_COLLECTOR_PORT_GRPC + value: "4317" + - name: OTEL_COLLECTOR_PORT_HTTP + value: "4318" + - name: OTEL_COLLECTOR_HOST + value: $(OTEL_COLLECTOR_NAME) + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 50Mi + securityContext: + runAsGroup: 101 + runAsNonRoot: true + runAsUser: 101 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-kafka + labels: + opentelemetry.io/name: opentelemetry-demo-kafka + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: kafka + app.kubernetes.io/name: opentelemetry-demo-kafka + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-kafka + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-kafka + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: kafka + app.kubernetes.io/name: opentelemetry-demo-kafka + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: kafka + image: 'ghcr.io/open-telemetry/demo:1.6.0-kafka' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9092 + name: plaintext + - containerPort: 9093 + name: controller + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: KAFKA_HEAP_OPTS + value: -Xmx200M -Xms200M + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 500Mi + securityContext: + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-loadgenerator + labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: loadgenerator + app.kubernetes.io/name: opentelemetry-demo-loadgenerator + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-loadgenerator + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: loadgenerator + app.kubernetes.io/name: opentelemetry-demo-loadgenerator + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: loadgenerator + image: 'ghcr.io/open-telemetry/demo:1.6.0-loadgenerator' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8089 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_USERS + value: "10" + - name: LOCUST_SPAWN_RATE + value: "1" + - name: LOCUST_HOST + value: http://opentelemetry-demo-frontendproxy:8080 + - name: LOCUST_HEADLESS + value: "false" + - name: LOCUST_AUTOSTART + value: "true" + - name: LOCUST_BROWSER_TRAFFIC_ENABLED + value: "false" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 1Gi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-paymentservice + labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: paymentservice + app.kubernetes.io/name: opentelemetry-demo-paymentservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-paymentservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-paymentservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: paymentservice + app.kubernetes.io/name: opentelemetry-demo-paymentservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: paymentservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-paymentservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PAYMENT_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 120Mi + securityContext: + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-productcatalogservice + labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: productcatalogservice + app.kubernetes.io/name: opentelemetry-demo-productcatalogservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-productcatalogservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: productcatalogservice + app.kubernetes.io/name: opentelemetry-demo-productcatalogservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: productcatalogservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-productcatalogservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PRODUCT_CATALOG_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-quoteservice + labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: quoteservice + app.kubernetes.io/name: opentelemetry-demo-quoteservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-quoteservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-quoteservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: quoteservice + app.kubernetes.io/name: opentelemetry-demo-quoteservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: quoteservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-quoteservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: QUOTE_SERVICE_PORT + value: "8080" + - name: OTEL_PHP_AUTOLOAD_ENABLED + value: "true" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 40Mi + securityContext: + runAsGroup: 33 + runAsNonRoot: true + runAsUser: 33 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-recommendationservice + labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: recommendationservice + app.kubernetes.io/name: opentelemetry-demo-recommendationservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-recommendationservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: recommendationservice + app.kubernetes.io/name: opentelemetry-demo-recommendationservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: recommendationservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-recommendationservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: RECOMMENDATION_SERVICE_PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_PYTHON_LOG_CORRELATION + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(NODE_IP):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 500Mi +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-redis + labels: + opentelemetry.io/name: opentelemetry-demo-redis + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: redis + app.kubernetes.io/name: opentelemetry-demo-redis + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-redis + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-redis + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: redis + app.kubernetes.io/name: opentelemetry-demo-redis + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: redis + image: 'redis:alpine' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 6379 + name: redis + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi + securityContext: + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 999 +--- +# Source: opentelemetry-demo/templates/component.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-demo-shippingservice + labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: shippingservice + app.kubernetes.io/name: opentelemetry-demo-shippingservice + app.kubernetes.io/version: "1.6.0" + app.kubernetes.io/part-of: opentelemetry-demo +spec: + replicas: 1 + selector: + matchLabels: + opentelemetry.io/name: opentelemetry-demo-shippingservice + template: + metadata: + labels: + opentelemetry.io/name: opentelemetry-demo-shippingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/component: shippingservice + app.kubernetes.io/name: opentelemetry-demo-shippingservice + spec: + serviceAccountName: opentelemetry-demo + containers: + - name: shippingservice + image: 'ghcr.io/open-telemetry/demo:1.6.0-shippingservice' + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: service + env: + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: SHIPPING_SERVICE_PORT + value: "8080" + - name: QUOTE_SERVICE_ADDR + value: http://opentelemetry-demo-quoteservice:8080 + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(NODE_IP):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + resources: + limits: + memory: 20Mi +--- +# Source: opentelemetry-demo/charts/grafana/templates/tests/test-serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" + name: opentelemetry-demo-grafana-test + namespace: otel-demo + annotations: +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/tests/test-configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: opentelemetry-demo-grafana-test + namespace: otel-demo + annotations: + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" +data: + run.sh: |- + @test "Test Health" { + url="http://opentelemetry-demo-grafana/api/health" + + code=$(wget --server-response --spider --timeout 90 --tries 10 ${url} 2>&1 | awk '/^ HTTP/{print $2}') + [ "$code" == "200" ] + } +spec: + template: + spec: + containers: [] +--- +# Source: opentelemetry-demo/charts/grafana/templates/tests/test.yaml +apiVersion: v1 +kind: Pod +metadata: + name: opentelemetry-demo-grafana-test + labels: + app.kubernetes.io/name: grafana + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/version: "10.1.5" + annotations: + namespace: otel-demo +spec: + serviceAccountName: opentelemetry-demo-grafana-test + containers: + - name: opentelemetry-demo-test + image: "docker.io/bats/bats:v1.4.1" + imagePullPolicy: "IfNotPresent" + command: ["/opt/bats/bin/bats", "-t", "/tests/run.sh"] + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + volumes: + - name: tests + configMap: + name: opentelemetry-demo-grafana-test + restartPolicy: Never + template: + spec: + containers: [] diff --git a/src/otelcollector/splunk-otelcol-config-filelog.yml b/splunk/otelcol-config-filelog.yml similarity index 100% rename from src/otelcollector/splunk-otelcol-config-filelog.yml rename to splunk/otelcol-config-filelog.yml diff --git a/src/otelcollector/splunk-otelcol-config-fluentd.yml b/splunk/otelcol-config-fluentd.yml similarity index 100% rename from src/otelcollector/splunk-otelcol-config-fluentd.yml rename to splunk/otelcol-config-fluentd.yml diff --git a/src/otelcollector/splunk-otelcol-config.yml b/splunk/otelcol-config.yml similarity index 100% rename from src/otelcollector/splunk-otelcol-config.yml rename to splunk/otelcol-config.yml diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index cd0c594ded..a01073c57b 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -16,56 +16,68 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) function update_otel_demo_docker { DOCKER_COMPOSE_PATH=${DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../docker-compose.yml"} + SPLUNK_DOCKER_COMPOSE_PATH=${SPLUNK_DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../splunk/docker-compose.yml"} + + # delete any older versions of the Splunk Docker Compose file + [ -e "$SPLUNK_DOCKER_COMPOSE_PATH" ] && rm "$SPLUNK_DOCKER_COMPOSE_PATH" # Download the YAML file curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/docker-compose.yml \ > "$DOCKER_COMPOSE_PATH" + cp "$DOCKER_COMPOSE_PATH" "$SPLUNK_DOCKER_COMPOSE_PATH" + # replace the OpenTelemetry collector image with the Splunk distribution - yq eval -i '.services.otelcol.image = "quay.io/signalfx/splunk-otel-collector:latest"' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.image = "quay.io/signalfx/splunk-otel-collector:latest"' "$SPLUNK_DOCKER_COMPOSE_PATH" # add environment variables required by the Splunk distro of the OpenTelemetry collector - yq eval -i '.services.otelcol.environment += [ "SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN}" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.environment += [ "SPLUNK_REALM=${SPLUNK_REALM}" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_URL=${SPLUNK_HEC_URL}" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.environment += [ "SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB}" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_ACCESS_TOKEN=${SPLUNK_ACCESS_TOKEN}" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_REALM=${SPLUNK_REALM}" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_HEC_URL=${SPLUNK_HEC_URL}" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.environment += [ "SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB}" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" # update the command used to launch the collector to point to the Splunk-specific config - yq eval -i '.services.otelcol.command[0] = "--config=/etc/splunk-otelcol-config.yml" ' "$DOCKER_COMPOSE_PATH" - yq eval -i 'del(.services.otelcol.command[1])' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.command[0] = "--config=/etc/otelcol-config.yml" ' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i 'del(.services.otelcol.command[1])' "$SPLUNK_DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.volumes = [ "./src/otelcollector/splunk-otelcol-config.yml:/etc/splunk-otelcol-config.yml", "./logs:/logs", "./checkpoint:/checkpoint" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.volumes = [ "./splunk/otelcol-config.yml:/etc/otelcol-config.yml", "./logs:/logs", "./checkpoint:/checkpoint" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" # add ports used by the Splunk distro of the OpenTelemetry collector - yq eval -i '.services.otelcol.ports += [ "9464" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "8888" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "13133" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "14250" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "14268" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "6060" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "9080" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "9411" ]' "$DOCKER_COMPOSE_PATH" - yq eval -i '.services.otelcol.ports += [ "9943" ]' "$DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9464" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "8888" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "13133" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "14250" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "14268" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "6060" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9080" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9411" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" + yq eval -i '.services.otelcol.ports += [ "9943" ]' "$SPLUNK_DOCKER_COMPOSE_PATH" echo "Completed updating docker-compose.yml for the OpenTelemetry demo app!" } function update_otel_demo_k8s { K8S_PATH=${K8S_PATH:-"$SCRIPT_DIR/../kubernetes/opentelemetry-demo.yaml"} + SPLUNK_K8S_PATH=${SPLUNK_K8S_PATH:-"$SCRIPT_DIR/../splunk/opentelemetry-demo.yaml"} + + # delete any older versions of the Splunk K8s file + [ -e "$SPLUNK_K8S_PATH" ] && rm "$SPLUNK_K8S_PATH" # Download the YAML file curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/kubernetes/opentelemetry-demo.yaml \ > "$K8S_PATH" + cp "$K8S_PATH" "$SPLUNK_K8S_PATH" + # delete the opentelemetry-demo-otelcol ServiceAccount, ConfigMap, Service, and Deployment objects - yq eval -i 'select(.kind != "ServiceAccount" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" - yq eval -i 'select(.kind != "ConfigMap" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" - yq eval -i 'select(.kind != "Service" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" - yq eval -i 'select(.kind != "Deployment" or .metadata.name != "opentelemetry-demo-otelcol")' "$K8S_PATH" + yq eval -i 'select(.kind != "ServiceAccount" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" + yq eval -i 'select(.kind != "ConfigMap" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" + yq eval -i 'select(.kind != "Service" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" + yq eval -i 'select(.kind != "Deployment" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" # delete the OTEL_COLLECTOR_NAME environment variable from all containers - yq eval -i 'del(.spec.template.spec.containers[].env[] | select(.name == "OTEL_COLLECTOR_NAME"))' "$K8S_PATH" + yq eval -i 'del(.spec.template.spec.containers[].env[] | select(.name == "OTEL_COLLECTOR_NAME"))' "$SPLUNK_K8S_PATH" # add a NODE_IP environment variable for all containers # - name: NODE_IP @@ -73,19 +85,29 @@ function update_otel_demo_k8s { # fieldRef: # fieldPath: status.hostIP - yq eval -i '(.spec.template.spec.containers[].env) += { "name": "NODE_IP" }' "$K8S_PATH" - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "NODE_IP") | .valueFrom.fieldRef.fieldPath) = "status.hostIP"' "$K8S_PATH" + yq eval -i '(.spec.template.spec.containers[].env) += { + "name": "NODE_IP", + "valueFrom": { + "fieldRef": { + "fieldPath": "status.hostIP" + } + } + } + ' "$SPLUNK_K8S_PATH" + + # yq eval -i '(.spec.template.spec.containers[].env) += { "name": "NODE_IP" }' "$K8S_PATH" + # yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "NODE_IP") | .valueFrom.fieldRef.fieldPath) = "status.hostIP"' "$K8S_PATH" # update the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to use the NODE_IP - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_ENDPOINT") | .value) ="http://$(NODE_IP):4317"' "$K8S_PATH" + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_ENDPOINT") | .value) ="http://$(NODE_IP):4317"' "$SPLUNK_K8S_PATH" # update the OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable to use the NODE_IP - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") | .value) ="http://$(NODE_IP):4318/v1/traces"' "$K8S_PATH" + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") | .value) ="http://$(NODE_IP):4318/v1/traces"' "$SPLUNK_K8S_PATH" # append the deployment.environment resource attribute # - name: OTEL_RESOURCE_ATTRIBUTES # value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_RESOURCE_ATTRIBUTES") | .value) += ",deployment.environment=development"' "$K8S_PATH" + yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_RESOURCE_ATTRIBUTES") | .value) += ",deployment.environment=development"' "$SPLUNK_K8S_PATH" echo "Completed updating the kubernetes/opentelemetry-demo.yaml for the OpenTelemetry demo app!" } From 61bd6d13e8d0ade85950577a48cff148f35b0d12 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 13:07:03 -0800 Subject: [PATCH 16/22] update demo merge script --- splunk/.gitignore | 1 + splunk/docker-compose.yml | 11 +-- splunk/opentelemetry-demo.yaml | 162 +-------------------------------- splunk/update-demos.sh | 40 +++++--- 4 files changed, 34 insertions(+), 180 deletions(-) create mode 100644 splunk/.gitignore diff --git a/splunk/.gitignore b/splunk/.gitignore new file mode 100644 index 0000000000..e827359220 --- /dev/null +++ b/splunk/.gitignore @@ -0,0 +1 @@ +test.yaml diff --git a/splunk/docker-compose.yml b/splunk/docker-compose.yml index 28eb3302cf..d540cba8a5 100644 --- a/splunk/docker-compose.yml +++ b/splunk/docker-compose.yml @@ -357,7 +357,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 120M restart: unless-stopped ports: - "${LOCUST_WEB_PORT}" @@ -367,7 +367,6 @@ services: - LOCUST_HOST - LOCUST_HEADLESS - LOCUST_AUTOSTART - - LOCUST_BROWSER_TRAFFIC_ENABLED - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -522,7 +521,7 @@ services: # ****************** # Postgres used by Feature Flag service ffs_postgres: - image: postgres:16.0 + image: postgres:16.1 container_name: postgres user: postgres deploy: @@ -586,7 +585,7 @@ services: # ******************** # Jaeger jaeger: - image: jaegertracing/all-in-one:1.51 + image: jaegertracing/all-in-one:1.52 container_name: jaeger command: - "--memory.max-traces=8000" @@ -607,7 +606,7 @@ services: logging: *logging # Grafana grafana: - image: grafana/grafana:10.2.0 + image: grafana/grafana:10.2.2 container_name: grafana deploy: resources: @@ -659,7 +658,7 @@ services: - SPLUNK_MEMORY_TOTAL_MIB=${SPLUNK_MEMORY_TOTAL_MIB} # Prometheus prometheus: - image: quay.io/prometheus/prometheus:v2.47.2 + image: quay.io/prometheus/prometheus:v2.48.1 container_name: prometheus command: - --web.console.templates=/etc/prometheus/consoles diff --git a/splunk/opentelemetry-demo.yaml b/splunk/opentelemetry-demo.yaml index d40c449c15..369dce24e8 100644 --- a/splunk/opentelemetry-demo.yaml +++ b/splunk/opentelemetry-demo.yaml @@ -12,10 +12,6 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana namespace: otel-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-sa.yaml apiVersion: v1 @@ -27,10 +23,6 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "1.51.0" app.kubernetes.io/component: all-in-one -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml apiVersion: v1 @@ -45,10 +37,6 @@ metadata: name: opentelemetry-demo-prometheus-server namespace: otel-demo annotations: {} -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/serviceaccount.yaml apiVersion: v1 @@ -61,10 +49,6 @@ metadata: app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/secret.yaml apiVersion: v1 @@ -81,10 +65,6 @@ data: admin-user: "YWRtaW4=" admin-password: "YWRtaW4=" ldap-toml: "" -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml apiVersion: v1 @@ -152,10 +132,6 @@ data: path: /var/lib/grafana/dashboards/default orgId: 1 type: file -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml apiVersion: v1 @@ -190,10 +166,6 @@ data: {} rules: | {} -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/grafana-dashboards.yaml apiVersion: v1 @@ -7627,10 +7599,6 @@ data: "version": 1, "weekStart": "" } -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml kind: ClusterRole @@ -7642,10 +7610,6 @@ metadata: app.kubernetes.io/version: "10.1.5" name: opentelemetry-demo-grafana-clusterrole rules: [] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7666,10 +7630,6 @@ rules: - apiGroups: ["extensions"] resources: ["replicasets"] verbs: ["get", "list", "watch"] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7720,10 +7680,6 @@ rules: - "/metrics" verbs: - get -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml kind: ClusterRoleBinding @@ -7742,10 +7698,6 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-grafana-clusterrole apiGroup: rbac.authorization.k8s.io -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7764,10 +7716,6 @@ subjects: - kind: ServiceAccount name: opentelemetry-demo-otelcol namespace: otel-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7788,10 +7736,6 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: opentelemetry-demo-prometheus-server -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/role.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7804,10 +7748,6 @@ metadata: app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/version: "10.1.5" rules: [] -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7827,10 +7767,6 @@ subjects: - kind: ServiceAccount name: opentelemetry-demo-grafana namespace: otel-demo -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/service.yaml apiVersion: v1 @@ -7852,9 +7788,6 @@ spec: selector: app.kubernetes.io/name: grafana app.kubernetes.io/instance: opentelemetry-demo - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-agent-svc.yaml apiVersion: v1 @@ -7888,9 +7821,6 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-collector-svc.yaml apiVersion: v1 @@ -7927,9 +7857,6 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/jaeger/templates/allinone-query-svc.yaml apiVersion: v1 @@ -7954,9 +7881,6 @@ spec: app.kubernetes.io/name: jaeger app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: all-in-one - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/prometheus/templates/service.yaml apiVersion: v1 @@ -7982,9 +7906,6 @@ spec: app.kubernetes.io/instance: opentelemetry-demo sessionAffinity: None type: "ClusterIP" - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8006,9 +7927,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-adservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8030,9 +7948,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-cartservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8054,9 +7969,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-checkoutservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8078,9 +7990,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-currencyservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8102,9 +8011,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-emailservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8129,9 +8035,6 @@ spec: targetPort: 8081 selector: opentelemetry.io/name: opentelemetry-demo-featureflagservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8153,9 +8056,6 @@ spec: targetPort: 5432 selector: opentelemetry.io/name: opentelemetry-demo-ffspostgres - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8177,9 +8077,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-frontend - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8201,9 +8098,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-frontendproxy - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8228,9 +8122,6 @@ spec: targetPort: 9093 selector: opentelemetry.io/name: opentelemetry-demo-kafka - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8252,9 +8143,6 @@ spec: targetPort: 8089 selector: opentelemetry.io/name: opentelemetry-demo-loadgenerator - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8276,9 +8164,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-paymentservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8300,9 +8185,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-productcatalogservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8324,9 +8206,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-quoteservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8348,9 +8227,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-recommendationservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8372,9 +8248,6 @@ spec: targetPort: 6379 selector: opentelemetry.io/name: opentelemetry-demo-redis - template: - spec: - containers: [] --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: v1 @@ -8396,9 +8269,6 @@ spec: targetPort: 8080 selector: opentelemetry.io/name: opentelemetry-demo-shippingservice - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml apiVersion: apps/v1 @@ -8497,10 +8367,6 @@ spec: value: /var/lib/grafana/plugins - name: GF_PATHS_PROVISIONING value: /etc/grafana/provisioning - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP livenessProbe: failureThreshold: 10 httpGet: @@ -8568,10 +8434,6 @@ spec: value: "false" - name: COLLECTOR_OTLP_ENABLED value: "true" - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP image: jaegertracing/all-in-one:1.51.0 imagePullPolicy: IfNotPresent name: jaeger @@ -8704,11 +8566,6 @@ spec: - name: storage-volume mountPath: /data subPath: "" - env: - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP dnsPolicy: ClusterFirst securityContext: fsGroup: 65534 @@ -9571,8 +9428,6 @@ spec: value: "false" - name: LOCUST_AUTOSTART value: "true" - - name: LOCUST_BROWSER_TRAFFIC_ENABLED - value: "false" - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION value: python - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -9585,7 +9440,7 @@ spec: fieldPath: status.hostIP resources: limits: - memory: 1Gi + memory: 120Mi --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: apps/v1 @@ -9749,7 +9604,7 @@ spec: - name: OTEL_PHP_AUTOLOAD_ENABLED value: "true" - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(NODE_IP):4317 + value: http://$(NODE_IP):4318 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - name: NODE_IP @@ -9928,7 +9783,7 @@ spec: - name: QUOTE_SERVICE_ADDR value: http://opentelemetry-demo-quoteservice:8080 - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(NODE_IP):4318/v1/traces + value: http://$(NODE_IP):4317/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - name: NODE_IP @@ -9950,10 +9805,6 @@ metadata: name: opentelemetry-demo-grafana-test namespace: otel-demo annotations: -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test-configmap.yaml apiVersion: v1 @@ -9974,10 +9825,6 @@ data: code=$(wget --server-response --spider --timeout 90 --tries 10 ${url} 2>&1 | awk '/^ HTTP/{print $2}') [ "$code" == "200" ] } -spec: - template: - spec: - containers: [] --- # Source: opentelemetry-demo/charts/grafana/templates/tests/test.yaml apiVersion: v1 @@ -10006,6 +9853,3 @@ spec: configMap: name: opentelemetry-demo-grafana-test restartPolicy: Never - template: - spec: - containers: [] diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index a01073c57b..6c6449b0dd 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -85,29 +85,39 @@ function update_otel_demo_k8s { # fieldRef: # fieldPath: status.hostIP - yq eval -i '(.spec.template.spec.containers[].env) += { - "name": "NODE_IP", - "valueFrom": { - "fieldRef": { - "fieldPath": "status.hostIP" - } - } - } - ' "$SPLUNK_K8S_PATH" + + # used due to a yq issue with the below command to do the same thing + SEARCH_VAL=service.namespace=opentelemetry-demo + REPLACE_VAL='service.namespace=opentelemetry-demo \ + - name: NODE_IP \ + valueFrom: \ + fieldRef: \ + fieldPath: status.hostIP' + + sed -i '' "s/${SEARCH_VAL}/${REPLACE_VAL}/g" "$SPLUNK_K8S_PATH" + +# yq eval -i '(.spec.template.spec.containers[].env) += { +# "name": "NODE_IP", +# "valueFrom": { +# "fieldRef": { +# "fieldPath": "status.hostIP" +# } +# } +# } +# ' "$SPLUNK_K8S_PATH" # yq eval -i '(.spec.template.spec.containers[].env) += { "name": "NODE_IP" }' "$K8S_PATH" # yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "NODE_IP") | .valueFrom.fieldRef.fieldPath) = "status.hostIP"' "$K8S_PATH" - # update the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to use the NODE_IP - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_ENDPOINT") | .value) ="http://$(NODE_IP):4317"' "$SPLUNK_K8S_PATH" - - # update the OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable to use the NODE_IP - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") | .value) ="http://$(NODE_IP):4318/v1/traces"' "$SPLUNK_K8S_PATH" + # update the values of the OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variables + # to use the NODE_IP instead of OTEL_COLLECTOR_NAME + # Reference: https://stackoverflow.com/questions/70032588/use-yq-to-substitute-string-in-a-yaml-file + yq eval -i ' (.. | select(tag == "!!str")) |= sub("http://\$\(OTEL_COLLECTOR_NAME\):", "http://$(NODE_IP):")' "$SPLUNK_K8S_PATH" # append the deployment.environment resource attribute # - name: OTEL_RESOURCE_ATTRIBUTES # value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "OTEL_RESOURCE_ATTRIBUTES") | .value) += ",deployment.environment=development"' "$SPLUNK_K8S_PATH" + yq eval -i ' (.. | select(tag == "!!str")) |= sub("service.namespace=opentelemetry-demo", "service.namespace=opentelemetry-demo,deployment.environment=development")' "$SPLUNK_K8S_PATH" echo "Completed updating the kubernetes/opentelemetry-demo.yaml for the OpenTelemetry demo app!" } From 0654093d38749296d869ae8540ae7a397b806e5a Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 13:13:58 -0800 Subject: [PATCH 17/22] reverted changes to docker compose and k8s config --- docker-compose.yml | 7 +- kubernetes/opentelemetry-demo.yaml | 988 ++++++++++++++--------------- splunk/.gitignore | 1 - 3 files changed, 495 insertions(+), 501 deletions(-) delete mode 100644 splunk/.gitignore diff --git a/docker-compose.yml b/docker-compose.yml index 934da68c22..93285b4f42 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -369,7 +369,7 @@ services: deploy: resources: limits: - memory: 1G + memory: 120M restart: unless-stopped ports: - "${LOCUST_WEB_PORT}" @@ -379,7 +379,6 @@ services: - LOCUST_HOST - LOCUST_HEADLESS - LOCUST_AUTOSTART - - LOCUST_BROWSER_TRAFFIC_ENABLED - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -784,8 +783,6 @@ services: build: context: ./ dockerfile: ./test/tracetesting/Dockerfile - args: - - TRACETEST_IMAGE_VERSION environment: - AD_SERVICE_ADDR - CART_SERVICE_ADDR @@ -879,4 +876,4 @@ services: timeout: 5s retries: 60 ports: - - 5432 + - 5432 \ No newline at end of file diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index 130594cf2c..fcb8d511e8 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -7878,9 +7878,9 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-otelcol subjects: -- kind: ServiceAccount - name: opentelemetry-demo-otelcol - namespace: otel-demo + - kind: ServiceAccount + name: opentelemetry-demo-otelcol + namespace: otel-demo --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7929,9 +7929,9 @@ roleRef: kind: Role name: opentelemetry-demo-grafana subjects: -- kind: ServiceAccount - name: opentelemetry-demo-grafana - namespace: otel-demo + - kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo --- # Source: opentelemetry-demo/charts/grafana/templates/service.yaml apiVersion: v1 @@ -8061,7 +8061,7 @@ metadata: spec: type: ClusterIP ports: - + - name: jaeger-compact port: 6831 targetPort: 6831 @@ -8571,7 +8571,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL seccompProfile: type: RuntimeDefault volumeMounts: @@ -8675,7 +8675,7 @@ spec: annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" - spec: + spec: containers: - env: - name: METRICS_STORAGE_TYPE @@ -8774,7 +8774,7 @@ spec: app.kubernetes.io/name: otelcol app.kubernetes.io/instance: opentelemetry-demo component: standalone-collector - + spec: serviceAccountName: opentelemetry-demo-otelcol @@ -8790,7 +8790,7 @@ spec: image: "otel/opentelemetry-collector-contrib:0.88.0" imagePullPolicy: IfNotPresent ports: - + - name: jaeger-compact containerPort: 6831 protocol: UDP @@ -8971,30 +8971,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-accountingservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9032,29 +9032,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-adservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: AD_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_LOGS_EXPORTER - value: otlp - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: AD_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_LOGS_EXPORTER + value: otlp + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 300Mi @@ -9093,40 +9093,40 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-cartservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CART_SERVICE_PORT - value: "8080" - - name: ASPNETCORE_URLS - value: http://*:$(CART_SERVICE_PORT) - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: REDIS_ADDR - value: 'opentelemetry-demo-redis:6379' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CART_SERVICE_PORT + value: "8080" + - name: ASPNETCORE_URLS + value: http://*:$(CART_SERVICE_PORT) + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: REDIS_ADDR + value: 'opentelemetry-demo-redis:6379' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 160Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting - for redis; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting + for redis; sleep 2; done; image: busybox:latest name: wait-for-redis --- @@ -9164,48 +9164,48 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-checkoutservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CHECKOUT_SERVICE_PORT - value: "8080" - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: EMAIL_SERVICE_ADDR - value: http://opentelemetry-demo-emailservice:8080 - - name: PAYMENT_SERVICE_ADDR - value: 'opentelemetry-demo-paymentservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CHECKOUT_SERVICE_PORT + value: "8080" + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: EMAIL_SERVICE_ADDR + value: http://opentelemetry-demo-emailservice:8080 + - name: PAYMENT_SERVICE_ADDR + value: 'opentelemetry-demo-paymentservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9243,25 +9243,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-currencyservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CURRENCY_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CURRENCY_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9300,27 +9300,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-emailservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: EMAIL_SERVICE_PORT - value: "8080" - - name: APP_ENV - value: production - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: EMAIL_SERVICE_PORT + value: "8080" + - name: APP_ENV + value: production + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 100Mi @@ -9359,33 +9359,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-featureflagservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 50053 - name: grpc - - containerPort: 8081 - name: http + + - containerPort: 50053 + name: grpc + - containerPort: 8081 + name: http env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_GRPC_SERVICE_PORT - value: "50053" - - name: DATABASE_URL - value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: grpc - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_GRPC_SERVICE_PORT + value: "50053" + - name: DATABASE_URL + value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: grpc + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 175Mi @@ -9397,10 +9397,10 @@ spec: periodSeconds: 10 initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo - waiting for ffspostgres; sleep 2; done + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo + waiting for ffspostgres; sleep 2; done image: busybox:latest name: wait-for-ffspostgres --- @@ -9438,27 +9438,27 @@ spec: image: 'postgres:14' imagePullPolicy: IfNotPresent ports: - - - containerPort: 5432 - name: postgres + + - containerPort: 5432 + name: postgres env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: POSTGRES_DB - value: ffs - - name: POSTGRES_USER - value: ffs - - name: POSTGRES_PASSWORD - value: ffs - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: POSTGRES_DB + value: ffs + - name: POSTGRES_USER + value: ffs + - name: POSTGRES_PASSWORD + value: ffs + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9501,30 +9501,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frauddetectionservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9562,45 +9562,45 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontend' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_ADDR - value: :8080 - - name: AD_SERVICE_ADDR - value: 'opentelemetry-demo-adservice:8080' - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CHECKOUT_SERVICE_ADDR - value: 'opentelemetry-demo-checkoutservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: RECOMMENDATION_SERVICE_ADDR - value: 'opentelemetry-demo-recommendationservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: WEB_OTEL_SERVICE_NAME - value: frontend-web - - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://localhost:8080/otlp-http/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_ADDR + value: :8080 + - name: AD_SERVICE_ADDR + value: 'opentelemetry-demo-adservice:8080' + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CHECKOUT_SERVICE_ADDR + value: 'opentelemetry-demo-checkoutservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: RECOMMENDATION_SERVICE_ADDR + value: 'opentelemetry-demo-recommendationservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: WEB_OTEL_SERVICE_NAME + value: frontend-web + - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://localhost:8080/otlp-http/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi @@ -9643,49 +9643,49 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontendproxy' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: ENVOY_PORT - value: "8080" - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_HOST - value: 'opentelemetry-demo-frontend' - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_SERVICE_HOST - value: 'opentelemetry-demo-featureflagservice' - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_WEB_HOST - value: 'opentelemetry-demo-loadgenerator' - - name: GRAFANA_SERVICE_PORT - value: "80" - - name: GRAFANA_SERVICE_HOST - value: 'opentelemetry-demo-grafana' - - name: JAEGER_SERVICE_PORT - value: "16686" - - name: JAEGER_SERVICE_HOST - value: 'opentelemetry-demo-jaeger-query' - - name: OTEL_COLLECTOR_PORT_GRPC - value: "4317" - - name: OTEL_COLLECTOR_PORT_HTTP - value: "4318" - - name: OTEL_COLLECTOR_HOST - value: $(OTEL_COLLECTOR_NAME) - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: ENVOY_PORT + value: "8080" + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_HOST + value: 'opentelemetry-demo-frontend' + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_SERVICE_HOST + value: 'opentelemetry-demo-featureflagservice' + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_WEB_HOST + value: 'opentelemetry-demo-loadgenerator' + - name: GRAFANA_SERVICE_PORT + value: "80" + - name: GRAFANA_SERVICE_HOST + value: 'opentelemetry-demo-grafana' + - name: JAEGER_SERVICE_PORT + value: "16686" + - name: JAEGER_SERVICE_HOST + value: 'opentelemetry-demo-jaeger-query' + - name: OTEL_COLLECTOR_PORT_GRPC + value: "4317" + - name: OTEL_COLLECTOR_PORT_HTTP + value: "4318" + - name: OTEL_COLLECTOR_HOST + value: $(OTEL_COLLECTOR_NAME) + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 50Mi @@ -9728,29 +9728,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-kafka' imagePullPolicy: IfNotPresent ports: - - - containerPort: 9092 - name: plaintext - - containerPort: 9093 - name: controller + + - containerPort: 9092 + name: plaintext + - containerPort: 9093 + name: controller env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://opentelemetry-demo-kafka:9092 - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: KAFKA_HEAP_OPTS - value: -Xmx200M -Xms200M - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: KAFKA_HEAP_OPTS + value: -Xmx200M -Xms200M + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -9793,42 +9793,40 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-loadgenerator' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8089 - name: service + + - containerPort: 8089 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_USERS - value: "10" - - name: LOCUST_SPAWN_RATE - value: "1" - - name: LOCUST_HOST - value: http://opentelemetry-demo-frontendproxy:8080 - - name: LOCUST_HEADLESS - value: "false" - - name: LOCUST_AUTOSTART - value: "true" - - name: LOCUST_BROWSER_TRAFFIC_ENABLED - value: "false" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_USERS + value: "10" + - name: LOCUST_SPAWN_RATE + value: "1" + - name: LOCUST_HOST + value: http://opentelemetry-demo-frontendproxy:8080 + - name: LOCUST_HEADLESS + value: "false" + - name: LOCUST_AUTOSTART + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: - memory: 1Gi + memory: 120Mi --- # Source: opentelemetry-demo/templates/component.yaml apiVersion: apps/v1 @@ -9836,7 +9834,7 @@ kind: Deployment metadata: name: opentelemetry-demo-paymentservice labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9847,12 +9845,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9864,25 +9862,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-paymentservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PAYMENT_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PAYMENT_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9897,7 +9895,7 @@ kind: Deployment metadata: name: opentelemetry-demo-productcatalogservice labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9908,12 +9906,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9925,27 +9923,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-productcatalogservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PRODUCT_CATALOG_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PRODUCT_CATALOG_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9956,7 +9954,7 @@ kind: Deployment metadata: name: opentelemetry-demo-quoteservice labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9967,12 +9965,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9984,27 +9982,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-quoteservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: QUOTE_SERVICE_PORT - value: "8080" - - name: OTEL_PHP_AUTOLOAD_ENABLED - value: "true" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: QUOTE_SERVICE_PORT + value: "8080" + - name: OTEL_PHP_AUTOLOAD_ENABLED + value: "true" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 40Mi @@ -10019,7 +10017,7 @@ kind: Deployment metadata: name: opentelemetry-demo-recommendationservice labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10030,12 +10028,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10047,33 +10045,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-recommendationservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: RECOMMENDATION_SERVICE_PORT - value: "8080" - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_PYTHON_LOG_CORRELATION - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: RECOMMENDATION_SERVICE_PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_PYTHON_LOG_CORRELATION + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -10084,7 +10082,7 @@ kind: Deployment metadata: name: opentelemetry-demo-redis labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10095,12 +10093,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-redis template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10112,21 +10110,21 @@ spec: image: 'redis:alpine' imagePullPolicy: IfNotPresent ports: - - - containerPort: 6379 - name: redis + + - containerPort: 6379 + name: redis env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -10141,7 +10139,7 @@ kind: Deployment metadata: name: opentelemetry-demo-shippingservice labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10152,12 +10150,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10169,27 +10167,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-shippingservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: SHIPPING_SERVICE_PORT - value: "8080" - - name: QUOTE_SERVICE_ADDR - value: http://opentelemetry-demo-quoteservice:8080 - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: SHIPPING_SERVICE_PORT + value: "8080" + - name: QUOTE_SERVICE_ADDR + value: http://opentelemetry-demo-quoteservice:8080 + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -10252,4 +10250,4 @@ spec: - name: tests configMap: name: opentelemetry-demo-grafana-test - restartPolicy: Never + restartPolicy: Never \ No newline at end of file diff --git a/splunk/.gitignore b/splunk/.gitignore deleted file mode 100644 index e827359220..0000000000 --- a/splunk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test.yaml From f62382adecab52f3a378f78f718c4dd33457a79d Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 13:17:27 -0800 Subject: [PATCH 18/22] added newline to end of file --- README.md | 2 +- docker-compose.yml | 2 +- kubernetes/opentelemetry-demo.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a4286093db..e3b338c414 100644 --- a/README.md +++ b/README.md @@ -129,4 +129,4 @@ Emeritus: [TelemetryHub]: https://github.com/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend [Teletrace]: https://github.com/teletrace/opentelemetry-demo [Tracetest]: https://github.com/kubeshop/opentelemetry-demo -[Uptrace]: https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo \ No newline at end of file +[Uptrace]: https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo diff --git a/docker-compose.yml b/docker-compose.yml index 93285b4f42..084852716e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -876,4 +876,4 @@ services: timeout: 5s retries: 60 ports: - - 5432 \ No newline at end of file + - 5432 diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index fcb8d511e8..ae0f3d46da 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -10250,4 +10250,4 @@ spec: - name: tests configMap: name: opentelemetry-demo-grafana-test - restartPolicy: Never \ No newline at end of file + restartPolicy: Never From 6ef525b86d156f8991c58b179e84b0b8875b94ae Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 13:19:40 -0800 Subject: [PATCH 19/22] fixed k8s config --- kubernetes/opentelemetry-demo.yaml | 157 +++++++++++++++-------------- 1 file changed, 79 insertions(+), 78 deletions(-) diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index ae0f3d46da..b5258041af 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -56,7 +56,7 @@ kind: ServiceAccount metadata: name: opentelemetry-demo labels: - + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo @@ -336,14 +336,14 @@ kind: ConfigMap metadata: name: opentelemetry-demo-grafana-dashboards labels: - + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo data: - + demo-dashboard.json: |- { "annotations": { @@ -8132,7 +8132,7 @@ kind: Service metadata: name: opentelemetry-demo-adservice labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8146,7 +8146,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-adservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8155,7 +8155,7 @@ kind: Service metadata: name: opentelemetry-demo-cartservice labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8169,7 +8169,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-cartservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8178,7 +8178,7 @@ kind: Service metadata: name: opentelemetry-demo-checkoutservice labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8192,7 +8192,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8201,7 +8201,7 @@ kind: Service metadata: name: opentelemetry-demo-currencyservice labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -8215,7 +8215,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-currencyservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8224,7 +8224,7 @@ kind: Service metadata: name: opentelemetry-demo-emailservice labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -8238,7 +8238,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-emailservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8247,7 +8247,7 @@ kind: Service metadata: name: opentelemetry-demo-featureflagservice labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -8264,7 +8264,7 @@ spec: name: http targetPort: 8081 selector: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8273,7 +8273,7 @@ kind: Service metadata: name: opentelemetry-demo-ffspostgres labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -8287,7 +8287,7 @@ spec: name: postgres targetPort: 5432 selector: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres --- # Source: opentelemetry-demo/templates/component.yaml @@ -8296,7 +8296,7 @@ kind: Service metadata: name: opentelemetry-demo-frontend labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -8310,7 +8310,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-frontend --- # Source: opentelemetry-demo/templates/component.yaml @@ -8319,7 +8319,7 @@ kind: Service metadata: name: opentelemetry-demo-frontendproxy labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -8333,7 +8333,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy --- # Source: opentelemetry-demo/templates/component.yaml @@ -8342,7 +8342,7 @@ kind: Service metadata: name: opentelemetry-demo-kafka labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -8359,7 +8359,7 @@ spec: name: controller targetPort: 9093 selector: - + opentelemetry.io/name: opentelemetry-demo-kafka --- # Source: opentelemetry-demo/templates/component.yaml @@ -8368,7 +8368,7 @@ kind: Service metadata: name: opentelemetry-demo-loadgenerator labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -8382,7 +8382,7 @@ spec: name: tcp-service targetPort: 8089 selector: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator --- # Source: opentelemetry-demo/templates/component.yaml @@ -8391,7 +8391,7 @@ kind: Service metadata: name: opentelemetry-demo-paymentservice labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -8405,7 +8405,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-paymentservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8414,7 +8414,7 @@ kind: Service metadata: name: opentelemetry-demo-productcatalogservice labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -8428,7 +8428,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8437,7 +8437,7 @@ kind: Service metadata: name: opentelemetry-demo-quoteservice labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -8451,7 +8451,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-quoteservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8460,7 +8460,7 @@ kind: Service metadata: name: opentelemetry-demo-recommendationservice labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -8474,7 +8474,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8483,7 +8483,7 @@ kind: Service metadata: name: opentelemetry-demo-redis labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -8497,7 +8497,7 @@ spec: name: redis targetPort: 6379 selector: - + opentelemetry.io/name: opentelemetry-demo-redis --- # Source: opentelemetry-demo/templates/component.yaml @@ -8506,7 +8506,7 @@ kind: Service metadata: name: opentelemetry-demo-shippingservice labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -8520,7 +8520,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-shippingservice --- # Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml @@ -8554,7 +8554,7 @@ spec: checksum/secret: f37dc127378b75e32576182571ac9b3826d217955ddda163afa1fde86c1cc056 kubectl.kubernetes.io/default-container: grafana spec: - + serviceAccountName: opentelemetry-demo-grafana automountServiceAccountToken: true securityContext: @@ -8776,7 +8776,7 @@ spec: component: standalone-collector spec: - + serviceAccountName: opentelemetry-demo-otelcol securityContext: {} @@ -8943,7 +8943,7 @@ kind: Deployment metadata: name: opentelemetry-demo-accountingservice labels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8954,12 +8954,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -9004,7 +9004,7 @@ kind: Deployment metadata: name: opentelemetry-demo-adservice labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -9015,12 +9015,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-adservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -9065,7 +9065,7 @@ kind: Deployment metadata: name: opentelemetry-demo-cartservice labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -9076,12 +9076,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-cartservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -9136,7 +9136,7 @@ kind: Deployment metadata: name: opentelemetry-demo-checkoutservice labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -9147,12 +9147,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -9215,7 +9215,7 @@ kind: Deployment metadata: name: opentelemetry-demo-currencyservice labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9226,12 +9226,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9272,7 +9272,7 @@ kind: Deployment metadata: name: opentelemetry-demo-emailservice labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9283,12 +9283,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-emailservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9331,7 +9331,7 @@ kind: Deployment metadata: name: opentelemetry-demo-featureflagservice labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9342,12 +9342,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9410,7 +9410,7 @@ kind: Deployment metadata: name: opentelemetry-demo-ffspostgres labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9421,12 +9421,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9473,7 +9473,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frauddetectionservice labels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9484,12 +9484,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9534,7 +9534,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontend labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9545,12 +9545,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frontend template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9615,7 +9615,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontendproxy labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9626,12 +9626,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9700,7 +9700,7 @@ kind: Deployment metadata: name: opentelemetry-demo-kafka labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9711,12 +9711,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-kafka template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9765,7 +9765,7 @@ kind: Deployment metadata: name: opentelemetry-demo-loadgenerator labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9776,12 +9776,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -10251,3 +10251,4 @@ spec: configMap: name: opentelemetry-demo-grafana-test restartPolicy: Never + \ No newline at end of file From 2a71f0d6787cea88a8a99699b8172875a3f098a1 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 14:21:31 -0800 Subject: [PATCH 20/22] updated merge logic --- splunk/opentelemetry-demo.yaml | 154 ++++++++++++++++----------------- splunk/update-demos.sh | 35 ++------ 2 files changed, 85 insertions(+), 104 deletions(-) diff --git a/splunk/opentelemetry-demo.yaml b/splunk/opentelemetry-demo.yaml index 369dce24e8..f49ecaede4 100644 --- a/splunk/opentelemetry-demo.yaml +++ b/splunk/opentelemetry-demo.yaml @@ -8616,6 +8616,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_SERVICE_ADDR @@ -8624,10 +8628,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -8678,6 +8678,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: AD_SERVICE_PORT @@ -8690,10 +8694,6 @@ spec: value: otlp - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 300Mi @@ -8737,6 +8737,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CART_SERVICE_PORT @@ -8751,10 +8755,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 160Mi @@ -8805,6 +8805,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CHECKOUT_SERVICE_PORT @@ -8827,10 +8831,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -8881,6 +8881,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: CURRENCY_SERVICE_PORT @@ -8889,10 +8893,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -8936,6 +8936,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: EMAIL_SERVICE_PORT @@ -8946,10 +8950,6 @@ spec: value: http://$(NODE_IP):4318/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 100Mi @@ -8995,6 +8995,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: FEATURE_FLAG_SERVICE_PORT @@ -9009,10 +9013,6 @@ spec: value: grpc - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 175Mi @@ -9069,6 +9069,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: POSTGRES_DB @@ -9079,10 +9083,6 @@ spec: value: ffs - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 120Mi @@ -9127,6 +9127,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_SERVICE_ADDR @@ -9135,10 +9139,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 200Mi @@ -9189,6 +9189,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: FRONTEND_PORT @@ -9217,10 +9221,6 @@ spec: value: http://localhost:8080/otlp-http/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 200Mi @@ -9268,6 +9268,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: ENVOY_PORT @@ -9297,13 +9301,9 @@ spec: - name: OTEL_COLLECTOR_PORT_HTTP value: "4318" - name: OTEL_COLLECTOR_HOST - value: $(OTEL_COLLECTOR_NAME) + value: $(NODE_IP) - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 50Mi @@ -9353,6 +9353,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: KAFKA_ADVERTISED_LISTENERS @@ -9363,10 +9367,6 @@ spec: value: -Xmx200M -Xms200M - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 500Mi @@ -9414,6 +9414,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: LOCUST_WEB_PORT @@ -9434,10 +9438,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 120Mi @@ -9481,6 +9481,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: PAYMENT_SERVICE_PORT @@ -9489,10 +9493,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 120Mi @@ -9540,6 +9540,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: PRODUCT_CATALOG_SERVICE_PORT @@ -9550,10 +9554,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 20Mi @@ -9597,6 +9597,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: QUOTE_SERVICE_PORT @@ -9607,10 +9611,6 @@ spec: value: http://$(NODE_IP):4318 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 40Mi @@ -9658,6 +9658,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: RECOMMENDATION_SERVICE_PORT @@ -9674,10 +9678,6 @@ spec: value: http://$(NODE_IP):4317 - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 500Mi @@ -9721,14 +9721,14 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - name: NODE_IP valueFrom: fieldRef: fieldPath: status.hostIP + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development resources: limits: memory: 20Mi @@ -9776,6 +9776,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value: cumulative - name: SHIPPING_SERVICE_PORT @@ -9786,10 +9790,6 @@ spec: value: http://$(NODE_IP):4317/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development - - name: NODE_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP resources: limits: memory: 20Mi diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index 6c6449b0dd..3cee18dfa4 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -76,44 +76,25 @@ function update_otel_demo_k8s { yq eval -i 'select(.kind != "Service" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" yq eval -i 'select(.kind != "Deployment" or .metadata.name != "opentelemetry-demo-otelcol")' "$SPLUNK_K8S_PATH" - # delete the OTEL_COLLECTOR_NAME environment variable from all containers - yq eval -i 'del(.spec.template.spec.containers[].env[] | select(.name == "OTEL_COLLECTOR_NAME"))' "$SPLUNK_K8S_PATH" - - # add a NODE_IP environment variable for all containers + # replace the OTEL_COLLECTOR_NAME environment variable + # with a NODE_IP environment variable for all containers # - name: NODE_IP # valueFrom: # fieldRef: # fieldPath: status.hostIP + # start by replacing the environment variable name + yq eval -i ' (.. | select(tag == "!!str")) |= sub("OTEL_COLLECTOR_NAME", "NODE_IP")' "$SPLUNK_K8S_PATH" - # used due to a yq issue with the below command to do the same thing - SEARCH_VAL=service.namespace=opentelemetry-demo - REPLACE_VAL='service.namespace=opentelemetry-demo \ - - name: NODE_IP \ - valueFrom: \ + # then use sed to replace the value + # (yq was not used due to an issue that added extraneous elements to the file) + SEARCH_VAL="value: 'opentelemetry-demo-otelcol'" + REPLACE_VAL='valueFrom: \ fieldRef: \ fieldPath: status.hostIP' sed -i '' "s/${SEARCH_VAL}/${REPLACE_VAL}/g" "$SPLUNK_K8S_PATH" -# yq eval -i '(.spec.template.spec.containers[].env) += { -# "name": "NODE_IP", -# "valueFrom": { -# "fieldRef": { -# "fieldPath": "status.hostIP" -# } -# } -# } -# ' "$SPLUNK_K8S_PATH" - - # yq eval -i '(.spec.template.spec.containers[].env) += { "name": "NODE_IP" }' "$K8S_PATH" - # yq eval -i '(.spec.template.spec.containers[].env[] | select(.name == "NODE_IP") | .valueFrom.fieldRef.fieldPath) = "status.hostIP"' "$K8S_PATH" - - # update the values of the OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variables - # to use the NODE_IP instead of OTEL_COLLECTOR_NAME - # Reference: https://stackoverflow.com/questions/70032588/use-yq-to-substitute-string-in-a-yaml-file - yq eval -i ' (.. | select(tag == "!!str")) |= sub("http://\$\(OTEL_COLLECTOR_NAME\):", "http://$(NODE_IP):")' "$SPLUNK_K8S_PATH" - # append the deployment.environment resource attribute # - name: OTEL_RESOURCE_ATTRIBUTES # value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,deployment.environment=development From cdc929c81912e694d02d94a6dc7b2227a39941f8 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Wed, 20 Dec 2023 14:24:45 -0800 Subject: [PATCH 21/22] updated k8s config --- kubernetes/opentelemetry-demo.yaml | 1139 ++++++++++++++-------------- splunk/update-demos.sh | 2 +- 2 files changed, 570 insertions(+), 571 deletions(-) diff --git a/kubernetes/opentelemetry-demo.yaml b/kubernetes/opentelemetry-demo.yaml index b5258041af..dcc93781c5 100644 --- a/kubernetes/opentelemetry-demo.yaml +++ b/kubernetes/opentelemetry-demo.yaml @@ -56,7 +56,7 @@ kind: ServiceAccount metadata: name: opentelemetry-demo labels: - + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo @@ -336,14 +336,14 @@ kind: ConfigMap metadata: name: opentelemetry-demo-grafana-dashboards labels: - + opentelemetry.io/name: opentelemetry-demo app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/name: opentelemetry-demo app.kubernetes.io/version: "1.6.0" app.kubernetes.io/part-of: opentelemetry-demo data: - + demo-dashboard.json: |- { "annotations": { @@ -7878,9 +7878,9 @@ roleRef: kind: ClusterRole name: opentelemetry-demo-otelcol subjects: - - kind: ServiceAccount - name: opentelemetry-demo-otelcol - namespace: otel-demo +- kind: ServiceAccount + name: opentelemetry-demo-otelcol + namespace: otel-demo --- # Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -7929,9 +7929,9 @@ roleRef: kind: Role name: opentelemetry-demo-grafana subjects: - - kind: ServiceAccount - name: opentelemetry-demo-grafana - namespace: otel-demo +- kind: ServiceAccount + name: opentelemetry-demo-grafana + namespace: otel-demo --- # Source: opentelemetry-demo/charts/grafana/templates/service.yaml apiVersion: v1 @@ -8061,7 +8061,7 @@ metadata: spec: type: ClusterIP ports: - + - name: jaeger-compact port: 6831 targetPort: 6831 @@ -8132,7 +8132,7 @@ kind: Service metadata: name: opentelemetry-demo-adservice labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -8146,7 +8146,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-adservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8155,7 +8155,7 @@ kind: Service metadata: name: opentelemetry-demo-cartservice labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -8169,7 +8169,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-cartservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8178,7 +8178,7 @@ kind: Service metadata: name: opentelemetry-demo-checkoutservice labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -8192,7 +8192,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8201,7 +8201,7 @@ kind: Service metadata: name: opentelemetry-demo-currencyservice labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -8215,7 +8215,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-currencyservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8224,7 +8224,7 @@ kind: Service metadata: name: opentelemetry-demo-emailservice labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -8238,7 +8238,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-emailservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8247,7 +8247,7 @@ kind: Service metadata: name: opentelemetry-demo-featureflagservice labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -8264,7 +8264,7 @@ spec: name: http targetPort: 8081 selector: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8273,7 +8273,7 @@ kind: Service metadata: name: opentelemetry-demo-ffspostgres labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -8287,7 +8287,7 @@ spec: name: postgres targetPort: 5432 selector: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres --- # Source: opentelemetry-demo/templates/component.yaml @@ -8296,7 +8296,7 @@ kind: Service metadata: name: opentelemetry-demo-frontend labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -8310,7 +8310,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-frontend --- # Source: opentelemetry-demo/templates/component.yaml @@ -8319,7 +8319,7 @@ kind: Service metadata: name: opentelemetry-demo-frontendproxy labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -8333,7 +8333,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy --- # Source: opentelemetry-demo/templates/component.yaml @@ -8342,7 +8342,7 @@ kind: Service metadata: name: opentelemetry-demo-kafka labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -8359,7 +8359,7 @@ spec: name: controller targetPort: 9093 selector: - + opentelemetry.io/name: opentelemetry-demo-kafka --- # Source: opentelemetry-demo/templates/component.yaml @@ -8368,7 +8368,7 @@ kind: Service metadata: name: opentelemetry-demo-loadgenerator labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -8382,7 +8382,7 @@ spec: name: tcp-service targetPort: 8089 selector: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator --- # Source: opentelemetry-demo/templates/component.yaml @@ -8391,7 +8391,7 @@ kind: Service metadata: name: opentelemetry-demo-paymentservice labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -8405,7 +8405,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-paymentservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8414,7 +8414,7 @@ kind: Service metadata: name: opentelemetry-demo-productcatalogservice labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -8428,7 +8428,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8437,7 +8437,7 @@ kind: Service metadata: name: opentelemetry-demo-quoteservice labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -8451,7 +8451,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-quoteservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8460,7 +8460,7 @@ kind: Service metadata: name: opentelemetry-demo-recommendationservice labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -8474,7 +8474,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice --- # Source: opentelemetry-demo/templates/component.yaml @@ -8483,7 +8483,7 @@ kind: Service metadata: name: opentelemetry-demo-redis labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -8497,7 +8497,7 @@ spec: name: redis targetPort: 6379 selector: - + opentelemetry.io/name: opentelemetry-demo-redis --- # Source: opentelemetry-demo/templates/component.yaml @@ -8506,7 +8506,7 @@ kind: Service metadata: name: opentelemetry-demo-shippingservice labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -8520,7 +8520,7 @@ spec: name: tcp-service targetPort: 8080 selector: - + opentelemetry.io/name: opentelemetry-demo-shippingservice --- # Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml @@ -8554,7 +8554,7 @@ spec: checksum/secret: f37dc127378b75e32576182571ac9b3826d217955ddda163afa1fde86c1cc056 kubectl.kubernetes.io/default-container: grafana spec: - + serviceAccountName: opentelemetry-demo-grafana automountServiceAccountToken: true securityContext: @@ -8571,7 +8571,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL seccompProfile: type: RuntimeDefault volumeMounts: @@ -8675,7 +8675,7 @@ spec: annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" - spec: + spec: containers: - env: - name: METRICS_STORAGE_TYPE @@ -8774,9 +8774,9 @@ spec: app.kubernetes.io/name: otelcol app.kubernetes.io/instance: opentelemetry-demo component: standalone-collector - + spec: - + serviceAccountName: opentelemetry-demo-otelcol securityContext: {} @@ -8790,7 +8790,7 @@ spec: image: "otel/opentelemetry-collector-contrib:0.88.0" imagePullPolicy: IfNotPresent ports: - + - name: jaeger-compact containerPort: 6831 protocol: UDP @@ -8943,7 +8943,7 @@ kind: Deployment metadata: name: opentelemetry-demo-accountingservice labels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8954,12 +8954,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-accountingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: accountingservice @@ -8971,30 +8971,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-accountingservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9004,7 +9004,7 @@ kind: Deployment metadata: name: opentelemetry-demo-adservice labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -9015,12 +9015,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-adservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-adservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: adservice @@ -9032,29 +9032,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-adservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: AD_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_LOGS_EXPORTER - value: otlp - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: AD_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_LOGS_EXPORTER + value: otlp + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 300Mi @@ -9065,7 +9065,7 @@ kind: Deployment metadata: name: opentelemetry-demo-cartservice labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -9076,12 +9076,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-cartservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-cartservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: cartservice @@ -9093,40 +9093,40 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-cartservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CART_SERVICE_PORT - value: "8080" - - name: ASPNETCORE_URLS - value: http://*:$(CART_SERVICE_PORT) - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: REDIS_ADDR - value: 'opentelemetry-demo-redis:6379' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CART_SERVICE_PORT + value: "8080" + - name: ASPNETCORE_URLS + value: http://*:$(CART_SERVICE_PORT) + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: REDIS_ADDR + value: 'opentelemetry-demo-redis:6379' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 160Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting - for redis; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-redis 6379; do echo waiting + for redis; sleep 2; done; image: busybox:latest name: wait-for-redis --- @@ -9136,7 +9136,7 @@ kind: Deployment metadata: name: opentelemetry-demo-checkoutservice labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -9147,12 +9147,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-checkoutservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: checkoutservice @@ -9164,48 +9164,48 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-checkoutservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CHECKOUT_SERVICE_PORT - value: "8080" - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: EMAIL_SERVICE_ADDR - value: http://opentelemetry-demo-emailservice:8080 - - name: PAYMENT_SERVICE_ADDR - value: 'opentelemetry-demo-paymentservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CHECKOUT_SERVICE_PORT + value: "8080" + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: EMAIL_SERVICE_ADDR + value: http://opentelemetry-demo-emailservice:8080 + - name: PAYMENT_SERVICE_ADDR + value: 'opentelemetry-demo-paymentservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9215,7 +9215,7 @@ kind: Deployment metadata: name: opentelemetry-demo-currencyservice labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9226,12 +9226,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-currencyservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: currencyservice @@ -9243,25 +9243,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-currencyservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: CURRENCY_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: CURRENCY_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9272,7 +9272,7 @@ kind: Deployment metadata: name: opentelemetry-demo-emailservice labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9283,12 +9283,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-emailservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-emailservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: emailservice @@ -9300,27 +9300,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-emailservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: EMAIL_SERVICE_PORT - value: "8080" - - name: APP_ENV - value: production - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: EMAIL_SERVICE_PORT + value: "8080" + - name: APP_ENV + value: production + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 100Mi @@ -9331,7 +9331,7 @@ kind: Deployment metadata: name: opentelemetry-demo-featureflagservice labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9342,12 +9342,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-featureflagservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: featureflagservice @@ -9359,33 +9359,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-featureflagservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 50053 - name: grpc - - containerPort: 8081 - name: http + + - containerPort: 50053 + name: grpc + - containerPort: 8081 + name: http env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_GRPC_SERVICE_PORT - value: "50053" - - name: DATABASE_URL - value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: grpc - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_GRPC_SERVICE_PORT + value: "50053" + - name: DATABASE_URL + value: ecto://ffs:ffs@opentelemetry-demo-ffspostgres:5432/ffs + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: grpc + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 175Mi @@ -9397,10 +9397,10 @@ spec: periodSeconds: 10 initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo - waiting for ffspostgres; sleep 2; done + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-ffspostgres 5432; do echo + waiting for ffspostgres; sleep 2; done image: busybox:latest name: wait-for-ffspostgres --- @@ -9410,7 +9410,7 @@ kind: Deployment metadata: name: opentelemetry-demo-ffspostgres labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9421,12 +9421,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-ffspostgres app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: ffspostgres @@ -9438,27 +9438,27 @@ spec: image: 'postgres:14' imagePullPolicy: IfNotPresent ports: - - - containerPort: 5432 - name: postgres + + - containerPort: 5432 + name: postgres env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: POSTGRES_DB - value: ffs - - name: POSTGRES_USER - value: ffs - - name: POSTGRES_PASSWORD - value: ffs - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: POSTGRES_DB + value: ffs + - name: POSTGRES_USER + value: ffs + - name: POSTGRES_PASSWORD + value: ffs + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9473,7 +9473,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frauddetectionservice labels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9484,12 +9484,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frauddetectionservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frauddetectionservice @@ -9501,30 +9501,30 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frauddetectionservice' imagePullPolicy: IfNotPresent env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_SERVICE_ADDR - value: 'opentelemetry-demo-kafka:9092' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_SERVICE_ADDR + value: 'opentelemetry-demo-kafka:9092' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi initContainers: - command: - - sh - - -c - - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting - for kafka; sleep 2; done; + - sh + - -c + - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting + for kafka; sleep 2; done; image: busybox:latest name: wait-for-kafka --- @@ -9534,7 +9534,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontend labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9545,12 +9545,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frontend template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frontend app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontend @@ -9562,45 +9562,45 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontend' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_ADDR - value: :8080 - - name: AD_SERVICE_ADDR - value: 'opentelemetry-demo-adservice:8080' - - name: CART_SERVICE_ADDR - value: 'opentelemetry-demo-cartservice:8080' - - name: CHECKOUT_SERVICE_ADDR - value: 'opentelemetry-demo-checkoutservice:8080' - - name: CURRENCY_SERVICE_ADDR - value: 'opentelemetry-demo-currencyservice:8080' - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: RECOMMENDATION_SERVICE_ADDR - value: 'opentelemetry-demo-recommendationservice:8080' - - name: SHIPPING_SERVICE_ADDR - value: 'opentelemetry-demo-shippingservice:8080' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: WEB_OTEL_SERVICE_NAME - value: frontend-web - - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://localhost:8080/otlp-http/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_ADDR + value: :8080 + - name: AD_SERVICE_ADDR + value: 'opentelemetry-demo-adservice:8080' + - name: CART_SERVICE_ADDR + value: 'opentelemetry-demo-cartservice:8080' + - name: CHECKOUT_SERVICE_ADDR + value: 'opentelemetry-demo-checkoutservice:8080' + - name: CURRENCY_SERVICE_ADDR + value: 'opentelemetry-demo-currencyservice:8080' + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: RECOMMENDATION_SERVICE_ADDR + value: 'opentelemetry-demo-recommendationservice:8080' + - name: SHIPPING_SERVICE_ADDR + value: 'opentelemetry-demo-shippingservice:8080' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: WEB_OTEL_SERVICE_NAME + value: frontend-web + - name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://localhost:8080/otlp-http/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 200Mi @@ -9615,7 +9615,7 @@ kind: Deployment metadata: name: opentelemetry-demo-frontendproxy labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9626,12 +9626,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-frontendproxy app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: frontendproxy @@ -9643,49 +9643,49 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-frontendproxy' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: ENVOY_PORT - value: "8080" - - name: FRONTEND_PORT - value: "8080" - - name: FRONTEND_HOST - value: 'opentelemetry-demo-frontend' - - name: FEATURE_FLAG_SERVICE_PORT - value: "8081" - - name: FEATURE_FLAG_SERVICE_HOST - value: 'opentelemetry-demo-featureflagservice' - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_WEB_HOST - value: 'opentelemetry-demo-loadgenerator' - - name: GRAFANA_SERVICE_PORT - value: "80" - - name: GRAFANA_SERVICE_HOST - value: 'opentelemetry-demo-grafana' - - name: JAEGER_SERVICE_PORT - value: "16686" - - name: JAEGER_SERVICE_HOST - value: 'opentelemetry-demo-jaeger-query' - - name: OTEL_COLLECTOR_PORT_GRPC - value: "4317" - - name: OTEL_COLLECTOR_PORT_HTTP - value: "4318" - - name: OTEL_COLLECTOR_HOST - value: $(OTEL_COLLECTOR_NAME) - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: ENVOY_PORT + value: "8080" + - name: FRONTEND_PORT + value: "8080" + - name: FRONTEND_HOST + value: 'opentelemetry-demo-frontend' + - name: FEATURE_FLAG_SERVICE_PORT + value: "8081" + - name: FEATURE_FLAG_SERVICE_HOST + value: 'opentelemetry-demo-featureflagservice' + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_WEB_HOST + value: 'opentelemetry-demo-loadgenerator' + - name: GRAFANA_SERVICE_PORT + value: "80" + - name: GRAFANA_SERVICE_HOST + value: 'opentelemetry-demo-grafana' + - name: JAEGER_SERVICE_PORT + value: "16686" + - name: JAEGER_SERVICE_HOST + value: 'opentelemetry-demo-jaeger-query' + - name: OTEL_COLLECTOR_PORT_GRPC + value: "4317" + - name: OTEL_COLLECTOR_PORT_HTTP + value: "4318" + - name: OTEL_COLLECTOR_HOST + value: $(OTEL_COLLECTOR_NAME) + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 50Mi @@ -9700,7 +9700,7 @@ kind: Deployment metadata: name: opentelemetry-demo-kafka labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9711,12 +9711,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-kafka template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-kafka app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: kafka @@ -9728,29 +9728,29 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-kafka' imagePullPolicy: IfNotPresent ports: - - - containerPort: 9092 - name: plaintext - - containerPort: 9093 - name: controller + + - containerPort: 9092 + name: plaintext + - containerPort: 9093 + name: controller env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://opentelemetry-demo-kafka:9092 - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: KAFKA_HEAP_OPTS - value: -Xmx200M -Xms200M - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://opentelemetry-demo-kafka:9092 + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: KAFKA_HEAP_OPTS + value: -Xmx200M -Xms200M + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -9765,7 +9765,7 @@ kind: Deployment metadata: name: opentelemetry-demo-loadgenerator labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9776,12 +9776,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-loadgenerator app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: loadgenerator @@ -9793,37 +9793,37 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-loadgenerator' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8089 - name: service + + - containerPort: 8089 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: LOCUST_WEB_PORT - value: "8089" - - name: LOCUST_USERS - value: "10" - - name: LOCUST_SPAWN_RATE - value: "1" - - name: LOCUST_HOST - value: http://opentelemetry-demo-frontendproxy:8080 - - name: LOCUST_HEADLESS - value: "false" - - name: LOCUST_AUTOSTART - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: LOCUST_WEB_PORT + value: "8089" + - name: LOCUST_USERS + value: "10" + - name: LOCUST_SPAWN_RATE + value: "1" + - name: LOCUST_HOST + value: http://opentelemetry-demo-frontendproxy:8080 + - name: LOCUST_HEADLESS + value: "false" + - name: LOCUST_AUTOSTART + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9834,7 +9834,7 @@ kind: Deployment metadata: name: opentelemetry-demo-paymentservice labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9845,12 +9845,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-paymentservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: paymentservice @@ -9862,25 +9862,25 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-paymentservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PAYMENT_SERVICE_PORT - value: "8080" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PAYMENT_SERVICE_PORT + value: "8080" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 120Mi @@ -9895,7 +9895,7 @@ kind: Deployment metadata: name: opentelemetry-demo-productcatalogservice labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9906,12 +9906,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-productcatalogservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: productcatalogservice @@ -9923,27 +9923,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-productcatalogservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: PRODUCT_CATALOG_SERVICE_PORT - value: "8080" - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: PRODUCT_CATALOG_SERVICE_PORT + value: "8080" + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -9954,7 +9954,7 @@ kind: Deployment metadata: name: opentelemetry-demo-quoteservice labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9965,12 +9965,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-quoteservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: quoteservice @@ -9982,27 +9982,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-quoteservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: QUOTE_SERVICE_PORT - value: "8080" - - name: OTEL_PHP_AUTOLOAD_ENABLED - value: "true" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4318 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: QUOTE_SERVICE_PORT + value: "8080" + - name: OTEL_PHP_AUTOLOAD_ENABLED + value: "true" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4318 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 40Mi @@ -10017,7 +10017,7 @@ kind: Deployment metadata: name: opentelemetry-demo-recommendationservice labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10028,12 +10028,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-recommendationservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: recommendationservice @@ -10045,33 +10045,33 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-recommendationservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: RECOMMENDATION_SERVICE_PORT - value: "8080" - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: 'opentelemetry-demo-productcatalogservice:8080' - - name: FEATURE_FLAG_GRPC_SERVICE_ADDR - value: 'opentelemetry-demo-featureflagservice:50053' - - name: OTEL_PYTHON_LOG_CORRELATION - value: "true" - - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION - value: python - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317 - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: RECOMMENDATION_SERVICE_PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: 'opentelemetry-demo-productcatalogservice:8080' + - name: FEATURE_FLAG_GRPC_SERVICE_ADDR + value: 'opentelemetry-demo-featureflagservice:50053' + - name: OTEL_PYTHON_LOG_CORRELATION + value: "true" + - name: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION + value: python + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317 + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 500Mi @@ -10082,7 +10082,7 @@ kind: Deployment metadata: name: opentelemetry-demo-redis labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10093,12 +10093,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-redis template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-redis app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: redis @@ -10110,21 +10110,21 @@ spec: image: 'redis:alpine' imagePullPolicy: IfNotPresent ports: - - - containerPort: 6379 - name: redis + + - containerPort: 6379 + name: redis env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -10139,7 +10139,7 @@ kind: Deployment metadata: name: opentelemetry-demo-shippingservice labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10150,12 +10150,12 @@ spec: replicas: 1 selector: matchLabels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice template: metadata: labels: - + opentelemetry.io/name: opentelemetry-demo-shippingservice app.kubernetes.io/instance: opentelemetry-demo app.kubernetes.io/component: shippingservice @@ -10167,27 +10167,27 @@ spec: image: 'ghcr.io/open-telemetry/demo:1.6.0-shippingservice' imagePullPolicy: IfNotPresent ports: - - - containerPort: 8080 - name: service + + - containerPort: 8080 + name: service env: - - name: OTEL_SERVICE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.labels['app.kubernetes.io/component'] - - name: OTEL_COLLECTOR_NAME - value: 'opentelemetry-demo-otelcol' - - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - value: cumulative - - name: SHIPPING_SERVICE_PORT - value: "8080" - - name: QUOTE_SERVICE_ADDR - value: http://opentelemetry-demo-quoteservice:8080 - - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces - - name: OTEL_RESOURCE_ATTRIBUTES - value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo + - name: OTEL_SERVICE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.labels['app.kubernetes.io/component'] + - name: OTEL_COLLECTOR_NAME + value: 'opentelemetry-demo-otelcol' + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: cumulative + - name: SHIPPING_SERVICE_PORT + value: "8080" + - name: QUOTE_SERVICE_ADDR + value: http://opentelemetry-demo-quoteservice:8080 + - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT + value: http://$(OTEL_COLLECTOR_NAME):4317/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo resources: limits: memory: 20Mi @@ -10251,4 +10251,3 @@ spec: configMap: name: opentelemetry-demo-grafana-test restartPolicy: Never - \ No newline at end of file diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index 3cee18dfa4..26edff237e 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -87,7 +87,7 @@ function update_otel_demo_k8s { yq eval -i ' (.. | select(tag == "!!str")) |= sub("OTEL_COLLECTOR_NAME", "NODE_IP")' "$SPLUNK_K8S_PATH" # then use sed to replace the value - # (yq was not used due to an issue that added extraneous elements to the file) + # (yq was not used due to an issue that added extraneous elements to the file) SEARCH_VAL="value: 'opentelemetry-demo-otelcol'" REPLACE_VAL='valueFrom: \ fieldRef: \ From d3da8172db10709fb3dd7cc5b8569e8d4619b149 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Fri, 22 Dec 2023 10:20:27 -0800 Subject: [PATCH 22/22] Updated script to apply Splunk-specific README updates --- README.md | 5 +++++ splunk/README.md | 5 ++--- splunk/update-demos.sh | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e3b338c414..55fe529688 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Commits](https://img.shields.io/github/commits-since/open-telemetry/opentelemetry-demo/latest?color=ff69b4&include_prereleases)](https://github.com/open-telemetry/opentelemetry-demo/graphs/commit-activity) [![Downloads](https://img.shields.io/docker/pulls/otel/demo)](https://hub.docker.com/r/otel/demo) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=red)](https://github.com/open-telemetry/opentelemetry-demo/blob/main/LICENSE) +[![Integration Tests](https://github.com/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml/badge.svg)](https://github.com/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml) ## Welcome to the OpenTelemetry Astronomy Shop Demo @@ -33,6 +34,10 @@ guidance](./CONTRIBUTING.md). If you'd like to extend this demo or maintain a fork of it, read our [fork guidance](https://opentelemetry.io/docs/demo/forking/). +## Splunk customizations + +A number of customizations have been made to use the demo application with Splunk Observability Cloud, which can be found in the [/splunk](./splunk) folder. See [this document](./splunk/README.md) for details. + ## Quick start You can be up and running with the demo in a few minutes. Check out the docs for diff --git a/splunk/README.md b/splunk/README.md index b5efc694d2..ba23ce0b7f 100644 --- a/splunk/README.md +++ b/splunk/README.md @@ -6,14 +6,13 @@ This repository contains a fork of the OpenTelemetry Astronomy Shop, a microserv distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment. It includes customizations for use with Splunk Observability Cloud. - ## Update Docker and Kubernetes Scripts After synchronizing changes with the upstream repository, the following command can be used to update the Splunk versions of the docker-compose.yml and kubernetes/opentelemetry-demo.yaml files, which are optimized for use with Splunk Observability Cloud: -```` +```bash ./update-demos.sh -```` +``` ## Quick start diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index 26edff237e..0d0ae3bd0d 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -14,6 +14,26 @@ set -euo pipefail # Set default paths if environment variables are not set SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) +function update_root_readme { + ROOT_README_PATH=${ROOT_README_PATH:-"$SCRIPT_DIR/../README.md"} + + # Download the latest README file from upstream + curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/README.md \ + > "$ROOT_README_PATH" + + # add a section to the root README file with a pointer to Splunk customizations + SEARCH_VAL="## Quick start" + REPLACE_VAL='## Splunk customizations \ +\ +A number of customizations have been made to use the demo application with Splunk Observability Cloud, which can be found in the \[\/splunk\](\.\/splunk) folder. See \[this document\](\.\/splunk\/README.md) for details. \ +\ +## Quick start' + + sed -i '' "s/${SEARCH_VAL}/${REPLACE_VAL}/g" "$ROOT_README_PATH" + + echo "Completed updating the root README.md file for the OpenTelemetry demo app!" +} + function update_otel_demo_docker { DOCKER_COMPOSE_PATH=${DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../docker-compose.yml"} SPLUNK_DOCKER_COMPOSE_PATH=${SPLUNK_DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../splunk/docker-compose.yml"} @@ -104,5 +124,6 @@ function update_otel_demo_k8s { } # ---- OpenTelemetry Demo Update ---- +update_root_readme update_otel_demo_docker update_otel_demo_k8s