Pure: the built-in otel capability and the OTLP environment a consumer is given so its telemetry is correlated by run id (and test id).
Services integrate through the OpenTelemetry protocol only: the standard OTEL_* environment variables every OTel SDK and Beyla read. No hive code ships into a service.
OTEL_RESOURCE_ATTRIBUTES is k1=v1,k2=v2 as the OTel SDK environment spec
prescribes: keys are W3C baggage tokens and are written as they are (an SDK
never decodes a key), values are percent-encoded, so a value holding ,
= % or a space survives the trip.
The otel instance joins every consumer's view network hive-<run>-<consumer>
under its service name otel (hc-5 :wiring/attach), so the container-side
endpoint is http://otel:4317; a host process reaches the published port
on localhost.
Pure: the built-in otel capability and the OTLP environment a consumer is given so its telemetry is correlated by run id (and test id). Services integrate through the OpenTelemetry protocol only: the standard OTEL_* environment variables every OTel SDK and Beyla read. No hive code ships into a service. OTEL_RESOURCE_ATTRIBUTES is `k1=v1,k2=v2` as the OTel SDK environment spec prescribes: keys are W3C baggage tokens and are written as they are (an SDK never decodes a key), values are percent-encoded, so a value holding `,` `=` `%` or a space survives the trip. The otel instance joins every consumer's view network `hive-<run>-<consumer>` under its service name `otel` (hc-5 :wiring/attach), so the container-side endpoint is `http://otel:4317`; a host process reaches the published port on localhost.
The grafana/beyla tag of the fragment's optional beyla service.
The grafana/beyla tag of the fragment's optional `beyla` service.
Classpath resource of the compose fragment running the otel provider.
Classpath resource of the compose fragment running the otel provider.
(correlation-attribute? k)True for the resource attributes hive-compose correlates a run by, the
hive.* keys (hive.run.id, hive.test.id): an injected value always wins
for them, a run's telemetry must carry its own run id.
True for the resource attributes hive-compose correlates a run by, the `hive.*` keys (hive.run.id, hive.test.id): an injected value always wins for them, a run's telemetry must carry its own run id.
(endpoint side protocol)The OTLP endpoint of the otel instance for protocol (:grpc or :http) seen
from side: :container (the consumer's view network, alias otel) or
:host (the published port on localhost).
The OTLP endpoint of the otel instance for `protocol` (:grpc or :http) seen from `side`: :container (the consumer's view network, alias `otel`) or :host (the published port on localhost).
Endpoint and protocol are one unit: an endpoint means nothing without the protocol it speaks.
Endpoint and protocol are one unit: an endpoint means nothing without the protocol it speaks.
The grafana/otel-lgtm tag resources/hive-compose/otel/compose.yml pins.
The grafana/otel-lgtm tag resources/hive-compose/otel/compose.yml pins.
(merge-resource-attributes base over)OTEL_RESOURCE_ATTRIBUTES of base with over merged in per key (both
strings, nil for none): over wins for every key it sets, a key keeps
the position it first had, new keys follow in over's order, a later
duplicate wins. Entries are moved verbatim, never re-encoded, so a user's
attributes survive byte for byte and nothing throws. Malformed entries
(no =, empty key) are dropped, as SDKs drop them.
The hc-5 layering forces the correlation keys with it: (merge-resource-attributes consumer-ra (render-resource-attributes (select-keys injected-attrs (filter correlation-attribute? ...)))).
OTEL_RESOURCE_ATTRIBUTES of `base` with `over` merged in per key (both strings, nil for none): `over` wins for every key it sets, a key keeps the position it first had, new keys follow in `over`'s order, a later duplicate wins. Entries are moved verbatim, never re-encoded, so a user's attributes survive byte for byte and nothing throws. Malformed entries (no `=`, empty key) are dropped, as SDKs drop them. The hc-5 layering forces the correlation keys with it: (merge-resource-attributes consumer-ra (render-resource-attributes (select-keys injected-attrs (filter correlation-attribute? ...)))).
(otlp-env {:keys [run-id service protocol side] :as opts})The OTLP environment variables for one consumer.
opts: :run-id and :service (OTEL_SERVICE_NAME) required, optional
:test-id, :protocol (:grpc, default, or :http), :side (:container,
default, or :host) or an explicit :endpoint, and :extra-attrs {key value}.
Throws ex-info on a blank run id or service or an unknown protocol.
The OTLP environment variables for one consumer.
`opts`: :run-id and :service (OTEL_SERVICE_NAME) required, optional
:test-id, :protocol (:grpc, default, or :http), :side (:container,
default, or :host) or an explicit :endpoint, and :extra-attrs {key value}.
Throws ex-info on a blank run id or service or an unknown protocol.(otlp-pair-broken? env)True when env names exactly one of endpoint and protocol.
True when `env` names exactly one of endpoint and protocol.
(otlp-pair-merge base over)over merged onto base per key, with endpoint and protocol as one unit:
when over names either, both of base's are dropped first, so an
endpoint never ends up beside a protocol it does not speak. The env
layering itself (injected < consumer < forced) is hc-5 wiring's; this is
the rule it applies at each layer.
`over` merged onto `base` per key, with endpoint and protocol as one unit: when `over` names either, both of `base`'s are dropped first, so an endpoint never ends up beside a protocol it does not speak. The env layering itself (injected < consumer < forced) is hc-5 wiring's; this is the rule it applies at each layer.
(parse-resource-attributes s){key value} of an OTEL_RESOURCE_ATTRIBUTES string; inverse of
render-resource-attributes. Entries are trimmed; an entry without =
or with an empty key is dropped (as OTel SDKs discard it); values are
percent-decoded; a later duplicate key wins.
{key value} of an OTEL_RESOURCE_ATTRIBUTES string; inverse of
`render-resource-attributes`. Entries are trimmed; an entry without `=`
or with an empty key is dropped (as OTel SDKs discard it); values are
percent-decoded; a later duplicate key wins.(percent-decode s)Inverse of percent-encode. Runs of %XX escapes are decoded as UTF-8;
every other character (astral ones included) is copied as it is; a %
not followed by two hex digits stays literal; + is a plus.
Inverse of `percent-encode`. Runs of `%XX` escapes are decoded as UTF-8; every other character (astral ones included) is copied as it is; a `%` not followed by two hex digits stays literal; `+` is a plus.
(percent-encode s)s with every UTF-8 byte outside the RFC 3986 unreserved set as %XX
(upper-case hex): a superset of what W3C baggage requires of a value, and
deterministic. , = % and whitespace never survive raw.
`s` with every UTF-8 byte outside the RFC 3986 unreserved set as `%XX` (upper-case hex): a superset of what W3C baggage requires of a value, and deterministic. `,` `=` `%` and whitespace never survive raw.
Container ports of the otel-lgtm image, by role.
Container ports of the otel-lgtm image, by role.
OTEL_EXPORTER_OTLP_PROTOCOL by protocol keyword.
OTEL_EXPORTER_OTLP_PROTOCOL by protocol keyword.
The built-in otel capability: grafana/otel-lgtm as service otel.
The built-in otel capability: grafana/otel-lgtm as service `otel`.
(render-resource-attributes attrs)OTEL_RESOURCE_ATTRIBUTES of attrs {key value}: keys raw, values
percent-encoded, hive.run.id / service.name / hive.test.id first and the
rest in key order. Throws ex-info naming the keys that are not
valid-key?.
OTEL_RESOURCE_ATTRIBUTES of `attrs` {key value}: keys raw, values
percent-encoded, hive.run.id / service.name / hive.test.id first and the
rest in key order. Throws ex-info naming the keys that are not
`valid-key?`.(resource-attributes {:keys [run-id service test-id extra-attrs]}){key value}: hive.run.id, service.name, hive.test.id (when given) and
extra-attrs; an extra key never overrides those three. Throws ex-info
when two extra keys name the same attribute once normalised.
{key value}: hive.run.id, service.name, hive.test.id (when given) and
`extra-attrs`; an extra key never overrides those three. Throws ex-info
when two extra keys name the same attribute once normalised.The compose service answering the otel capability, and the alias it joins consumer view networks under.
The compose service answering the otel capability, and the alias it joins consumer view networks under.
(valid-key? k)True when k can be an OTEL_RESOURCE_ATTRIBUTES key: a non-empty W3C
baggage token (RFC 7230 tchar) without %, which a parser would read as
an escape.
True when `k` can be an OTEL_RESOURCE_ATTRIBUTES key: a non-empty W3C baggage token (RFC 7230 tchar) without `%`, which a parser would read as an escape.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |