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
docs: Update stackdriver examples for tracing and stats #613
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,6 +258,8 @@ StackdriverTraceExporter.createAndRegister( | |
.setProjectId("YOUR_PROJECT_ID") | ||
.build()); | ||
``` | ||
You can view the traces on the Google Cloud Platform Console | ||
[Trace](https://console.cloud.google.com/traces) page. | ||
|
||
By default traces are [sampled](https://opencensus.io/tracing/sampling) at a rate of about 1/10,000. | ||
You can configure a higher rate by updating the active tracing params: | ||
|
@@ -376,6 +378,28 @@ BigtableDataSettings.enableOpenCensusStats(); | |
BigtableDataSettings.enableGfeOpenCensusStats(); | ||
``` | ||
|
||
You can view the metrics on the Google Cloud Platform Console | ||
[Metrics explorer](https://console.cloud.google.com/monitoring/metrics-explorer) | ||
page. | ||
|
||
You can configure how frequent metrics are pushed to StackDriver and the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo: frequently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: may be nicer to inline these suggestions into the example below. People may read code more easily than documentation esp. for monitored resource, we want to encourage users to choose their own instead of just going w/ global. |
||
[Monitor Resource](https://cloud.google.com/monitoring/api/resources) by | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better phrasing: Monitored Resource |
||
updating the stats configuration: | ||
|
||
``` java | ||
// set export interval to 10 seconds and monitor resource to global | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Prefix this comment w/ Example, just to make it clear this isn't the standard way to do it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we probably don't need the specified monitored resource too. Can we link to the Java doc for this so people can easily see all the options? |
||
StackdriverStatsExporter.createAndRegister( | ||
StackdriverStatsConfiguration.builder() | ||
.setProjectId("YOUR_PROJECT_ID") | ||
.setExportInterval(Duration.create(10, 0)) | ||
.setMonitoredResource(MonitoredResource.newBuilder() | ||
.setType("global") | ||
.putLabels("project_id", "YOUR_PROJECT_ID") | ||
.build()) | ||
.build() | ||
); | ||
``` | ||
|
||
## Version Conflicts | ||
|
||
google-cloud-bigtable depends on gRPC directly which may conflict with the versions brought | ||
|
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"m not sure that this line works still. Or at least it didn't compile when I tried using it I think
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.
Ah.. Looks like this change is not released yet