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
feat: add QueryOptions to Spanner samples #2323
feat: add QueryOptions to Spanner samples #2323
Conversation
spanner/cloud-client/src/main/java/com/example/spanner/SpannerSample.java
Outdated
Show resolved
Hide resolved
spanner/cloud-client/src/main/java/com/example/spanner/SpannerSample.java
Outdated
Show resolved
Hide resolved
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.
Thanks for the fix @olavloite, please merge once you've resolved the conflicts.
a8e4ca1
to
6be6979
Compare
@skuruppu This depends on the release of OpenCensus 0.26 where census-instrumentation/opencensus-java#2017 should be included. That would fix googleapis/java-spanner#106. |
CC @mayurkale22. This is one of the critical PRs blocked from being merged at the moment. |
I started the release process (census-instrumentation/opencensus-java#2027), will keep you posted once new version is published to maven. |
4485b83
to
a98e99a
Compare
This PR adds an automatically generated identifier to all database clients that are created by the client library. This avoids collisions of the same metrics being registered multiple times, and makes it possible to distinguish different clients from each other in the monitoring. This PR does not allow the user to specify the id, but this could be added in a future change. That would need an API change by adding an overload to the method `getDatabaseClient(DatabaseId)` with an additional `clientId` parameter. This should also fix the build error in GoogleCloudPlatform/java-docs-samples#2323. Fixes #106
…dPlatform#2382) Co-authored-by: Averi Kitsch <akitsch@google.com>
….748 (GoogleCloudPlatform#2446) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.amazonaws:aws-java-sdk-s3](https://aws.amazon.com/sdkforjava) | patch | `1.11.747` -> `1.11.748` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/java-docs-samples).
…oragetransfer to v1-rev20200316-1.30.9
* Maven config updates * lint * lint * lint
…to v1.52.0 (GoogleCloudPlatform#2452) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-spanner](https://togithub.com/googleapis/java-spanner) | minor | `1.51.0` -> `1.52.0` | --- ### Release Notes <details> <summary>googleapis/java-spanner</summary> ### [`v1.52.0`](https://togithub.com/googleapis/java-spanner/blob/master/CHANGELOG.md#​1520httpswwwgithubcomgoogleapisjava-spannercomparev1510v1520-2020-03-20) [Compare Source](https://togithub.com/googleapis/java-spanner/compare/v1.51.0...v1.52.0) ##### Features - add backup support ([#&GoogleCloudPlatform#8203;100](https://www.github.com/googleapis/java-spanner/issues/100)) ([ed3874a](https://www.github.com/googleapis/java-spanner/commit/ed3874afcf55fe7381354e03dab3a3b97d7eb520)) - add Backups protos and APIs ([#&GoogleCloudPlatform#8203;97](https://www.github.com/googleapis/java-spanner/issues/97)) ([5643c22](https://www.github.com/googleapis/java-spanner/commit/5643c22a4531dac75b9fac5b128eb714a27920a0)) ##### Bug Fixes - add client id to metrics to avoid collisions ([#&GoogleCloudPlatform#8203;117](https://www.github.com/googleapis/java-spanner/issues/117)) ([338e136](https://www.github.com/googleapis/java-spanner/commit/338e136508edc6745f9371e8a5d66638021bc8d7)), closes [#&GoogleCloudPlatform#8203;106](https://www.github.com/googleapis/java-spanner/issues/106) - ignore added interface methods for generated code ([#&GoogleCloudPlatform#8203;101](https://www.github.com/googleapis/java-spanner/issues/101)) ([402cfa1](https://www.github.com/googleapis/java-spanner/commit/402cfa1e1e2994f7bb1b783cf823021b54fb175e)), closes [#&GoogleCloudPlatform#8203;99](https://www.github.com/googleapis/java-spanner/issues/99) - use grpc 1.27.2 to prevent version conflicts ([#&GoogleCloudPlatform#8203;105](https://www.github.com/googleapis/java-spanner/issues/105)) ([37b7c88](https://www.github.com/googleapis/java-spanner/commit/37b7c8859e5f35d85bd14ef72662614fd185c020)) ##### Dependencies - update core dependencies ([#&GoogleCloudPlatform#8203;94](https://www.github.com/googleapis/java-spanner/issues/94)) ([f3ca4c9](https://www.github.com/googleapis/java-spanner/commit/f3ca4c99c3d54f64c5eda11e4a4c076140fdbc6a)) - update opencensus.version to v0.26.0 ([#&GoogleCloudPlatform#8203;116](https://www.github.com/googleapis/java-spanner/issues/116)) ([1b8db0b](https://www.github.com/googleapis/java-spanner/commit/1b8db0b407429e02bb1e4c9af839afeed21dac5d)) </details> --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/java-docs-samples).
…m#2453) This PR contains the following updates: | Package | Update | Change | |---|---|---| | com.google.appengine:appengine-api-1.0-sdk | patch | `1.9.78` -> `1.9.79` | | com.google.appengine:appengine-tools-sdk | patch | `1.9.78` -> `1.9.79` | | com.google.appengine:appengine-api-stubs | patch | `1.9.78` -> `1.9.79` | | com.google.appengine:appengine-testing | patch | `1.9.78` -> `1.9.79` | | com.google.appengine:appengine-remote-api | patch | `1.9.78` -> `1.9.79` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/java-docs-samples).
* modified tests to cancel job * added delay to tests * added comment
* Add Slack sample + clean up imports * Address comments * Remove excess gcloudignore + actually disable tests * Simplify tests + run them on Kokoro. ALSO bugfix unused shellchecks. * Remove extra file * HACK: resolve surefire issue via file presence * HACK take 2: use a different filepath * HACK take 3: use env var not used by local Cloud Build * Remove gitignore now that config.json isnt used * DBG: print defined env vars * DBG take 2 * DBG take 3 * DBG take 4 * DBG take 5 * DBG take 6 * DBG take 7 * Fix tests...? * Revert dbg commits + fix tests
…ogleCloudPlatform#2422) ~@vinod-at-google @labtopia IIRC the lack of log severity info is a known issue. (If it's not, let me know so I can hold off on merging this PR.)~
8b95a56
to
c29d879
Compare
@lesv, @gguuss or @chingor13, could we kindly get an approval from one of you for this PR as we're not able to merge it in otherwise. |
Thanks so much @lesv for the approval. |
338e136 commit 338e136 Author: Knut Olav Løite <koloite@gmail.com> Date: Fri Mar 20 04:32:04 2020 +0100 fix: add client id to metrics to avoid collisions (#117) This PR adds an automatically generated identifier to all database clients that are created by the client library. This avoids collisions of the same metrics being registered multiple times, and makes it possible to distinguish different clients from each other in the monitoring. This PR does not allow the user to specify the id, but this could be added in a future change. That would need an API change by adding an overload to the method `getDatabaseClient(DatabaseId)` with an additional `clientId` parameter. This should also fix the build error in GoogleCloudPlatform/java-docs-samples#2323. Fixes #106 google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java google-cloud-spanner/src/main/java/com/google/cloud/spanner/MetricRegistryConstants.java google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java
No description provided.