Skip to content

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

Merged
sanjaypujare merged 3 commits intogrpc:masterfrom
DNVindhya:gcp-o11y-metrics-oc-dependency
May 4, 2022
Merged

gcp-observability: add grpc-census as a dependency and update opencensus version#9140
sanjaypujare merged 3 commits intogrpc:masterfrom
DNVindhya:gcp-o11y-metrics-oc-dependency

Conversation

@DNVindhya
Copy link
Copy Markdown
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
Comment thread gcp-observability/build.gradle
Comment thread census/src/main/java/io/grpc/census/CensusTracingModule.java
Comment thread census/src/main/java/io/grpc/census/CensusTracingModule.java
Comment thread gcp-observability/build.gradle Outdated
('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
Copy Markdown
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
Copy Markdown
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.

Comment thread gcp-observability/build.gradle Outdated

implementation project(':grpc-census'),
libraries.opencensus_contrib_grpc_metrics,
("io.opencensus:opencensus-exporter-stats-stackdriver:${opencensusVersion}"),
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants