Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ import org.dexpace.sdk.core.instrumentation.InstrumentationContext
*
* As the terminal link this is the context whose [close] should be called to evict the
* chain's [ContextStore] entry. In the normal flow the [callKey] is supplied by
* [RequestContext.toExchangeContext]. When this context is constructed directly off-chain, the
* [callKey] defaults to a freshly minted, call-unique key (`traceId:spanId:n`) — the same
* collision-safe derivation [DispatchContext] uses — so two directly-constructed contexts that
* share a trace/span id never collide in [ContextStore]. Two such default-constructed instances
* are therefore not structurally equal; pin an explicit [callKey] if you need equality.
* [RequestContext.toExchangeContext]. When this context is constructed directly off-chain it
* defaults to a freshly minted, call-unique key (`traceId:spanId:n`) via
* [DispatchContext.mintCallKey] — see [DispatchContext] for why the trace/span pair alone is not
* a collision-safe store key. One consequence of the minted default: two default-constructed
* instances are not structurally equal, since each mints a distinct key — pin an explicit
* [callKey] if you need equality.
*/
public data class ExchangeContext(
override val instrumentationContext: InstrumentationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import org.dexpace.sdk.core.instrumentation.InstrumentationContext
* [DispatchContext] it was promoted from.
*
* In the normal flow the [callKey] is supplied by [DispatchContext.toRequestContext] so the
* whole chain shares one store slot. When this context is constructed directly off-chain, the
* [callKey] defaults to a freshly minted, call-unique key (`traceId:spanId:n`) — the same
* collision-safe derivation [DispatchContext] uses — so two directly-constructed contexts that
* share a trace/span id never collide in [ContextStore]. Two such default-constructed instances
* are therefore not structurally equal; pin an explicit [callKey] if you need equality.
* whole chain shares one store slot. When this context is constructed directly off-chain it
* defaults to a freshly minted, call-unique key (`traceId:spanId:n`) via
* [DispatchContext.mintCallKey] — see [DispatchContext] for why the trace/span pair alone is not
* a collision-safe store key. One consequence of the minted default: two default-constructed
* instances are not structurally equal, since each mints a distinct key — pin an explicit
* [callKey] if you need equality.
*/
public data class RequestContext(
override val instrumentationContext: InstrumentationContext,
Expand Down
Loading