SigNoz / signoz

SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
https://signoz.io
Other
18.92k stars 1.23k forks source link

OTLP HTTP/1.0 receiver not found in otel collector service #833

Closed rinshadka closed 2 years ago

rinshadka commented 2 years ago

Hi, I lost the OTLP HTTP/1.0 receiver, after upgrading otel collector service to latest signoz/otelcontribcol:0.43.0 version.

Now I could only use OTLP GRPC receiver port at 4317.

Earlier I was using OTLP HTTP/1.0 receiver at 55681.

Found different in the docker-compose port expose for otel-collector service:

Earlier:-

    ports:
      - "1777:1777"   # pprof extension
      - "8887:8888"   # Prometheus metrics exposed by the agent
      - "14268:14268"       # Jaeger receiver
      - "55678"       # OpenCensus receiver
      - "55680:55680"       # OTLP HTTP/2.0 legacy port
      - "55681:55681"       # OTLP HTTP/1.0 receiver
      - "4317:4317"       # OTLP GRPC receiver
      - "55679:55679" # zpages extension
      - "13133"       # health_check
      - "8889:8889"   # prometheus exporter

Now:-

    ports:
      - "4317:4317"       # OTLP GRPC receiver

Please help, Thanks.

pranay01 commented 2 years ago

yeah @rinshadka We have deprecated OTLP HTTP/1.0 receiver at 55681

Are you not able to use port 4317 for sending your application data to SigNoz?

ankitnayan commented 2 years ago

@rinshadka were you instrumenting nodeJs application? OpenTelemetry has deprecated the use of port 55681 and we have upgrade otel-collector to latest versions. We recommend you to upgrade to the latest version of SigNoz v0.7.1 and make minor changes to your nodeJs apps.

@pranay01 would be great to refer some nodeJs docs and examples that use 4317 for communication

pranay01 commented 2 years ago

@rinshadka Here's the updated docs for instrumenting you Nodejs app - https://signoz.io/docs/instrumentation/nodejs/

rinshadka commented 2 years ago

Thanks for the support @pranay01 @ankitnayan. I am running the latest SigNoz v0.7.1 now and 4317 is working fine from a python application. I will share these information with our developer.

pranay01 commented 2 years ago

cool @rinshadka 🎉 Closing the issue, feel free to reopen if needed

dittybijil commented 2 years ago

@ankitnayan @pranay01 as @rinshadka mentioned its working fine with python and node application. But we are facing issue when we use it for web. As per tickets 2825 and 2806 they are not providing support for this feature now. Can you support us for solving this issue.

Thanks for your support

ankitnayan commented 2 years ago

@dittybijil for web you can continue sending data to via http at 4318 port. Opentelemetry collector already listens at http and just additional port 4318 needs to be exposed at https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L61. The default http port has changed from 55681 to 4318.

rinshadka commented 2 years ago

@ankitnayan we are using signoz/otelcontribcol:0.43.0 as collector service and from the logs I can see that ports 4317, 55681 and 4318 are all starting from the log below:-

otlpreceiver/otlp.go:69 Starting GRPC server on endpoint 0.0.0.0:4317   {"kind": "receiver", "name": "otlp"}
otlpreceiver/otlp.go:87 Starting HTTP server on endpoint 0.0.0.0:4318   {"kind": "receiver", "name": "otlp"}
otlpreceiver/otlp.go:147        Setting up a second HTTP listener on legacy endpoint 0.0.0.0:55681      {"kind": "receiver", "name": "otlp"}
otlpreceiver/otlp.go:87 Starting HTTP server on endpoint 0.0.0.0:55681  {"kind": "receiver", "name": "otlp"}

Then I have added 55681 and 4318 ports along with 4317 for exposing in docker-compose as below:-

      - "4317:4317"       # OTLP GRPC receiver
      - "55681:55681"      # OTLP HTTP/1.0 receiver
      - "4318:4318"       # OTLP HTTP/1.0 receiver

But both the HTTP ports are not working as expected. In earlier version of otel-collector, we were getting a response like below when we just access the port - 55681 in browser,

{
  "code": 12,
  "message": "Not Implemented",
  "details": [
  ]
} 

But in the new version no responses coming on bot HTTP ports, Please support.

Thanks.

ankitnayan commented 2 years ago

@rinshadka Is this solved now? I would suggest trying out some examples from opentelemetry on configuring and sending data to otel-collector. You might have to add cors at otel-collector config apart from exposing ports at docker-compose.yaml. Like this https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/examples/connect/docker/collector-config.yaml#L6-L8 SigNoz's otel-collector config is at https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/otel-collector-config.yaml#L9

rinshadka commented 2 years ago

@ankitnayan I was not able to expose the port 4318 to host machine with the latest - otelcontribcol:0.43.0 version. So I am using otelcontribcol:0.6.0 version now with exposed 55681 port. For CORs headers I am using Traefik reverse-proxy.

ankitnayan commented 2 years ago

got it

rinshadka commented 2 years ago

@ankitnayan , I have tried the latest Signoz v0.7.2 implementation using this docker-compose file. But port4318 is not accessible. I have also enabled port - 55681, But this port also is not working.

So, I am still stuck with the otelcontribcol:0.6.0 version with exposed OTLP HTTP port - 55681 in production environment.

Also can I use latest - signoz/frontend:0.7.2 and signoz/query-service:0.7.2along with older signoz/otelcontribcol:0.6.0 in production environment once this issue is sorted out.

Thanks.

ankitnayan commented 2 years ago

@rinshadka A good concrete way of solving this would be to help us with a sample Github repo that does not work and our team will try to make it work.

rinshadka commented 2 years ago

@ankitnayan , Today I have worked on a fresh installation one of the test servers.

Fetch the repository:- git clone -b main https://github.com/SigNoz/signoz.git && cd signoz/deploy/

Deployment:- docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d

Accessed OTLP HTTP port in browser:- http://local-ip:4318/ -> responds with a 404 page not found

Then enabled OTLP HTTP legacy receiver like below and re-deployed:-

 otel-collector:
    image: signoz/otelcontribcol:0.43.0
    command: ["--config=/etc/otel-collector-config.yaml"]
    volumes:
      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
    ports:
      - "4317:4317"     # OTLP gRPC receiver
      - "4318:4318"     # OTLP HTTP receiver
      # - "8889:8889"     # Prometheus metrics exposed by the agent
      # - "13133"         # health_check
      # - "14268:14268"   # Jaeger receiver
      # - "55678:55678"   # OpenCensus receiver
      # - "55679:55679"   # zpages extension
      # - "55680:55680"   # OTLP gRPC legacy port
      - "55681:55681"   # OTLP HTTP legacy receiver

Accessed that port in browser:- http://10.10.10.171:55681 -> responds with a 404 page not found

In earlier version of otel-collector (otelcontribcol:0.6.0), we were getting a response like below when we just access the port - 55681 in browser,

{
  "code": 12,
  "message": "Not Implemented",
  "details": [
  ]
} 

But in the new version no responses coming on both HTTP ports.

Thanks.

ankitnayan commented 2 years ago

@rinshadka I need a frontend repo with configurations used to replicate and then investigate. This must have little to do with SigNoz but with how instrumentation is done on frontend.

The signoz's otel-collector has been upgraded from otel's v0.26.0 to v0.43.0, so there is something the instrumentation config is using which changed in receivers in v0.43.0 and hence would need a frontend repo with config to replicate this issue.

ankitnayan commented 2 years ago

Hey @rinshadka, I tested it out with an angular app. The config to define cors has changed from

        cors_allowed_origins:
        - http://*
        - https://*

to below in otel-collector version v0.43.0

        cors:
          allowed_origins:
          - http://*
          - https://*

After this, you need to restart otel-collector to apply the new config.

And, you need to use endpoint http://<IP of machine hosting signoz>:4318/v1/traces from your frontend app. Assuming you have already exposed port 4318 at signoz's machine. If not, signoz exposes port 4318 by default from v0.7.2

ankitnayan commented 2 years ago

Though I could not see the frontend app on application list page but was able to see the traces in traces page