opentelemetry-helm-charts icon indicating copy to clipboard operation
opentelemetry-helm-charts copied to clipboard

OTLP Receiver in Kubernetes Cluster Not Exposing Logs

Open DevProJSSV opened this issue 11 months ago • 1 comments

Hello community,

I am trying to understand what is missing for my configuration in the open telemetry collector. I have been trying to find some examples of otlp receiver usage in a Kubernetes cluster but still I am not able to find it.

Currently I have deployed a otel collector instance called with a otel receiver configured like this:

  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: "0.0.0.0:4317"
        http:
          endpoint: "0.0.0.0:4318"

I am using the default setting as you can see and what I can understand is that this way the collector will be listening on these ports so any pod that is exposing logs/metrics/traces on these ports will be collected by the collector. But well, I am not seeing this is happening at least inside the cluster.

I created a pod that is using https://github.com/serilog/serilog-sinks-opentelemetry/tree/dev/example/Example code to generate logs and expose them using otlp (grpc and http ports).

I followed the same approach this Example shows to test using a collector pod in my cluster and port forward the port to my local so I can run the application locally too and see the logs been collected by the collector instance.

After this I tried deploying a pod "test-pod" with the same code logic into my cluster, but I was not able to see at the collector any log registered. I think this might be something related to Kubernetes environment considerations that I am not able to identify.

Do you have some suggestions or examples you can share with me to integrate/test the otpl receiver inside a kubernetes environment?

I will really appreciate it .

DevProJSSV avatar Mar 06 '24 19:03 DevProJSSV