Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Expose the factory methods of MonitoredResource.#1250

Merged
songy23 merged 3 commits intocensus-instrumentation:masterfrom
songy23:monitored-utils
Jun 12, 2018
Merged

Expose the factory methods of MonitoredResource.#1250
songy23 merged 3 commits intocensus-instrumentation:masterfrom
songy23:monitored-utils

Conversation

@songy23
Copy link
Copy Markdown
Contributor

@songy23 songy23 commented Jun 12, 2018

To make the unit tests of other libraries that depend on monitored-resource-utils easier to write.

@songy23 songy23 added the API label Jun 12, 2018
@songy23 songy23 added this to the Release 0.15.0 milestone Jun 12, 2018
@songy23 songy23 requested a review from sebright2 June 12, 2018 02:09
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 12, 2018

Codecov Report

Merging #1250 into master will increase coverage by 0.42%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1250      +/-   ##
============================================
+ Coverage     82.06%   82.48%   +0.42%     
- Complexity     1241     1244       +3     
============================================
  Files           193      193              
  Lines          6044     6047       +3     
  Branches        560      560              
============================================
+ Hits           4960     4988      +28     
+ Misses          935      909      -26     
- Partials        149      150       +1
Impacted Files Coverage Δ Complexity Δ
...trib/monitoredresource/util/MonitoredResource.java 88.57% <33.33%> (+63.57%) 3 <0> (+1) ⬆️
...rter/stats/stackdriver/StackdriverExportUtils.java 81.53% <0%> (ø) 29% <0%> (ø) ⬇️
...ib/monitoredresource/util/AwsIdentityDocUtils.java 56.25% <0%> (+4.16%) 7% <0%> (+1%) ⬆️
...trib/monitoredresource/util/GcpMetadataConfig.java 68.18% <0%> (+13.63%) 5% <0%> (+1%) ⬆️

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 a6e0485...42b5fad. Read the comment docs.

@rghetia
Copy link
Copy Markdown
Contributor

rghetia commented Jun 12, 2018

LGTM

@songy23 songy23 changed the title Expose the constructor of MonitoredResource. Expose the factory methods of MonitoredResource. Jun 12, 2018
* @return an {@code AwsEc2InstanceMonitoredResource}.
* @since 0.15
*/
public static AwsEc2InstanceMonitoredResource create() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we continue hiding the no-arg factory methods, to reduce the size of the API? I also think that the no-arg methods could be confusing, because users might expect the factory methods in AutoValue classes to be deterministic, but these depend on the environment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me, done.

@songy23
Copy link
Copy Markdown
Contributor Author

songy23 commented Jun 12, 2018

Thanks!

@songy23 songy23 merged commit 9149643 into census-instrumentation:master Jun 12, 2018
@songy23 songy23 deleted the monitored-utils branch June 12, 2018 20:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants