Closed ygonzal6 closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
/gcbrun please add unit tests
/gcbrun
=== RUN TestMetricTypeToMonitoringMetricKind
--- FAIL: TestMetricTypeToMonitoringMetricKind (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe5e139]
goroutine 2541 [running]:
testing.tRunner.func1.2({0xf40920, 0x218d8e0})
/usr/local/go/src/testing/testing.go:1209 +0x36c
testing.tRunner.func1()
/usr/local/go/src/testing/testing.go:1212 +0x3b6
panic({0xf40920, 0x218d8e0})
/usr/local/go/src/runtime/panic.go:1047 +0x266
contrib.go.opencensus.io/exporter/stackdriver.TestMetricTypeToMonitoringMetricKind(0xc000225a00)
/workspace/metrics_test.go:433 +0x459
testing.tRunner(0xc000225a00, 0x106a290)
/usr/local/go/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:1306 +0x727
FAIL contrib.go.opencensus.io/exporter/stackdriver 8.212s
/gcbrun
Attempting to create metrics with unspecified metricKind floods GCP logs with the following error: "Request was missing field metricDescriptor.metricKind: The descriptor does not have the metric kind set." This will happen when metric type is of TypeSummary.