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