Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics exporter #33

Merged
merged 18 commits into from
Sep 10, 2020
Merged

Add metrics exporter #33

merged 18 commits into from
Sep 10, 2020

Conversation

zoercai
Copy link
Contributor

@zoercai zoercai commented Aug 31, 2020

This adds the metric exporter for Google cloud monitoring.
Unit tests here: zoercai#1
End to end tests (WIP) here: zoercai#2

@zoercai zoercai marked this pull request as ready for review September 1, 2020 08:45
@zoercai zoercai requested a review from nilebox September 1, 2020 08:45
Copy link
Contributor

@nilebox nilebox left a comment

Choose a reason for hiding this comment

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

See comment about adding missing property setters.

@zoercai zoercai requested a review from nilebox September 2, 2020 05:47
Copy link
Contributor

@nilebox nilebox left a comment

Choose a reason for hiding this comment

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

Looks good overall, just some clarifying / cleanup comments

@@ -29,6 +30,7 @@ subprojects {
google_cloud_core : "com.google.cloud:google-cloud-core:${googleCloudVersion}",
google_cloud_grpc : "com.google.api.grpc:grpc-google-cloud-trace-v2:${googleCloudVersion}",
google_cloud_trace : "com.google.cloud:google-cloud-trace:${googleCloudVersion}",
google_cloud_monitoring : "com.google.cloud:google-cloud-monitoring:${cloudMonitoringVersion}",
Copy link
Contributor

Choose a reason for hiding this comment

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

We are using {googleCloudVersion} for both core and trace dependencies above, but not for Cloud Monitoring client? Might be worth checking if we should also use separate versioning for core and tracing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I used a separate version for cloud monitoring because the 1.0.2 version didn't have much and didn't work. I've added a separate cloudTracingVersion for tracing, kept it to 1.0.2 for this PR though.

exporters/metrics/build.gradle Outdated Show resolved Hide resolved
@zoercai zoercai requested a review from nilebox September 7, 2020 10:37
!attributes.get("cloud.provider").getStringValue().equals("gcp")) {
return null;
}
String resourceType = attributes.get("gcp.resource_type").getStringValue();
Copy link
Contributor

@nilebox nilebox Sep 8, 2020

Choose a reason for hiding this comment

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

@james-bebbington @aabmass have we agreed to keep this attribute, or should we switch to semantic conventions?

I would suggest to just remove resource GCP mapping for now from the code, and add it later (we also need to add mapping for all other resource types defined in OpenCensus Go exporter for feature parity).

Copy link
Contributor

Choose a reason for hiding this comment

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

To clarify, the question was whether we should infer resource type based on other attributes, like we did in open-telemetry/opentelemetry-collector#1462

@zoercai zoercai requested a review from nilebox September 8, 2020 07:38
@zoercai zoercai requested review from nilebox and aabmass September 9, 2020 07:48
Copy link
Contributor

@nilebox nilebox left a comment

Choose a reason for hiding this comment

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

A few final comments, and it's ready to merge.

build.gradle Outdated Show resolved Hide resolved
Copy link
Contributor

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

LGTM! Just need to work out that 1ms interval spacing

@aabmass aabmass requested a review from kjordy September 9, 2020 16:59
@nilebox nilebox merged commit 0896e0d into GoogleCloudPlatform:master Sep 10, 2020
@zoercai zoercai mentioned this pull request Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants