reads
Generated by the pinned ess generate --kind docs from adapters/loki/spec/ess. Structural validation establishes consistency; behaviour, storage and cross-record predicates remain implementation obligations.
Loki-owned LogQL range, metric and label selections, mandatory selector equalities, and the configured line and trace profiles.
connectors_loki.reads is one of connectors_loki's bounded contexts. Back to the index.
Types
CallIdentifierField
connectors_loki.reads.CallIdentifierField is a record of two fields:
key—connectors_loki.reads.MatchedKeyformat—connectors_loki.reads.LineFormat
CallIdentifierLabel
connectors_loki.reads.CallIdentifierLabel is a record of one field:
label—connectors_loki.reads.LabelName
CallIdentifierSource
connectors_loki.reads.CallIdentifierSource is one of two shapes, told apart by a kind field — tagged, so a decoder never has to guess which branch it is reading:
field—connectors_loki.reads.CallIdentifierFieldlabel—connectors_loki.reads.CallIdentifierLabel
CallTraceSelection
connectors_loki.reads.CallTraceSelection is a record of five fields:
profile—connectors_loki.reads.ProfileNamecall_id—Stringstart_unix_ns—Stringend_unix_ns—Stringlimit—Optional<Integer>, which may be absent
Every value satisfies (call_id.count >= 1 and call_id.count <= 512), (start_unix_ns.count >= 1 and start_unix_ns.count <= 19), (end_unix_ns.count >= 1 and end_unix_ns.count <= 19) and (limit >= 1 and limit <= 1000).
FieldMask
connectors_loki.reads.FieldMask is one of none, redact and last_four.
FieldName
connectors_loki.reads.FieldName wraps String and is not interchangeable with one: the whole value of naming it separately is the crossings the model then refuses. Its characters are drawn from abcdefghijklmnopqrstuvwxyz0123456789_. Every value satisfies (value.count >= 1 and value.count <= 64).
FieldType
connectors_loki.reads.FieldType is one of string, integer, phone_number, unix_seconds, unix_millis and unix_nanos.
LabelMatcher
connectors_loki.reads.LabelMatcher is a record of three fields:
label—connectors_loki.reads.LabelNameoperator—connectors_loki.reads.MatchOperatorvalue—String
Every value satisfies value.count <= 1024.
LabelName
connectors_loki.reads.LabelName wraps String and is not interchangeable with one: the whole value of naming it separately is the crossings the model then refuses. Its characters are drawn from ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_. Every value satisfies (value.count >= 1 and value.count <= 128), not (value starts_with "0"), not (value starts_with "1"), not (value starts_with "2"), not (value starts_with "3"), not (value starts_with "4"), not (value starts_with "5"), not (value starts_with "6"), not (value starts_with "7"), not (value starts_with "8") and not (value starts_with "9").
LabelSelection
connectors_loki.reads.LabelSelection is a record of four fields:
label—Optional<String>, which may be absentstart_unix_ns—Optional<String>, which may be absentend_unix_ns—Optional<String>, which may be absentquery—Optional<String>, which may be absent
Every value satisfies (label.count >= 1 and label.count <= 128) and (query.count >= 1 and query.count <= 16384).
LineFormat
connectors_loki.reads.LineFormat is one of two shapes, told apart by a kind field — tagged, so a decoder never has to guess which branch it is reading:
logfmt— carries nothing; its value is the tag alonepattern—connectors_loki.reads.LinePattern
LinePattern
connectors_loki.reads.LinePattern is a record of one field:
pattern—String
Every value satisfies (pattern.count >= 3 and pattern.count <= 1024) and pattern contains "<".
LineProfile
connectors_loki.reads.LineProfile is a record of five fields:
name—connectors_loki.reads.ProfileNameselector—List<connectors_loki.reads.LabelMatcher>format—connectors_loki.reads.LineFormatfields—List<connectors_loki.reads.ProfileField>call_identifier—connectors_loki.reads.FieldName
Every value satisfies (selector.count >= 1 and selector.count <= 16), (fields.count >= 1 and fields.count <= 64), distinct f in fields by f.name, exists m in selector: ((m.operator == equal and m.value.count >= 1)), exists f in fields: ((f.name == call_identifier and f.type == string and (not (defined(f.mask)) or f.mask == none) and (not (defined(f.optional)) or f.optional == false))) and not (exists f in fields: ((f.filterable == true and exists m in selector: (m.label == f.key)))).
LogDirection
connectors_loki.reads.LogDirection is one of forward and backward.
LogRangeSelection
connectors_loki.reads.LogRangeSelection is a record of seven fields:
query—Stringstart_unix_ns—Stringend_unix_ns—Stringdirection—connectors_loki.reads.LogDirectionpage_limit—Integercollection_limit—Integermax_line_bytes—Integer
Every value satisfies (page_limit >= 1 and page_limit <= 1000), (collection_limit >= 1 and collection_limit <= 1000), (max_line_bytes >= 1 and max_line_bytes <= 8192), (start_unix_ns.count >= 1 and start_unix_ns.count <= 19), (end_unix_ns.count >= 1 and end_unix_ns.count <= 19), (start_unix_ns == 0 or not (start_unix_ns starts_with "0")) and (end_unix_ns == 0 or not (end_unix_ns starts_with "0")).
LogScopeEquality
connectors_loki.reads.LogScopeEquality is a record of two fields:
label—Stringvalue—String
MatchOperator
connectors_loki.reads.MatchOperator is one of equal, not_equal, matches and not_matches.
MatchedKey
connectors_loki.reads.MatchedKey wraps String and is not interchangeable with one: the whole value of naming it separately is the crossings the model then refuses. Its characters are drawn from ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_. Every value satisfies (value.count >= 1 and value.count <= 128), not (value starts_with "__"), not (value starts_with "0"), not (value starts_with "1"), not (value starts_with "2"), not (value starts_with "3"), not (value starts_with "4"), not (value starts_with "5"), not (value starts_with "6"), not (value starts_with "7"), not (value starts_with "8") and not (value starts_with "9").
MetricResultType
connectors_loki.reads.MetricResultType is one of vector, matrix and scalar.
MetricSelection
connectors_loki.reads.MetricSelection is a record of five fields:
query—Stringtime_unix_ns—Optional<String>, which may be absentstart_unix_ns—Optional<String>, which may be absentend_unix_ns—Optional<String>, which may be absentstep_seconds—Optional<Integer>, which may be absent
Every value satisfies (query.count >= 1 and query.count <= 16384) and ((not (defined(start_unix_ns)) and not (defined(end_unix_ns)) and not (defined(step_seconds))) or (not (defined(time_unix_ns)) and defined(start_unix_ns) and defined(end_unix_ns) and defined(step_seconds))).
ProfileField
connectors_loki.reads.ProfileField is a record of six fields:
name—connectors_loki.reads.FieldNamekey—Stringtype—connectors_loki.reads.FieldTypemask—Optional<connectors_loki.reads.FieldMask>, which may be absentoptional—Optional<Boolean>, which may be absentfilterable—Optional<Boolean>, which may be absent
Every value satisfies (key.count >= 1 and key.count <= 128) and (not (defined(mask)) or mask == none or type == string or type == phone_number).
ProfileLinesSelection
connectors_loki.reads.ProfileLinesSelection is a record of five fields:
profile—connectors_loki.reads.ProfileNamestart_unix_ns—Stringend_unix_ns—Stringlimit—Optional<Integer>, which may be absentmatch—Optional<Map<String, String>>, which may be absent
Every value satisfies (start_unix_ns.count >= 1 and start_unix_ns.count <= 19), (end_unix_ns.count >= 1 and end_unix_ns.count <= 19) and (limit >= 1 and limit <= 1000).
ProfileName
connectors_loki.reads.ProfileName wraps String and is not interchangeable with one: the whole value of naming it separately is the crossings the model then refuses. Its characters are drawn from abcdefghijklmnopqrstuvwxyz0123456789_.-. Every value satisfies (value.count >= 1 and value.count <= 64).
ProfileRecord
connectors_loki.reads.ProfileRecord is a record of three fields:
timestamp_unix_ns—Stringcall_id—Stringfields—Map<String, Json>
TraceLine
connectors_loki.reads.TraceLine is a record of four fields:
timestamp_unix_ns—Stringsource—Stringline—Stringline_truncated—Boolean
TraceProfile
connectors_loki.reads.TraceProfile is a record of four fields:
name—connectors_loki.reads.ProfileNameselector—List<connectors_loki.reads.LabelMatcher>call_identifier—connectors_loki.reads.CallIdentifierSourcesource_label—connectors_loki.reads.LabelName
Every value satisfies (selector.count >= 1 and selector.count <= 16) and exists m in selector: ((m.operator == equal and m.value.count >= 1)).
Eight of the types above are reached by nothing else in this system: connectors_loki.reads.CallTraceSelection, connectors_loki.reads.LabelSelection, connectors_loki.reads.LogRangeSelection, connectors_loki.reads.MetricResultType, connectors_loki.reads.MetricSelection, connectors_loki.reads.ProfileLinesSelection, connectors_loki.reads.ProfileRecord and connectors_loki.reads.TraceLine. No entity, view, command, event, error or crossing names them, so it is either vocabulary something outside this specification uses or a leftover — and only a person can tell which.
Generated from connectors_loki v1 · model digest ea710d541a308a38ac6d9d12c83d027f48b1cb1a76188adae267684f3ad4a3a5 · contract digest slice-sha256/2:13ada86acdc2b3f17026e385808c2cb6069ddee44ee64dd6c02c02a50d474412. Do not edit this file; change the specification and regenerate it with ess generate.