open-telemetry / opentelemetry-helm-charts

OpenTelemetry Helm Charts
https://opentelemetry.io
Apache License 2.0
368 stars 453 forks source link

Pls Guide - Integrate application POD with Collector deployed via helm charts from this repo #1165

Open banandh opened 2 months ago

banandh commented 2 months ago

Hi - This is the first time trying to integrate OTel collector and application in kubernetes, earlier have integrated in local without containerisation. I tried deploying the demo chart but most of the containers are not running and I keep getting one or the other issue. So planning to integrate my application pod with the collector. Please advise if the below approach will work or any suggestions.

  1. Install kubernetes operator and collector chart what is provided in this repo.
  2. Install Prometheus , Grafana and Jaeger helm's as standalone deployment. (Its supported in demo since the chart fails , planning to deploy it independent pieces)
  3. Deploy my hello-world java application pod with java opentelemetry agent and configure with OTLP collector endpoint as 10.42.0.166:4318. Since my Otel collector listens for HTTP on 4318 2024-05-02T08:04:15.060Z info otlpreceiver@v0.99.0/otlp.go:152 Starting HTTP server {"kind": "receiver", "name": "otlp", "data_type": "logs", "endpoint": "10.42.0.166:4318"}

With the above steps application can emit the telemetry data to collector and collector is already configured to export traces and metrics to prometheus https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/values.yaml.

Jaeger , Prometheus are given with {env:MY_POD_IP} ip , instead of that i should override the collector yaml to use respective POD IP's. prometheus: config: scrape_configs:

Do you see any issues with this integration approach

TylerHelmuth commented 2 months ago

I highly suggest following this guide: https://opentelemetry.io/docs/kubernetes/getting-started/