Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The issue I encountered while deploying a demo via Helm according to the official documentation #1467

Closed
puckpuck opened this issue Mar 19, 2024 Discussed in #1444 · 1 comment

Comments

@puckpuck
Copy link
Contributor

Discussed in #1444

Originally posted by caozhangni March 9, 2024
I encountered an issue while deploying a demo via Helm according to the official documentation(https://opentelemetry.io/docs/demo/kubernetes-deployment/#configure-browser-telemetry). The documentation suggests modifying the PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT via env, but I found that this causes some environment variables to be lost, leading to abnormal functioning of the frontend component. The list of environment variables in the container is as follows:

Environment:
OTEL_SERVICE_NAME: (v1:metadata.labels['app.kubernetes.io/component'])
OTEL_COLLECTOR_NAME: my-otel-demo-otelcol
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: cumulative
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://otel.czn.com/otlp-http/v1/traces
OTEL_RESOURCE_ATTRIBUTES: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo

After replacing it with envOverride, the issue was resolved, and everything worked well:

Environment:
OTEL_SERVICE_NAME: (v1:metadata.labels['app.kubernetes.io/component'])
OTEL_COLLECTOR_NAME: my-otel-demo-otelcol
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: cumulative
FRONTEND_PORT: 8080
FRONTEND_ADDR: :8080
AD_SERVICE_ADDR: my-otel-demo-adservice:8080
CART_SERVICE_ADDR: my-otel-demo-cartservice:8080
CHECKOUT_SERVICE_ADDR: my-otel-demo-checkoutservice:8080
CURRENCY_SERVICE_ADDR: my-otel-demo-currencyservice:8080
PRODUCT_CATALOG_SERVICE_ADDR: my-otel-demo-productcatalogservice:8080
RECOMMENDATION_SERVICE_ADDR: my-otel-demo-recommendationservice:8080
SHIPPING_SERVICE_ADDR: my-otel-demo-shippingservice:8080
OTEL_COLLECTOR_HOST: $(OTEL_COLLECTOR_NAME)
OTEL_EXPORTER_OTLP_ENDPOINT: http://$(OTEL_COLLECTOR_NAME):4317
WEB_OTEL_SERVICE_NAME: frontend-web
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://otel.czn.com/otlp-http/v1/traces
OTEL_RESOURCE_ATTRIBUTES: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo

@puckpuck
Copy link
Contributor Author

This issue is now fixed in docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant