Closed aeneev closed 3 years ago
Merging #286 (628b418) into master (f81d98c) will increase coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #286 +/- ##
==========================================
+ Coverage 71.37% 71.39% +0.01%
==========================================
Files 17 17
Lines 1530 1531 +1
==========================================
+ Hits 1092 1093 +1
Misses 364 364
Partials 74 74
Impacted Files | Coverage Δ | |
---|---|---|
resource.go | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f81d98c...628b418. Read the comment docs.
While converting an ocagent resource to a cloud resource, stackdriver exporter looks for a set of labels that apply to a generic_task resource: https://cloud.google.com/monitoring/api/resources#tag_generic_task
However, if it doesn't find one of the labels, it falls back to "global" resource with just the project id label, and it works OK.
But if it does find all of the labels, it will attach them to the exported resource, and Cloud API fails with "Unrecognized resource label" error, because those labels do not exist on a "global" resource.
Changing "global" to "generic_task" fixes this situation.