otlptcp
is a receiver for opentelemetry-collector-contrib that receives traces, metrics, and logs
via a tcp listener.
Example:
receivers:
otlptcp:
listen_address: 0.0.0.0:14317
exporters:
otlp:
endpoint: otelcol:4317
service:
pipelines:
traces:
receivers: [otlptcp]
exporters: [otlp]
metrics:
receivers: [otlptcp]
exporters: [otlp]
logs:
receivers: [otlptcp]
exporters: [otlp]
Availible configuration options:
listen_address
- listening address in the form of<ip>:port
. default is0.0.0.0:14317
max_message_size
- maximum size of a single message. Default to 1m.listen_network
- listent network. Onlytcp
is supported.
See https://opentelemetry.io/docs/collector/custom-collector/
Each message is prefixed with 5 bytes.
The first byte is an unsigned 8 bit integer that denotes the type of the message. Valid values are:
- 1 - trace request
- 2 - metric request
- 3 - log request
The next 4 bytes should be an unsigned 32 bit integer in big-endian order.
The message is a protocol buffer encoded request of the appropriate message type.