GoogleCloudPlatform / microservices-demo

Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.
https://cymbal-shops.retail.cymbal.dev
Apache License 2.0
17.1k stars 7.36k forks source link

ENABLE_STATS doesn't do anything #2399

Open scarolan opened 9 months ago

scarolan commented 9 months ago

The README suggests ENABLE_STATS to have the app export metrics to OTLP. This environment variable doesn't seem to do anything, I was unable to find any mentions of it in the go code. Was this something that was intended to be implemented but never completed?

https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/kustomize/components/google-cloud-operations/README.md#changes

When enabling this kustomize module, most services will be patched with a configuration similar to the following:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: productcatalogservice
spec:
  template:
    spec:
      containers:
        - name: server
          env:
          - name: COLLECTOR_SERVICE_ADDR
            value: "opentelemetrycollector:4317"
          - name: ENABLE_STATS
            value: "1"
          - name: ENABLE_TRACING
            value: "1"
bourgeoisor commented 7 months ago

cc: @NimJay @arbrown do either of you know the answer to this question?

It does indeed look like these variables don't show up anywhere in the code, e.g.: image