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
This package has been instrumented with [OpenTelemetry](https://opentelemetry.io/docs/languages/js/) for tracing.
89
-
For correct operation, please make sure to firstly import and enable OpenTelemetry before importing this Spanner library.
92
+
This Cloud Spanner client supports [OpenTelemetry Traces](https://opentelemetry.io/), which gives insight into the client internals and aids in debugging/troubleshooting production issues.
90
93
91
-
> :warning:**Make sure that the OpenTelemetry imports are the first, before importing the Spanner library**
92
-
> :warning:**In order for your spans to be annotated with the executed SQL, you MUST opt-in by setting environment variable
93
-
`SPANNER_ENABLE_EXTENDED_TRACING=true`, this is because SQL statements can contain
Optionally, you can enable gRPC instrumentation which produces traces of executed remote procedure calls (RPCs)
184
+
Optionally, you can enable OpenTelemetry gRPC instrumentation which produces traces of executed remote procedure calls (RPCs)
182
185
in your programs by these imports and instantiation before creating the tracerProvider:
183
186
184
187
```javascript
@@ -189,6 +192,9 @@ in your programs by these imports and instantiation before creating the tracerPr
189
192
});
190
193
```
191
194
195
+
### Sample
196
+
For more information please see this [sample code](./samples/observability.js)
197
+
192
198
## Samples
193
199
194
200
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
0 commit comments