Skip to content

Commit a0f046b

Browse files
Merge branch 'release/3.11' into DOC-11764--docker-otel-prometheus
2 parents b2998f6 + e4b2394 commit a0f046b

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

modules/howtos/pages/collecting-information-and-logging.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ And the Prometheus-format metrics fetched with:
275275
curl --user Administrator:password http://172.17.0.2:8091/metrics
276276
----
277277

278+
Further details can be found in the xref:{version-server}@server:rest-api:application-telemetry.adoc[] page.
279+
278280
There may be advantages to collecting information this way,
279281
but note that metrics are collected per node,
280282
and a central Prometheus instance should be set to collect all metrics so that information is not lost in case of a sudden failover.

modules/howtos/pages/observability-tracing.adoc

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,34 @@ To give insight into a request/response flow, the SDK provides a `RequestTracer`
1414
By default, the SDK will emit information about requests that are over a configurable threshold every 10 seconds.
1515
Note that if no requests are over the threshold no event / log will be emitted.
1616

17-
It is possible to customize this behavior by modifying the configuration:
17+
It is possible to customize this behavior by modifying the configuration.
18+
The recommended way to configure the environment is via a callback when connecting to the cluster:
1819

1920
[source,java]
2021
----
21-
include::devguide:example$java/Tracing.java[tag=tracing-configure,indent=0]
22+
var cluster = Cluster.connect(
23+
connectionString,
24+
clusterOptions(username, password)
25+
.environment(env -> env
26+
.thresholdLoggingTracerConfig(config -> config
27+
.enabled(true) // it's enabled by default, so this line is not strictly necessary
28+
.emitInterval(Duration.ofMinutes(1))
29+
.kvThreshold(Duration.ofSeconds(2))
30+
)
31+
)
32+
);
2233
----
2334

2435
In this case the emit interval is one minute and Key/Value requests will only be considered if their latency is greater or equal than two seconds.
2536

37+
// Don't think we'll need to call this out explicitly, but it's here if we need to uncomment it:
38+
//
39+
// TIP:
40+
// Using the `ClusterOptions.environment()`, as in the above snippet, ensures that the SDK manages the environment --
41+
// shutting down after disconnecting from the cluster.
42+
// If you create your own `own ClusterEnvironent` or `ClusterEnvironment.Builder` then you will need to manage the environment yourself.
43+
44+
2645
The JSON blob emitted looks similar to the following (prettified here for readability):
2746

2847
[source,json]

modules/howtos/pages/slow-operations-logging.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Threshold logging is the recording of slow operations -- useful for diagnosing w
1616

1717
=== Configuring Threshold Logging
1818

19-
To configure threshold logging, adjust the xref:ref:client-settings.adoc#general-options[ThresholdRequestTracer].
19+
To configure threshold logging, adjust the xref:observability-tracing.adoc#the-default-thresholdloggingtracer[ThresholdRequestTracer].
2020
You should expect to see output in JSON format in the logs for the services encountering problems:
2121

2222
[source,json]
@@ -54,4 +54,4 @@ Each entry looks like this, with all fields populated:
5454
}
5555
----
5656

57-
If a field is not present (because for example dispatch did not happen), it will not be included.
57+
If a field is not present (because for example dispatch did not happen), it will not be included.

0 commit comments

Comments
 (0)