Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

all: update opencensus-proto to latest version and add grpc-gateway Metrics release is made #607

@odeke-em

Description

@odeke-em

This issue is a placeholder to update to the opencensus-proto version that features Metrics for the grpc-gateway as per PR census-instrumentation/opencensus-proto#205

and then in the source code, we can add this

diff --git a/receiver/opencensusreceiver/opencensus.go b/receiver/opencensusreceiver/opencensus.go
index 1db22ab..abeba11 100644
--- a/receiver/opencensusreceiver/opencensus.go
+++ b/receiver/opencensusreceiver/opencensus.go
@@ -259,6 +259,11 @@ func (ocr *Receiver) startServer() error {
 				errChan <- err
 				return
 			}
+			err = agentmetricspb.RegisterMetricsServiceHandlerFromEndpoint(c, ocr.gatewayMux, endpoint, opts)
+			if err != nil {
+				errChan <- err
+				return
+			}
 
 			// Start the gRPC and HTTP/JSON (grpc-gateway) servers on the same port.
 			m := cmux.New(ocr.ln)

and then finally the grpc-gateway will be able to receive metrics in JSON form.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions