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
gcp-observability: add grpc-census as a dependency and update opencensus version #9140
Conversation
gcp-observability/build.gradle
Outdated
@@ -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'), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
gcp-observability/build.gradle
Outdated
('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}"), |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
inbuild.gradle
:0.28.0
andopencensusExporterVersion
ingcp-observability/build.gradle
:0.28.0
opencensusVersion
inbuild.gradle
:0.28.0
andopencensusExporterVersion
ingcp-observability/build.gradle
:0.31.0
opencensusVersion
inbuild.gradle
:0.31.0
andopencensusExporterVersion
ingcp-observability/build.gradle
:0.31.0
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds dependencies required to export metrics and traces data to stackdriver.
0.31.0
.io.opencensus.trace.unsafe.ContextUtils
has been deprecated, suppressing warnings for now.CC @sanjaypujare