census-instrumentation / opencensus-service

OpenCensus service allows OpenCensus libraries to export to an exporter service rather than having to link vendor-specific exports.
Apache License 2.0
153 stars 63 forks source link

`zpages` configuration for collector doesn't work #581

Open asutoshpalai opened 5 years ago

asutoshpalai commented 5 years ago

Setting zpages as per the README doesn't work for collector config.

user@host$ cat oc-collector-config.yaml 
log-level: DEBUG
receivers:
  opencensus:
    port: 55680

queued-exporters:
  jaeger-all-in-one:
    num-workers: 4
    queue-size: 100
    retry-on-failure: true
    sender-type: jaeger-thrift-http
    jaeger-thrift-http:
      collector-endpoint: http://localhost:14268/api/traces
      timeout: 5s

zpages:
  port: 8889
user@host$ ./bin/occollector_darwin --config=oc-collector-config.yaml 
{"level":"info","ts":1560820045.830445,"caller":"collector/collector.go:167","msg":"Starting...","NumCPU":12}
{"level":"info","ts":1560820045.830784,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":13133,"status":"unavailable"}
{"level":"info","ts":1560820045.83092,"caller":"collector/processors.go:266","msg":"Queued Jaeger Sender Enabled"}
{"level":"info","ts":1560820045.8309371,"caller":"collector/processors.go:64","msg":"Constructing queue processor with name","name":"jaeger-all-in-one"}
{"level":"info","ts":1560820045.830952,"caller":"collector/processors.go:85","msg":"Initializing thrift-HTTP sender","url":"http://localhost:14268/api/traces"}
{"level":"info","ts":1560820045.831074,"caller":"collector/collector.go:114","msg":"Running zPages","port":55679}
{"level":"info","ts":1560820046.835243,"caller":"opencensus/receiver.go:51","msg":"OpenCensus receiver is running.","port":55680}
{"level":"info","ts":1560820046.835828,"caller":"collector/telemetry.go:93","msg":"Serving Prometheus metrics","port":8888}
{"level":"info","ts":1560820046.836153,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}
^C{"level":"info","ts":1560820051.4450371,"caller":"collector/collector.go:148","msg":"Received signal from OS","signal":"interrupt"}
{"level":"info","ts":1560820051.445089,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"unavailable"}
{"level":"info","ts":1560820051.445102,"caller":"collector/collector.go:187","msg":"Starting shutdown..."}
{"level":"info","ts":1560820051.445269,"caller":"collector/collector.go:198","msg":"Shutdown complete."}

As can be observed, the log outputs {"level":"info","ts":1560820045.831074,"caller":"collector/collector.go:114","msg":"Running zPages","port":55679}

pjanotti commented 5 years ago

Thanks for reporting @asutoshpalai, on the collector use zpages-http-port: 8889 instead (or directly on the command-line) as a workaround.

asutoshpalai commented 5 years ago

Thanks @pjanotti for the quick reply, can confirm that both the workarounds work!