-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bigtable: instrument client with Opencensus metrics #6143
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
Conversation
# Conflicts: # google-cloud-clients/google-cloud-bigtable/pom.xml
...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
Outdated
Show resolved
Hide resolved
...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
Outdated
Show resolved
Hide resolved
...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
Outdated
Show resolved
Hide resolved
* clean up code
Codecov Report
@@ Coverage Diff @@
## master #6143 +/- ##
===========================================
+ Coverage 47.23% 47.53% +0.3%
- Complexity 27458 27470 +12
===========================================
Files 2526 2534 +8
Lines 274535 274918 +383
Branches 30579 31408 +829
===========================================
+ Hits 129668 130674 +1006
- Misses 134446 134611 +165
+ Partials 10421 9633 -788
Continue to review full report at Codecov.
|
| of mutations per BulkMutation. | ||
|
|
||
|
|
||
| By default, the functionality is disabled. To enable, you need to add a couple of |
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.
I would reword: "To enable, please follow the instructions below:"
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.
changed the wording, PTAL
| libraryDependencies += "io.opencensus" % "opencensus-exporter-stats-stackdriver" % "0.23.0" | ||
| ``` | ||
|
|
||
| Then at the start of your application configure the exporter and enable the Bigtable stats views: |
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.
Remove "then"
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.
done
| } | ||
|
|
||
| /** | ||
| * Enables Opencensus metric aggregations. |
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.
minor - change all occurrences of "Opencensus" to "OpenCensus"
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.
done
| * }</pre> | ||
| */ | ||
| @BetaApi("Opencensus stats integration is currently unstable and may change in the future") | ||
| public static void enableOpencensusStats() { |
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.
OpenCensus
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.
done
| * <li>Add tracing & metrics. | ||
| * </ul> | ||
| */ | ||
| @Deprecated |
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.
point to new method?
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.
done
| import javax.annotation.Nonnull; | ||
|
|
||
| /** | ||
| * @deprecated Please use {@link MeasuredMutateRowsCallableV2}. |
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.
please add an internal use only comment as well
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.
done
It adds stats to logical operations for things like:
This should allow users to better debug the performance of the client. Allowing to debug scenarios like high perceived latency on the client side, but no latency visible on the serverside due to retries.
This also adds a more user friendly way to enable data collection by exposing a method on the settings class.
Main changes: