mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-11-03 02:20:04 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers; omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
This exporter has been taken from opentelemetry-collector-contrib [https://github.com/open-telemetry/opentelemetry-collector-contrib]
The receiver was imported at v0.79.0 [https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.79.0]
Hanzo O11y Kafka Receiver
| Status | |
|---|---|
| Stability | beta: metrics, logs, traces |
| Distributions | [] |
| Issues | |
| Code coverage |
Kafka receiver receives traces, metrics, and logs from Kafka. Message payload encoding is configurable.
Note that metrics and logs only support OTLP.
Getting Started
The following settings are required:
protocol_version(no default): Kafka protocol version e.g. 2.0.0
The following settings can be optionally configured:
brokers(default = localhost:9092): The list of kafka brokerstopic(default = otlp_spans): The name of the kafka topic to read fromencoding(default = otlp_proto): The encoding of the payload received from kafka. Available encodings:otlp_proto: the payload is deserialized toExportTraceServiceRequest,ExportLogsServiceRequestorExportMetricsServiceRequestrespectively.jaeger_proto: the payload is deserialized to a single Jaeger protoSpan.jaeger_json: the payload is deserialized to a single Jaeger JSON Span usingjsonpb.zipkin_proto: the payload is deserialized into a list of Zipkin proto spans.zipkin_json: the payload is deserialized into a list of Zipkin V2 JSON spans.zipkin_thrift: the payload is deserialized into a list of Zipkin Thrift spans.raw: (logs only) the payload's bytes are inserted as the body of a log record.text: (logs only) the payload are decoded as text and inserted as the body of a log record. By default, it uses UTF-8 to decode. You can usetext_<ENCODING>, liketext_utf-8,text_shift_jis, etc., to customize this behavior.
group_id(default = otel-collector): The consumer group that receiver will be consuming messages fromclient_id(default = otel-collector): The consumer client ID that receiver will useinitial_offset(default = latest): The initial offset to use if no offset was previously committed. Must belatestorearliest.authplain_textusername: The username to use.password: The password to use
tlsca_file: path to the CA cert. For a client this verifies the server certificate. Should only be used ifinsecureis set to true.cert_file: path to the TLS cert to use for TLS required connections. Should only be used ifinsecureis set to true.key_file: path to the TLS key to use for TLS required connections. Should only be used ifinsecureis set to true.insecure(default = false): Disable verifying the server's certificate chain and host name (InsecureSkipVerifyin the tls config)server_name_override: ServerName indicates the name of the server requested by the client in order to support virtual hosting.
kerberosservice_name: Kerberos service namerealm: Kerberos realmuse_keytab: Use of keytab instead of password, if this is true, keytab file will be used instead of passwordusername: The Kerberos username used for authenticate with KDCpassword: The Kerberos password used for authenticate with KDCconfig_file: Path to Kerberos configuration. i.e /etc/krb5.confkeytab_file: Path to keytab file. i.e /etc/security/kafka.keytab
metadatafull(default = true): Whether to maintain a full set of metadata. When disabled the client does not make the initial request to broker at the startup.retrymax(default = 3): The number of retries to get metadatabackoff(default = 250ms): How long to wait between metadata retries
autocommitenable: (default = true) Whether or not to auto-commit updated offsets back to the brokerinterval: (default = 1s) How frequently to commit updated offsets. Ineffective unless auto-commit is enabled
message_marking:after: (default = false) If true, the messages are marked after the pipeline executionon_error: (default = false) If false, only the successfully processed messages are marked Note: this can block the entire partition in case a message processing returns a permanent error
Example:
receivers:
kafka:
protocol_version: 2.0.0