You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,45 @@ public class DisableTLSExample {
153
153
}
154
154
```
155
155
156
+
#### Capturing response metadata for observability
157
+
158
+
The SDK supports capturing response metadata for all data plane operations (upsert, query, fetch, update, delete). This enables you to track latency metrics and integrate with observability tools like OpenTelemetry, Prometheus, or Datadog.
|`getClientDurationMs()`| Total round-trip time measured by the client |
185
+
|`getServerDurationMs()`| Server processing time from `x-pinecone-response-duration-ms` header |
186
+
|`getNetworkOverheadMs()`| Computed: client duration - server duration |
187
+
|`getIndexName()`| Name of the index |
188
+
|`getNamespace()`| Namespace used |
189
+
|`isSuccess()`| Whether the operation succeeded |
190
+
|`getGrpcStatusCode()`| gRPC status code |
191
+
|`getErrorType()`| Error category when failed |
192
+
193
+
For a complete OpenTelemetry integration example with Prometheus and Grafana, see the [java-otel-metrics example](examples/java-otel-metrics/).
194
+
156
195
# Indexes
157
196
158
197
Operations related to the building and managing of Pinecone indexes are called [control plane](https://docs.pinecone.io/reference/api/introduction#control-plane) operations.
0 commit comments