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

gcp-observability: add grpc-census as a dependency and update opencensus version #9140

Merged
merged 3 commits into from May 4, 2022

Conversation

DNVindhya
Copy link
Contributor

This PR adds dependencies required to export metrics and traces data to stackdriver.

  • Also, updates opencensus version to 0.31.0.
  • As part of version update, io.opencensus.trace.unsafe.ContextUtils has been deprecated, suppressing warnings for now.

CC @sanjaypujare

@sanjaypujare sanjaypujare self-requested a review May 3, 2022 04:13
@@ -36,11 +36,18 @@ dependencies {
('com.google.auth:google-auth-library-credentials:1.4.0'),
('org.checkerframework:checker-qual:3.20.0'),
('com.google.auto.value:auto-value-annotations:1.9'),
('com.google.http-client:google-http-client:1.41.0'),
('com.google.http-client:google-http-client-gson:1.41.0'),
('com.google.http-client:google-http-client:1.41.7'),
Copy link
Contributor

Choose a reason for hiding this comment

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

What required this version upgrade?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was done because of version conflict on using opencensus, whcih is used by cloud logging library as well. But on re-arranging the libraries and project as you mentioned I do not see version conflicts anymore. So reverting back this version upgrade.

('com.google.api.grpc:proto-google-common-protos:2.7.1'),
("com.google.cloud:google-cloud-logging:${cloudLoggingVersion}")

implementation project(':grpc-census'),
libraries.opencensus_contrib_grpc_metrics,
("io.opencensus:opencensus-exporter-stats-stackdriver:${opencensusVersion}"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to define these in libraries in the top level build.gradle. Also are you sure these will have the same version as ${opencensusVersion} ? That is in future we might need to use a different version for exporter-*-stackdriver from ${opencensusVersion} - or may be not...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved libraries and project dependencies to top level in build.gradle.

They are the same at the moment. To account for a different exporter version in future, renamed the variable to opencensusExporterVersion. Let me know if I am misisng something.

And I did verify the combination of following versions using a manual test:

  • opencensusVersion in build.gradle: 0.28.0 and opencensusExporterVersion in gcp-observability/build.gradle:0.28.0
  • opencensusVersion in build.gradle: 0.28.0 and opencensusExporterVersion in gcp-observability/build.gradle:0.31.0
  • opencensusVersion in build.gradle: 0.31.0 and opencensusExporterVersion in gcp-observability/build.gradle:0.31.0

Copy link
Contributor

@sanjaypujare sanjaypujare 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 but I have added a couple of comments which should be addressed. Also I want to confirm that this combination of versions was tested with a manual test

Copy link
Contributor

@sanjaypujare sanjaypujare left a comment

Choose a reason for hiding this comment

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

LGTM

@sanjaypujare sanjaypujare merged commit 15ecc07 into grpc:master May 4, 2022
@DNVindhya DNVindhya deleted the gcp-o11y-metrics-oc-dependency branch May 4, 2022 23:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants