bend-trace-context
Search uses release 0.2.0.0 · 472 definitions
Definitions (472)
- def Scan.withinRead the fields only when they fit the budget.
- def TraceState.parse_fieldsParse repeated tracestate field values, in arrival order, as their comma-joined combination (W3C 3.3.2).
- def TraceState.parseParse one combined tracestate value; see TraceState.parse_fields.
- def StateError.showThe name of a tracestate error; InvalidEntry adds the member number and the reason.
- def Entries.unless`item` followed by `rest`, unless `skip` is True: one step of a filter.
- def Entries.withoutThe entries without the one whose key is `key`, in order.
- def TraceState.from_entries.checkedThe state of these entries when the check finds them valid, `fallback` otherwise.
- def TraceState.from_entriesThe state of `entries`, checked, or `fallback` if the check fails.
- def TraceState.setAdd or update the entry of `key` (W3C 3.5): it goes to the front with `value`, and the other entries follow in their order.
- def TraceState.removeDelete the entry of `key`, if there is one; the other entries keep their order (W3C 3.5; laws remove_entries and remove_get).
- def StateEntry.sizeThe octets of `key=value` (law entry_size).
- def Entries.size.restThe octets of each entry after the first, with its comma.
- def Entries.sizeThe octets of the entries joined by commas, as Entries.format writes them.
- def TraceState.sizeThe octets of TraceState.format(state) (law state_size).
- type TruncationWhat truncation to the output budget kept, and the keys of the entries it dropped, in their original order.
- def Truncation.keptThe state that fits the output budget.
- def Truncation.droppedThe keys of the entries removed, in their original order; none when the state already fitted.
- def StateEntry.is_largeWhether the entry is larger than 128 octets.
- def Entries.has_largeWhether one of the entries is larger than 128 octets.
- def Entries.drop_last_largeThe entries without the rightmost one larger than 128 octets: an entry stays when a large entry follows it.
- def Entries.drop_lastThe entries without the rightmost one.
- def Entries.shrinkOne removal step (spec #1): the rightmost entry larger than 128 octets, or the rightmost entry when none is.
- def Entries.truncateRemove entries one step at a time while they take more than `budget` octets, and stop as soon as they fit.
- def Entries.droppedThe keys of the entries that `kept` lacks, in order.
- def TraceState.truncateFit a state to the output budget of `limits` by removing whole entries (W3C 3.3.3.1, spec #1): while the value is over the budget, remove the rightmost entry larger than 128 octets, or the rightmost entry when none is, and stop as soon as it fits.
- type OutgoingContextA local context and the state sent with it.
- type EmissionThe two header values an outgoing context emits, and the keys of the entries that truncation to the output budget dropped, in their original order.
- def OutgoingContext.newAn outgoing context with no state yet, as for a new root.
- def OutgoingContext.with_stateAn outgoing context that sends `state`, such as the state received with the parent of a child operation.
- def OutgoingContext.contextThe local operation.
- def OutgoingContext.stateThe state sent with the operation.
- def OutgoingContext.getThe value of the entry with this key, if there is one.
- def OutgoingContext.setAdd or update an entry (see TraceState.set); the context is unchanged (law outgoing_set).
- def OutgoingContext.removeDelete an entry (see TraceState.remove); the context is unchanged (law outgoing_remove).
- def Emission.ofThe emission of a context and a truncated state.
- def OutgoingContext.emitThe traceparent and tracestate values to send: the participating traceparent of the context, and the normalized value of the state truncated to the output budget of `limits` (laws emit_traceparent, emit_tracestate, emit_fits and emit_accepted).
- def Emission.traceparentThe traceparent value: always 55 characters.
- def Emission.tracestateThe tracestate value: at most the output budget in octets, "" for no state.
- def Emission.droppedThe keys of the entries truncation dropped, in their original order.
- type HeaderOne field of a message: its name and its value.
- type TraceParentErrorWhy extraction refused a message's traceparent: RepeatedTraceParent{} the message has more than one traceparent field, or a value that joins several with a comma TraceParentTooLarge{} the value exceeds the traceparent input budget InvalidTraceParent{error} the value breaks the rules of its version; `error` is the first problem, as the codec reports it, with offsets counted from the first character after optional whitespace The received value itself is never included.
- type ReceivedPairThe original fields of an accepted message: its traceparent value, without the optional whitespace around it, and its tracestate field values as they came, in arrival order, none when it had no tracestate field.
- type IncomingContextThe sender's operation together with the tracestate that goes with it: one extracted from a message, which also keeps the received pair when the whole pair was accepted, or one built from its parts (IncomingContext.from_remote), which keeps none.
- type BaseContextThe context to continue from that extraction keeps when a message carries no usable traceparent: a context received earlier, or an operation of this participant with the state it sends.
- type TraceParentOutcomeWhat extraction found in the traceparent fields of a message: an accepted value, no field, or a refusal with its reason.
- type StateOutcomeWhat extraction did with the tracestate fields of a message: StateAbsent{} there was no tracestate field StateAccepted{} the fields were read into the incoming state, which may be empty StateDiscarded{error} the fields were refused as a whole; the incoming context has no state and the traceparent stays accepted StateIgnored{} the fields were not read, because the message has no accepted traceparent (W3C 3.3)
- type ExtractionThe result of extracting a message: the context to continue from, if any, and what happened to each field.
- def Header.nameThe field's name.
- def Header.valueThe field's value.
- def Carrier.traceparent_nameThe names of the two context fields, in lowercase (W3C 3.2.1 and 3.3.1), written in this one place: extraction selects the fields by them, whatever the case of the names received; cleanup, injection and forwarding remove and write the fields under them; and Context.field_names publishes them.
- def Carrier.tracestate_name
- def Carrier.namedWhether `text` is `name` without regard to ASCII case (W3C 3.2.1 and 3.3.1): each character of `text`, with the letters A to Z lowered, is the character of `name` at its position.
- def Carrier.keep`value` before `found` when `hit` is True: one step of Carrier.values.
- def Carrier.values.goThe values of the fields named `name`, most recent first, before `found`.
- def Carrier.valuesThe values of the fields named `name` without regard to ASCII case, in their order: the loop collects them most recent first, and reversing, also a loop, puts them back in order.
- def Text.drop_ows.go`head` followed by `tail`, without the optional whitespace at its start: `ows` says whether `head` is optional whitespace.
- def Text.drop_owsThe text without the optional whitespace, spaces and horizontal tabs, at its start.
- def Text.trim_owsThe text without the optional whitespace at its start and at its end (RFC 9110, section 5.5: "A field value does not include leading or trailing whitespace").
- def Text.has_comma.goWhether the text contains a comma: `found` records whether one was seen before.
- def Text.has_commaWhether the text contains a comma.
- def Text.is_controlWhether a character is a control character other than a horizontal tab: U+0000 to U+0008, U+000A to U+001F or U+007F.
- def Text.control.goThe offset of the first control character of `text`, counted from `offset`, unless `found` already holds one.
- def Read.is_laterWhether a value's version, from its two digits, is later than 00 and so read by its known prefix (W3C 3.2.2.1 and 3.2.4): Done{False{}} for 00, which the strict codec reads, Done{True{}} for 01 to fe, and a refusal for ff.
- def Read.is_later.parsedWhether the version whose two digits were read is later than 00.
- def Read.cleanThe fields a later version does not know, once searched for a control character: none, or the offset of the first.
- def Read.extensionWhat may follow the flags of a later version: the end of the value, or a dash that starts fields this version does not know.
- def Read.prefixA later version is read by its known prefix (W3C 3.2.4 and 4.1.2): its first 55 characters are read as version 00, which checks the trace ID, the parent ID, the flags and the dashes between them at their own offsets, and then the value must end or continue with a dash.
- def Read.by_versionRead a value by the rules of its version: `later` is False for 00.
- def Read.knownThe known fields of a value, read by the rules of its version.
- def Read.invalidA refusal of the codec, as a refused traceparent.
- def Read.singleA value that joins several with a comma is refused as repeated fields; any other value is read by the rules of its version.
- def Read.trimmedA value without the whitespace around it, refused when it joins several.
- def Read.withinA value within its budget is read without the optional whitespace around it; a value over the budget is refused without being read further.
- def TraceParent.readRead one received traceparent value by the rules of a participant, and return its known fields as a v00 value, flag byte included: - a value over the traceparent input budget of `limits`, counted in UTF-8 octets with its whitespace, is refused with TraceParentTooLarge; - optional whitespace around the value is removed (RFC 9110, section 5.5); - a value with a comma joins repeated fields and is refused with RepeatedTraceParent, even when the comma is in fields of a later version: no version defines a comma, and a host that joins repeated fields separates them with one (RFC 9110, section 5.3); - version 00 is read exactly by TraceParentV00.parse: 55 characters and nothing after them; - version ff is refused with ForbiddenVersion (W3C 3.2.2.1); - versions 01 to fe are read by their known prefix: the fields of version 00, followed by the end of the value or by a dash and fields that are not read, whatever they hold other than a comma or a control character, which is refused with ControlCharacter (W3C 3.2.4 and 4.1.2; RFC 9110, section 5.5).
- def Extract.ignoredThe state outcome when the tracestate fields are not read: absent without a field, ignored with one (W3C 3.3).
- def Extract.keptThe extraction of a message whose context is not read: the base is kept, with the traceparent outcome and the presence of tracestate fields.
- def Extract.incomingThe incoming context of an accepted message, as the context to continue from.
- def Extract.parsedAn accepted message whose tracestate fields were parsed: an accepted state keeps the pair, which can be forwarded, and a refused one is discarded whole, keeping the traceparent (spec #1) but no pair, since the pair was not accepted whole.
- def Extract.stateAn accepted message with its tracestate field values, read in arrival order as their comma-joined combination (W3C 3.3.2).
- def Extract.readThe extraction of a message whose only traceparent value `value` was read.
- def Extract.parentsThe extraction of a message with these traceparent and tracestate field values.
- def Context.extractExtract the trace context of a received message from its carrier, with `base` as the context to keep when the message has no usable traceparent (spec #1, user stories 14, 15, 16, 24 and 25): - no traceparent field keeps the base, TraceParentAbsent{}; - more than one traceparent field, whatever the case of their names, is refused, and so is a single value that TraceParent.read refuses; the base is kept, TraceParentRejected{error}; - an accepted value gives the incoming context and replaces the base: its tracestate fields, whatever the case of their names, are read in arrival order as their comma-joined combination, within the tracestate input budget; refused fields are discarded whole, keeping the traceparent; - without an accepted traceparent, tracestate fields are not read.
- def Extraction.contextThe context to continue from: this message's incoming context when its traceparent was accepted, the base otherwise.
- def Extraction.parentWhat extraction found in the traceparent fields.
- def Extraction.stateWhat extraction did with the tracestate fields.
- def Extraction.incoming.baseThe incoming context an accepted message gives as its context.
- def Extraction.incoming.ofThis message's own context: the incoming context when its traceparent was accepted, None{} when extraction kept the base.
- def Extraction.incomingThe context this message carried, when its traceparent was accepted; None{} when extraction kept the base, even an incoming one.
- def IncomingContext.contextThe sender's operation.
- def IncomingContext.stateThe state received with it: empty when the message had none or when it was discarded.
- def IncomingContext.receivedThe received pair, when the whole pair was accepted: None{} when the tracestate was discarded, and for a context built from parts.
- def IncomingContext.parentThe received context as the parent of a child operation.
- def IncomingContext.from_remoteAn incoming context from its parts: a remote context and the tracestate that goes with it, so that an OpenTelemetry SDK's remote span contexts have one shape whatever format they came from.
- def ReceivedPair.traceparentThe received traceparent value, without the whitespace around it.
- def ReceivedPair.tracestateThe received tracestate field values, in arrival order.
- def BaseContext.parentThe base as the parent of a child operation: a received context or an operation of this participant.
- def BaseContext.stateThe state that goes with the base: the state received with an incoming context, or the state an outgoing context sends.
- def TraceParentError.showThe name of a traceparent error; InvalidTraceParent adds the codec's error.
- def TraceParentOutcome.showThe name of a traceparent outcome; a rejection adds its error.
- def StateOutcome.showThe name of a tracestate outcome; a discard adds its error.