mirror of
https://github.com/zoriya/drizzle-otel.git
synced 2025-12-06 00:46:09 +00:00
add image
This commit is contained in:
BIN
images/otel-polar-trace.png
Normal file
BIN
images/otel-polar-trace.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 MiB |
@@ -4,6 +4,10 @@ OpenTelemetry instrumentation for the [Polar.sh](https://polar.sh) Node.js SDK.
|
|||||||
Capture spans for every Polar API call, enrich them with operation metadata,
|
Capture spans for every Polar API call, enrich them with operation metadata,
|
||||||
and keep an eye on your billing, subscriptions, and customer operations from your traces.
|
and keep an eye on your billing, subscriptions, and customer operations from your traces.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
_Visualize your Polar operations with detailed span information including resource IDs, organization IDs, and operation metadata._
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -373,23 +377,6 @@ fastify.get("/customers", async (request, reply) => {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### No spans appearing
|
|
||||||
|
|
||||||
Ensure you have:
|
|
||||||
1. Initialized OpenTelemetry SDK before instrumenting Polar
|
|
||||||
2. Called `instrumentPolar()` after creating the Polar client
|
|
||||||
3. Configured a span exporter (Console, OTLP, etc.)
|
|
||||||
|
|
||||||
### Spans not linking to parent traces
|
|
||||||
|
|
||||||
The instrumentation uses `context.active()` to link spans. Ensure your HTTP framework supports OpenTelemetry context propagation.
|
|
||||||
|
|
||||||
### Double instrumentation
|
|
||||||
|
|
||||||
The instrumentation is idempotent. Calling `instrumentPolar()` multiple times on the same client is safe and will only instrument once.
|
|
||||||
|
|
||||||
## TypeScript Support
|
## TypeScript Support
|
||||||
|
|
||||||
This package includes full TypeScript definitions. The instrumentation preserves all type information from the Polar SDK:
|
This package includes full TypeScript definitions. The instrumentation preserves all type information from the Polar SDK:
|
||||||
|
|||||||
Reference in New Issue
Block a user