This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Replace MonitoredResource with Resource#508
Merged
c24t merged 5 commits intocensus-instrumentation:masterfrom Feb 20, 2019
Merged
Replace MonitoredResource with Resource#508c24t merged 5 commits intocensus-instrumentation:masterfrom
c24t merged 5 commits intocensus-instrumentation:masterfrom
Conversation
c24t
commented
Feb 20, 2019
|
|
||
| class MonitoredResource(object): | ||
| """MonitoredResource returns the resource type and resource labels. | ||
| def is_gke_environment(): |
Member
Author
There was a problem hiding this comment.
The is_x_environment methods were moved from utils.
c24t
commented
Feb 20, 2019
c24t
commented
Feb 20, 2019
| self.assertEquals(resource.get_type(), 'aws_ec2_instance') | ||
| self.assertEquals(resource.get_labels(), mocked_labels) | ||
|
|
||
| def test_gke_environment(self): |
Member
Author
There was a problem hiding this comment.
These tests were moved from test_monitored_resource_util.
c24t
commented
Feb 20, 2019
songy23
approved these changes
Feb 20, 2019
Contributor
songy23
left a comment
There was a problem hiding this comment.
LGTM overall. Note that gke_container resource is now replaced with k8s_containter resource, and it needs to be updated in the following PRs.
reyang
approved these changes
Feb 20, 2019
mayurkale22
approved these changes
Feb 20, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Resourceclass that implements the Resource API specMonitoredResourceclasses and changesget_instanceso that it returns aResourceinstead of aMonitoredResourcemonitored_resource_utilmodule and moves its contents intomonitored_resourceSee also the PR to deprecate
MonitoredResourcein the java client.I'll rename the
monitored_resource_utilpackagemonitored_resourcein another PR.Addresses #457.