OtelModule
PackageAxial.Telemetry.JavaScript
OpenTelemetry JS tracing for Axial workflows compiled with Fable: the JavaScript counterpart of the
.NET package's
Activity.trace, emitting through a host-supplied @opentelemetry/api object.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| installNamed | Otel.installNamed api instrumentationScopeName | Installs a tracer under the supplied instrumentation scope name. |
| install | Otel.install api | Installs a tracer under Axial's default instrumentation scope. |
| installWith | Otel.installWith api tracer | Installs an explicit tracer, for a custom instrumentation scope name. |
| uninstall | Otel.uninstall () | Removes the installed tracer; subsequent traced flows run untraced. |
| traceWith | Otel.traceWith renderError name sourceFlow | JavaScript-only: on .NET this returns the flow unchanged. |
| trace | Otel.trace name sourceFlow | Wraps a flow in a new OpenTelemetry span covering the workflow's execution. |
Installs a tracer under the supplied instrumentation scope name. Use the application's scope name for spans
that describe application behavior. Call once at the application edge, after the OpenTelemetry JS SDK and its
context manager are registered. JavaScript targets only.
Parameters
| Name | Type | Description |
|---|---|---|
| api | OpenTelemetryApi | The @opentelemetry/api module object. |
| instrumentationScopeName | string | The application instrumentation scope name. |
Returns
unit
Installs a tracer under Axial's default instrumentation scope. Prefer
installNamed when traced flows
represent application behavior.
Parameters
| Name | Type | Description |
|---|---|---|
| api | OpenTelemetryApi | The @opentelemetry/api module object. |
Returns
unit
Installs an explicit tracer, for a custom instrumentation scope name. JavaScript targets only.
Parameters
| Name | Type | Description |
|---|---|---|
| api | OpenTelemetryApi | The @opentelemetry/api module object. |
| tracer | Tracer | The tracer to emit spans through. |
Returns
unit
Removes the installed tracer; subsequent traced flows run untraced.
Parameters
| Name | Type | Description |
|---|---|---|
| unit |
Returns
unit
JavaScript-only: on .NET this returns the flow unchanged. Use
Activity.traceWith from
Axial.Telemetry on .NET targets.
Parameters
| Name | Type | Description |
|---|---|---|
| renderError | 'error -> string | |
| name | string | |
| sourceFlow | Flow<'env, 'error, 'value> |
Returns
Flow<'env, 'error, 'value>
Wraps a flow in a new OpenTelemetry span covering the workflow's execution. Typed errors are
rendered with
string; see traceWith for a custom renderer. JavaScript targets only.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The span name. |
| sourceFlow | Flow<'env, 'error, 'value> | The flow to trace. |
Returns
Flow<'env, 'error, 'value>

