@vercel/otel 1.2.1 → 1.3.0-3750c3f4-20240216162848
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/edge/index.js +8 -10
- package/dist/node/index.js +12 -13
- package/dist/types/instrumentations/fetch.d.ts +1 -0
- package/dist/types/util/sampled.d.ts +1 -0
- package/dist/types/util/template.d.ts +2 -0
- package/package.json +1 -1
- package/dist/edge/index.js.map +0 -7
- package/dist/node/index.js.map +0 -7
package/README.md
CHANGED
|
@@ -42,15 +42,23 @@ Registers the OpenTelemetry SDK with the specified configuration. Configuration
|
|
|
42
42
|
- `instrumentations`: A set of instrumentations. By default, `@vercel/otel` configures "fetch" instrumentation.
|
|
43
43
|
- `instrumentationConfig`: Customize configuration for predefined instrumentations:
|
|
44
44
|
- `fetch`: Customize configuration of the predefined "fetch" instrumentation:
|
|
45
|
-
- `ignoreUrls`: A set of URL matchers (string prefix or regex) that should be ignored from tracing. By default all URLs are traced. Example: `fetch: { ignoreUrls: [/example.com/] }
|
|
45
|
+
- `ignoreUrls`: A set of URL matchers (string prefix or regex) that should be ignored from tracing. By default all URLs are traced. Example: `fetch: { ignoreUrls: [/example.com/] }`.
|
|
46
46
|
- `propagateContextUrls`: A set of URL matchers (string prefix or regex) for which the tracing context should be propagated (see `propagators`). By default the context is propagated _only_ for the [deployment URLs](https://vercel.com/docs/deployments/generated-urls), all other URLs should be enabled explicitly. Example: `fetch: { propagateContextUrls: [ /my.api/ ] }`.
|
|
47
47
|
- `dontPropagateContextUrls`: A set of URL matchers (string prefix or regex) for which the tracing context should not be propagated (see `propagators`). This allows you to exclude a subset of URLs allowed by the `propagateContextUrls`.
|
|
48
|
+
- `resourceNameTemplate`: A string for the "resource.name" attribute that can include attribute expressions in `{}`. Example: `fetch: { resourceNameTemplate: "{http.host}" }`.
|
|
48
49
|
- `propagators`: A set of propagators that may extend inbound and outbound contexts. By default, `@vercel/otel` configures [W3C Trace Context](https://www.w3.org/TR/trace-context/) propagator.
|
|
49
50
|
- `traceSampler`: The sampler to be used to decide which requests should be traced. By default, all requests are traced. This option can be changed to, for instance, only trace 1% of all requests.
|
|
50
51
|
- `spanProcessors` and `traceExporter`: The export mechanism for traces. By default, `@vercel/otel` configures the best export mechanism for the environment. For instance, if a [tracing integrations](https://vercel.com/docs/observability/otel-overview/quickstart) is configured on Vercel, this integration will be automatically used for export; otherwise an [OTLP exporter](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#otlp-exporter) can be used if configured in environment variables.
|
|
51
52
|
|
|
52
53
|
See API for more details.
|
|
53
54
|
|
|
55
|
+
## 🔗 References
|
|
56
|
+
|
|
57
|
+
- [OpenTelemetry Primer](https://opentelemetry.io/docs/concepts/observability-primer/)
|
|
58
|
+
- [OpenTelemetry Environment Variables](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/)
|
|
59
|
+
- [Next.js OpenTelemetry docs](https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry)
|
|
60
|
+
- [Vercel OpenTelemetry Collector](https://vercel.com/docs/observability/otel-overview/quickstart)
|
|
61
|
+
|
|
54
62
|
## 📄 License
|
|
55
63
|
|
|
56
64
|
[MIT](LICENSE)
|