Deprecate MonitoredResource and change to use Resource.#1718
Deprecate MonitoredResource and change to use Resource.#1718bogdandrutu merged 4 commits intocensus-instrumentation:masterfrom
Conversation
|
Can we combine this with #1590? |
|
@mayurkale22 feel free to push a PR after this 👍 (seriously already large changes, I was actually trying to understand how to split, put I think is simple enough) |
|
Please fix the nullness checker. |
bb47567 to
0140612
Compare
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
============================================
+ Coverage 81.99% 82.17% +0.18%
- Complexity 1904 1909 +5
============================================
Files 280 283 +3
Lines 8937 8956 +19
Branches 850 849 -1
============================================
+ Hits 7328 7360 +32
+ Misses 1327 1316 -11
+ Partials 282 280 -2
Continue to review full report at Codecov.
|
|
@songy23 done |
0140612 to
6afe46f
Compare
|
Please fix the import. |
6afe46f to
53cf379
Compare
|
@songy23 finally working. |
songy23
left a comment
There was a problem hiding this comment.
LGTM except minor comments.
| */ | ||
| public abstract String getAccount(); | ||
| public String getAccount() { | ||
| return firstNonNull(awsInstanceLabels.get(AwsEc2InstanceResource.ACCOUNT_ID_KEY), ""); |
There was a problem hiding this comment.
`firstNonNull here is not needed because it's already called: https://github.com/census-instrumentation/opencensus-java/pull/1718/files#diff-e0f6d1e015f871479d844cca09da8bc7R34. Same for all others in this class.
There was a problem hiding this comment.
Ignore this comment - just saw this is the key not the value.
| * | ||
| * @since 0.20 | ||
| */ | ||
| public class K8sContainerResource { |
There was a problem hiding this comment.
So project, instance-id and zone do not apply to the k8s resource?
There was a problem hiding this comment.
They are not related to k8s resource, but when we do autodetection if the pod/container runs on a GCE instance they will be added in the resource merging.
| * | ||
| * @since 0.20 | ||
| */ | ||
| public class K8sContainerResource { |
No description provided.