1
0
mirror of https://github.com/golang/go synced 2024-10-01 12:38:31 -06:00
go/internal/telemetry/export
Nathan Dias 96ad48e4b0 internal/telemetry/export/ocagent: correctly marshal points to JSON
This change adds a custom MarshalJSON func to Point so that values
are formatted the same way jsonpb formats them. This allows the
OpenCensus service to determine the concrete type of the point's
value when unmarshaling.

What works:
* Points with Int64, Double, and Distribution values will marshal correctly.

What does not work:
* Points with Summary values will not marshal.

Updates golang/go#33819

Change-Id: Ia76ebff4e0e2b6ff2ddf72b8d6187f49069d4cad
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207838
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-11-21 17:24:11 +00:00
..
ocagent internal/telemetry/export/ocagent: correctly marshal points to JSON 2019-11-21 17:24:11 +00:00
prometheus internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
export.go internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
log.go internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
multi.go internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
null.go internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00