OtlpHttpProtocol enum

Wire-format protocol for OTLP/HTTP exporters.

The OpenTelemetry specification defines two HTTP encodings:

  • application/x-protobuf — protobuf-encoded OTLP messages. The spec-recommended default; smaller payloads, faster to encode.
  • application/json — JSON-encoded OTLP messages using the protobuf-to-JSON mapping (proto3 JSON). Optional per spec — SDKs MAY support it — but supported by Dartastic for parity with the JS/Python implementations and for backends that prefer JSON for human-readable telemetry (e.g. local dev UIs, Browser DevTools).

See specification/protocol/exporter.md for the full conformance rules; the env-var OTEL_EXPORTER_OTLP_PROTOCOL (and signal-specific _TRACES_PROTOCOL / _METRICS_PROTOCOL / _LOGS_PROTOCOL variants) selects this from configuration with values http/protobuf or http/json. OtlpHttpProtocol.httpProtobuf is the default.

Inheritance
Available extensions

Values

httpProtobuf → const OtlpHttpProtocol

application/x-protobuf — protobuf-encoded OTLP messages.

httpJson → const OtlpHttpProtocol

application/json — proto3-JSON-encoded OTLP messages.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<OtlpHttpProtocol>
A constant List of the values in this enum, in order of their declaration.