Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Misleading error message for nil tag key #175

Open
mwuertinger opened this issue Aug 7, 2019 · 0 comments
Open

Misleading error message for nil tag key #175

mwuertinger opened this issue Aug 7, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@mwuertinger
Copy link

What version of the Exporter are you using?

v0.12.4

What version of OpenCensus are you using?

v0.22.0

What version of Go are you using?

go version go1.12.7 linux/amd64

What did you do?

I accidentally built and registered a view with a nil tag key:

myView = &view.View{
	Name:        "myview",
	Description: "some description",
	Measure:     myMeasure,
	Aggregation: view.Distribution(1, 2, 3),
	TagKeys:     []tag.Key{nil},
}

What did you expect to see?

I expected to see an informative error message containing at least the affected view.

What did you see instead?

I got the following error message from the Stackdriver exporter which was not helpful in locating the problem:

Request was missing field metricDescriptor.labels[1].key: Label key is missing.
@mwuertinger mwuertinger added the bug Something isn't working label Aug 7, 2019
@mwuertinger mwuertinger changed the title Label key is missing Misleading error message for nil tag key Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant