Annotate every log line with a node log key value under annotation key LogAnnotationKeys.node.
Applied by node durable tails (Node.logs / Hyperlink.store(Node) in resource-web/server.ts).
export const const withNodeLogAnnotations: <A, E, R>(
node: string,
effect: Effect.Effect<A, E, R>
) => Effect.Effect<A, E, R>
Annotate every log line with a node log key value under annotation key
LogAnnotationKeys.node
.
Applied by node durable tails (Node.logs / Hyperlink.store(Node) in resource-web/server.ts).
withNodeLogAnnotations = <function (type parameter) A in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>A, function (type parameter) E in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>E, function (type parameter) R in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>R>(
node: string
- Node log key value (
Node.Tag.key).
node: string,
effect: Effect.Effect<A, E, R>(parameter) effect: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
effect: import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<function (type parameter) A in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>A, function (type parameter) E in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>E, function (type parameter) R in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>R>,
): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<function (type parameter) A in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>A, function (type parameter) E in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>E, function (type parameter) R in <A, E, R>(node: string, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>R> =>
import EffectEffect.const annotateLogs: <A, E, R>(effect: Effect.Effect<A, E, R>, values: Record<string, unknown>) => Effect.Effect<A, E, R> (+3 overloads)annotateLogs(effect: Effect.Effect<A, E, R>(parameter) effect: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
effect, { [const LogAnnotationKeys: {
readonly node: "node"
readonly lineage: "hyperlink-ts/lineage"
readonly lineId: "hyperlink-ts/lineId"
}
Standard annotation key names on
LogEntry.annotations
.
| Property | Annotation key (field name) | Value is |
|----------|----------------------------|----------|
| node | "node" | node log key (Node.Tag.key) |
| lineage | "hyperlink-ts/lineage" | JSON array of lineage segment keys |
| lineId | "hyperlink-ts/lineId" | Stable id for one published relay line (memo / dedupe) |
Package: hyperlink-ts/LogContext · Source: src/LogContext.ts · See docs/LOGS.md.
LogAnnotationKeys.node: "node"Annotation key whose value is the node log key.
node]: node: string
- Node log key value (
Node.Tag.key).
node });