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

exporter/opencensus: No metrics supported #599

Closed inigohu closed 5 years ago

inigohu commented 5 years ago

I'm using opencensus-agent exporter (golang client), to send data to an agent, then to a collector and finally to stackdriver. I can see traces in stackdriver, but not metrics. I've also added a prometheus exporter in my service to check that I'm generating metrics correctly. Here are my configs:

main.go

oce, err := ocagent.NewExporter(
        ocagent.WithInsecure(),
        ocagent.WithReconnectionPeriod(5*time.Second),
        ocagent.WithAddress(ocAgentAddress),
        ocagent.WithServiceName("my-service"))
if err != nil {
    log.Fatalf("Failed to create a new ocagent exporter: %v", err)
}

trace.RegisterExporter(oce)
view.RegisterExporter(oce)

oc-agent-config.yaml

receivers:
  opencensus:
    address: ":55678"

exporters:
  opencensus:
    endpoint: "oc-collector:55678"

oc-collector-config.yaml

receivers:
  opencensus:
    port: 55678

exporters:
  stackdriver:
    project: "xxxxxxx"
    metric_prefix: "demo"
    enable_tracing: true
    enable_metrics: true
inigohu commented 5 years ago

I've found this TODO. Opencensus metric exporter is not implemented yet.

https://github.com/census-instrumentation/opencensus-service/blob/2fc6b54e5a3607e0c1904482e520155514c190c2/exporter/opencensusexporter/opencensus.go#L187-L188

Any plan to do it?

songy23 commented 5 years ago

Collector doesn't support metrics yet (#530). Currently you can only send metrics to other backends through Agent.

tigrannajaryan commented 5 years ago

Metrics support is currently being added to OpenTelemetry Service (https://github.com/open-telemetry/opentelemetry-service) which we expect to be the successor of OpenCensus Service/Collector.

flands commented 5 years ago

No plans to support this in OC, will be available in OT for first release