ContextModule
PackageAxial
Builds and scopes ambient telemetry attributes for Axial workflows.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| attribute | Context.attribute key value | Creates an application-defined attribute by pairing a typed key with a value. |
| empty | Context.empty | An empty telemetry context. |
| ofAttributes | Context.ofAttributes attributes | Creates a context from attributes. |
| add | Context.add item (TelemetryContext values) | Adds or replaces one attribute. |
| addMany | Context.addMany attributes context | Adds attributes. |
| tryFind | Context.tryFind key (TelemetryContext values) | Reads a typed attribute from a context. |
| toSeq | Context.toSeq (TelemetryContext values) | Returns the attributes in name order. |
| endUserId | Context.endUserId value | Creates the OpenTelemetry enduser.id span attribute. |
| addEndUserId | Context.addEndUserId value context | Adds the OpenTelemetry enduser.id span attribute to a context. |
| withContext | Context.withContext context flow | Scopes a telemetry context around a workflow. |
| withAttribute | Context.withAttribute item flow | Scopes one telemetry attribute around a workflow. |
| withAttributes | Context.withAttributes attributes flow | Scopes telemetry attributes around a workflow. |
| withEndUserId | Context.withEndUserId value flow | Scopes the OpenTelemetry enduser.id span attribute around a workflow. |
| current | Context.current | Reads the currently scoped telemetry context. |
| withSink | Context.withSink sink flow | No description available. |
| addSink | Context.addSink sink flow | No description available. |
Creates an application-defined attribute by pairing a typed key with a value.
Parameters
| Name | Type | Description |
|---|---|---|
| key | AttributeKey<'value> | |
| value | 'value |
Returns
Attribute
Creates a context from attributes. Later duplicate names replace earlier values.
Parameters
| Name | Type | Description |
|---|---|---|
| attributes | Attribute seq |
Returns
TelemetryContext
Adds or replaces one attribute.
Parameters
| Name | Type | Description |
|---|---|---|
| item | Attribute | |
| TelemetryContext values | TelemetryContext |
Returns
TelemetryContext
Adds attributes. Later duplicate names replace earlier values.
Parameters
| Name | Type | Description |
|---|---|---|
| attributes | Attribute seq | |
| context | TelemetryContext |
Returns
TelemetryContext
Reads a typed attribute from a context.
Parameters
| Name | Type | Description |
|---|---|---|
| key | AttributeKey<'value> | |
| TelemetryContext values | TelemetryContext |
Returns
'value option
Returns the attributes in name order.
Parameters
| Name | Type | Description |
|---|---|---|
| TelemetryContext values | TelemetryContext |
Returns
Attribute seq
Creates the OpenTelemetry
enduser.id span attribute.Parameters
| Name | Type | Description |
|---|---|---|
| value | string |
Returns
Attribute
Adds the OpenTelemetry
enduser.id span attribute to a context.Parameters
| Name | Type | Description |
|---|---|---|
| value | string | |
| context | TelemetryContext |
Returns
TelemetryContext
Scopes a telemetry context around a workflow.
Parameters
| Name | Type | Description |
|---|---|---|
| context | TelemetryContext | |
| flow | Flow<'a, 'b, 'c> |
Returns
Flow<'a, 'b, 'c>
Scopes one telemetry attribute around a workflow.
Parameters
| Name | Type | Description |
|---|---|---|
| item | Attribute | |
| flow | Flow<'a, 'b, 'c> |
Returns
Flow<'a, 'b, 'c>
Scopes telemetry attributes around a workflow.
Parameters
| Name | Type | Description |
|---|---|---|
| attributes | Attribute seq | |
| flow | Flow<'a, 'b, 'c> |
Returns
Flow<'a, 'b, 'c>
Scopes the OpenTelemetry
enduser.id span attribute around a workflow.Parameters
| Name | Type | Description |
|---|---|---|
| value | string | |
| flow | Flow<'a, 'b, 'c> |
Returns
Flow<'a, 'b, 'c>
Reads the currently scoped telemetry context.
Returns
Flow<'env, 'error, TelemetryContext>
Parameters
| Name | Type | Description |
|---|---|---|
| sink | Attribute -> unit | |
| flow | Flow<'env, 'error, 'value> |
Returns
Flow<'env, 'error, 'value>

