odigos-io / odigos

Distributed tracing without code changes. 🚀 Instantly monitor any application using OpenTelemetry and eBPF
https://odigos.io
Apache License 2.0
3.21k stars 195 forks source link

How do I debug odigos? #736

Closed sokoow closed 11 months ago

sokoow commented 11 months ago

Describe the bug

I'm trying to make odigos working with loki, tempo and prometheus - but I can't. Trying to instrument a golang app, configured loki, tempo and prometheus as sinks in odigos, but only thing I can see is this:

kubectl logs odigos-data-collection-kk8nz -n odigos-system
2023-11-01T13:59:33.843Z    info    service/telemetry.go:90 Setting up own telemetry...
2023-11-01T13:59:33.844Z    info    service/telemetry.go:116    Serving Prometheus metrics  {"address": ":8888", "level": "Basic"}
2023-11-01T13:59:33.850Z    info    odigosresourcenameprocessor@v0.71.0/name_resolver.go:66 Starting NameResolver ...   {"kind": "processor", "name": "odigosresourcename", "pipeline": "metrics"}
2023-11-01T13:59:34.220Z    warn    kubelet@v0.71.0/client.go:183   Kubelet endpoint not defined, using default endpoint https://k3s1:10250 {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"}
2023-11-01T13:59:34.608Z    info    service/service.go:140  Starting otelcontribcol...  {"Version": "0.71.0-dev", "NumCPU": 2}
2023-11-01T13:59:34.608Z    info    extensions/extensions.go:41 Starting extensions...
2023-11-01T13:59:34.608Z    info    extensions/extensions.go:44 Extension is starting...    {"kind": "extension", "name": "health_check"}
2023-11-01T13:59:34.608Z    info    healthcheckextension@v0.71.0/healthcheckextension.go:45 Starting health_check extension {"kind": "extension", "name": "health_check", "config": {"Endpoint":"0.0.0.0:13133","TLSSetting":null,"CORS":null,"Auth":null,"MaxRequestBodySize":0,"IncludeMetadata":false,"Path":"/","CheckCollectorPipeline":{"Enabled":false,"Interval":"5m","ExporterFailureThreshold":5}}}
2023-11-01T13:59:34.608Z    warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks    {"kind": "extension", "name": "health_check", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-11-01T13:59:34.608Z    info    extensions/extensions.go:48 Extension started.  {"kind": "extension", "name": "health_check"}
2023-11-01T13:59:34.608Z    info    extensions/extensions.go:44 Extension is starting...    {"kind": "extension", "name": "zpages"}
2023-11-01T13:59:34.608Z    info    zpagesextension@v0.71.0/zpagesextension.go:64   Registered zPages span processor on tracer provider {"kind": "extension", "name": "zpages"}
2023-11-01T13:59:34.608Z    info    zpagesextension@v0.71.0/zpagesextension.go:74   Registered Host's zPages    {"kind": "extension", "name": "zpages"}
2023-11-01T13:59:34.608Z    info    zpagesextension@v0.71.0/zpagesextension.go:86   Starting zPages extension   {"kind": "extension", "name": "zpages", "config": {"TCPAddr":{"Endpoint":"localhost:55679"}}}
2023-11-01T13:59:34.609Z    info    extensions/extensions.go:48 Extension started.  {"kind": "extension", "name": "zpages"}
2023-11-01T13:59:34.610Z    warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks    {"kind": "receiver", "name": "otlp", "data_type": "metrics", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-11-01T13:59:34.610Z    info    otlpreceiver@v0.71.0/otlp.go:94 Starting GRPC server    {"kind": "receiver", "name": "otlp", "data_type": "metrics", "endpoint": "0.0.0.0:4317"}
2023-11-01T13:59:34.610Z    warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks    {"kind": "receiver", "name": "otlp", "data_type": "metrics", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-11-01T13:59:34.610Z    info    otlpreceiver@v0.71.0/otlp.go:112    Starting HTTP server    {"kind": "receiver", "name": "otlp", "data_type": "metrics", "endpoint": "0.0.0.0:4318"}
2023-11-01T13:59:34.610Z    info    adapter/receiver.go:56  Starting stanza receiver    {"kind": "receiver", "name": "filelog", "data_type": "logs"}
2023-11-01T13:59:34.622Z    warn    internal/warning.go:51  Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks    {"kind": "receiver", "name": "zipkin", "data_type": "traces", "documentation": "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks"}
2023-11-01T13:59:34.629Z    info    healthcheck/handler.go:129  Health Check state change   {"kind": "extension", "name": "health_check", "status": "ready"}
2023-11-01T13:59:34.629Z    info    service/service.go:157  Everything is ready. Begin running and processing data.
2023-11-01T13:59:35.186Z    info    fileconsumer/file.go:171    Started watching file   {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "/var/log/pods/cert-manager_cert-manager-74ff65749c-tqrvj_dbdca3d8-5545-4a8d-b96f-44aefc829089/cert-manager-controller/1.log"}
2023-11-01T13:59:40.137Z    info    fileconsumer/file.go:171    Started watching file   {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "/var/log/pods/default_gitea-6fc85dd56f-6s2k7_7487828c-9268-4836-9826-741ee3c4e272/init-directories/0.log"}
2023-11-01T13:59:43.334Z    info    fileconsumer/file.go:171    Started watching file   {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "/var/log/pods/default_gitea-6fc85dd56f-6s2k7_7487828c-9268-4836-9826-741ee3c4e272/init-app-ini/0.log"}

Tempo has no new traces, I can't see service graph, and loki has no logs corelated to traces - is there any tutorial on how to configure and debug this product?

To Reproduce

Steps to reproduce the behavior:

  1. Install observability stack
  2. instrument gitea
  3. hope for traces

Desktop (please complete the following information): linux mint os

Additional context Add any other context about the problem here.

edeNFed commented 11 months ago

Hi @sokoow can you please show the logs of the odiglet pod? This is the pod responsible for instrumenting applications and producing the data. This will help us to understand the root cause.

kubectl logs -n odigos-system <odiglet-pod-name>
sokoow commented 11 months ago

ah, I can see it now:

{"level":"info","ts":1698928991.8865356,"caller":"kube/shared.go:110","msg":"updated runtime info","result":"created","name":"gitea","kind":"Deployment","namespace":"default"}
{"level":"info","ts":1698929196.8323047,"caller":"kube/pods.go:48","msg":"pod is not running, removing instrumentation","controller":"pod","controllerGroup":"","controllerKind":"Pod","Pod":{"name":"gitea-6f6dbbb474-hf2kt","namespace":"default"},"namespace":"default","name":"gitea-6f6dbbb474-hf2kt","reconcileID":"5c06ab98-023b-4091-a32a-853bee68b279"}
{"level":"info","ts":1698929197.6842651,"caller":"kube/pods.go:48","msg":"pod is not running, removing instrumentation","controller":"pod","controllerGroup":"","controllerKind":"Pod","Pod":{"name":"gitea-6f6dbbb474-hf2kt","namespace":"default"},"namespace":"default","name":"gitea-6f6dbbb474-hf2kt","reconcileID":"12916ff3-a6ee-4819-833b-3e929b505534"}
{"level":"info","ts":1698929240.7900429,"caller":"ebpf/director.go:47","msg":"Instrumenting process","pid":54903}
{"level":"info","ts":1698929240.7901502,"caller":"ebpf/director.go:47","msg":"Instrumenting process","pid":54918}
{"level":"info","ts":1698929240.7903354,"caller":"opentelemetry/controller.go:101","msg":"Establishing connection to OTLP receiver ..."}
{"level":"info","ts":1698929240.7906945,"caller":"opentelemetry/controller.go:101","msg":"Establishing connection to OTLP receiver ..."}
{"level":"info","ts":1698929240.791354,"caller":"process/analyze.go:109","msg":"No symbols found in binary, trying to find functions using .gosymtab"}
{"level":"error","ts":1698929240.827417,"caller":"ebpf/director.go:58","msg":"instrumentation setup failed","error":"not a Go executable","stacktrace":"github.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:58"}
{"level":"error","ts":1698929241.0389721,"caller":"process/analyze.go:93","msg":"Failed to find functions","error":".gosymtab section not found in target binary, make sure this is a Go application","stacktrace":"go.opentelemetry.io/auto/internal/pkg/process.(*Analyzer).Analyze\n\t/root/go/pkg/mod/go.opentelemetry.io/auto@v0.7.0-alpha/internal/pkg/process/analyze.go:93\ngo.opentelemetry.io/auto.NewInstrumentation\n\t/root/go/pkg/mod/go.opentelemetry.io/auto@v0.7.0-alpha/instrumentation.go:88\ngithub.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:56"}
{"level":"error","ts":1698929241.0398512,"caller":"ebpf/director.go:58","msg":"instrumentation setup failed","error":".gosymtab section not found in target binary, make sure this is a Go application","stacktrace":"github.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:58"}
{"level":"info","ts":1698929256.875302,"caller":"ebpf/director.go:47","msg":"Instrumenting process","pid":54903}
{"level":"info","ts":1698929256.875548,"caller":"ebpf/director.go:47","msg":"Instrumenting process","pid":54918}
{"level":"info","ts":1698929256.877129,"caller":"opentelemetry/controller.go:101","msg":"Establishing connection to OTLP receiver ..."}
{"level":"info","ts":1698929256.8791273,"caller":"opentelemetry/controller.go:101","msg":"Establishing connection to OTLP receiver ..."}
{"level":"error","ts":1698929256.8861096,"caller":"ebpf/director.go:58","msg":"instrumentation setup failed","error":"not a Go executable","stacktrace":"github.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:58"}
{"level":"info","ts":1698929256.8893397,"caller":"process/analyze.go:109","msg":"No symbols found in binary, trying to find functions using .gosymtab"}
{"level":"error","ts":1698929257.0632849,"caller":"process/analyze.go:93","msg":"Failed to find functions","error":".gosymtab section not found in target binary, make sure this is a Go application","stacktrace":"go.opentelemetry.io/auto/internal/pkg/process.(*Analyzer).Analyze\n\t/root/go/pkg/mod/go.opentelemetry.io/auto@v0.7.0-alpha/internal/pkg/process/analyze.go:93\ngo.opentelemetry.io/auto.NewInstrumentation\n\t/root/go/pkg/mod/go.opentelemetry.io/auto@v0.7.0-alpha/instrumentation.go:88\ngithub.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:56"}
{"level":"error","ts":1698929257.0634067,"caller":"ebpf/director.go:58","msg":"instrumentation setup failed","error":".gosymtab section not found in target binary, make sure this is a Go application","stacktrace":"github.com/keyval-dev/odigos/odiglet/pkg/ebpf.(*InstrumentationDirector).Instrument.func1\n\t/go/src/github.com/keyval-dev/odigos/odiglet/pkg/ebpf/director.go:58"}
sokoow commented 11 months ago

so odiglet looks at CMD or ENTRYPOINT in docker containers? you don't scan the process tree just yet ? s6 is the init manager in gitea, probably that's why it's complaining