Chapter 2. Receivers
Receivers get data into the Collector. A receiver can be push or pull based. Generally, a receiver accepts data in a specified format, translates it into the internal format, and passes it to processors and exporters defined in the applicable pipelines. By default, no receivers are configured. One or more receivers must be configured. Receivers support one or more data sources.
Currently, the following General Availability and Technology Preview receivers are available for the Red Hat build of OpenTelemetry:
2.1. OTLP Receiver Copy linkLink copied to clipboard!
The OTLP Receiver ingests traces, metrics, and logs by using the OpenTelemetry Protocol (OTLP).
OpenTelemetry Collector custom resource with an enabled OTLP Receiver
- 1
- The OTLP gRPC endpoint. If omitted, the default
0.0.0.0:4317is used. - 2
- The server-side TLS configuration. Defines paths to TLS certificates. If omitted, the TLS is disabled.
- 3
- The path to the TLS certificate at which the server verifies a client certificate. This sets the value of
ClientCAsandClientAuthtoRequireAndVerifyClientCertin theTLSConfig. For more information, see theConfigof the Golang TLS package. - 4
- Specifies the time interval at which the certificate is reloaded. If the value is not set, the certificate is never reloaded. The
reload_intervalfield accepts a string containing valid units of time such asns,us,ms,s,m,h. - 5
- The OTLP HTTP endpoint. The default value is
0.0.0.0:4318. - 6
- The server-side TLS configuration. For more information, see the
grpcprotocol configuration section.
2.2. Jaeger Receiver Copy linkLink copied to clipboard!
The Jaeger Receiver ingests traces in the Jaeger formats.
OpenTelemetry Collector custom resource with an enabled Jaeger Receiver
- 1
- The Jaeger gRPC endpoint. If omitted, the default
0.0.0.0:14250is used. - 2
- The Jaeger Thrift HTTP endpoint. If omitted, the default
0.0.0.0:14268is used. - 3
- The Jaeger Thrift Compact endpoint. If omitted, the default
0.0.0.0:6831is used. - 4
- The Jaeger Thrift Binary endpoint. If omitted, the default
0.0.0.0:6832is used. - 5
- The server-side TLS configuration. See the OTLP Receiver configuration section for more details.
2.3. Host Metrics Receiver Copy linkLink copied to clipboard!
The Host Metrics Receiver ingests metrics in the OTLP format.
OpenTelemetry Collector custom resource with an enabled Host Metrics Receiver
- 1
- Sets the time interval for host metrics collection. If omitted, the default value is
1m. - 2
- Sets the initial time delay for host metrics collection. If omitted, the default value is
1s. - 3
- Configures the
root_pathso that the Host Metrics Receiver knows where the root filesystem is. If running multiple instances of the Host Metrics Receiver, set the sameroot_pathvalue for each instance. - 4
- Lists the enabled host metrics scrapers. Available scrapers are
cpu,disk,load,filesystem,memory,network,paging,processes, andprocess.
2.4. Kubernetes Objects Receiver Copy linkLink copied to clipboard!
The Kubernetes Objects Receiver pulls or watches objects to be collected from the Kubernetes API server. This receiver watches primarily Kubernetes events, but it can collect any type of Kubernetes objects. This receiver gathers telemetry for the cluster as a whole, so only one instance of this receiver suffices for collecting all the data.
The Kubernetes Objects Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with an enabled Kubernetes Objects Receiver
- 1
- The Resource name that this receiver observes: for example,
pods,deployments, orevents. - 2
- The observation mode that this receiver uses:
pullorwatch. - 3
- Only applicable to the pull mode. The request interval for pulling an object. If omitted, the default value is
1h. - 4
- The label selector to define targets.
- 5
- The field selector to filter targets.
- 6
- The list of namespaces to collect events from. If omitted, the default value is
all.
2.5. Kubelet Stats Receiver Copy linkLink copied to clipboard!
The Kubelet Stats Receiver extracts metrics related to nodes, pods, containers, and volumes from the kubelet’s API server. These metrics are then channeled through the metrics-processing pipeline for additional analysis.
OpenTelemetry Collector custom resource with an enabled Kubelet Stats Receiver
- 1
- Sets the
K8S_NODE_NAMEto authenticate to the API.
The Kubelet Stats Receiver requires additional permissions for the service account used for running the OpenTelemetry Collector.
Permissions required by the service account
- 1
- The permissions required when using the
extra_metadata_labelsorrequest_utilizationorlimit_utilizationmetrics.
2.6. Prometheus Receiver Copy linkLink copied to clipboard!
The Prometheus Receiver scrapes the metrics endpoints.
OpenTelemetry Collector custom resource with an enabled Prometheus Receiver
- 1
- Scrapes configurations using the Prometheus format.
- 2
- The Prometheus job name.
- 3
- The interval for scraping the metrics data. Accepts time units. The default value is
1m. - 4
- The targets at which the metrics are exposed. This example scrapes the metrics from a
my-appapplication in theexampleproject.
2.7. OTLP JSON File Receiver Copy linkLink copied to clipboard!
The OTLP JSON File Receiver extracts pipeline information from files containing data in the ProtoJSON format and conforming to the OpenTelemetry Protocol specification. The receiver watches a specified directory for changes such as created or modified files to process.
The OTLP JSON File Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with the enabled OTLP JSON File Receiver
2.8. Zipkin Receiver Copy linkLink copied to clipboard!
The Zipkin Receiver ingests traces in the Zipkin v1 and v2 formats.
OpenTelemetry Collector custom resource with the enabled Zipkin Receiver
2.9. Kafka Receiver Copy linkLink copied to clipboard!
The Kafka Receiver receives traces, metrics, and logs from Kafka in the OTLP format.
The Kafka Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with the enabled Kafka Receiver
- 1
- The list of Kafka brokers. The default is
localhost:9092. - 2
- The Kafka protocol version. For example,
2.0.0. This is a required field. - 3
- The name of the Kafka topic to read from. The default is
otlp_spans. - 4
- The plain text authentication configuration. If omitted, plain text authentication is disabled.
- 5
- The client-side TLS configuration. Defines paths to the TLS certificates. If omitted, TLS authentication is disabled.
- 6
- Disables verifying the server’s certificate chain and host name. The default is
false. - 7
- ServerName indicates the name of the server requested by the client to support virtual hosting.
2.10. Kubernetes Cluster Receiver Copy linkLink copied to clipboard!
The Kubernetes Cluster Receiver gathers cluster metrics and entity events from the Kubernetes API server. It uses the Kubernetes API to receive information about updates. Authentication for this receiver is only supported through service accounts.
The Kubernetes Cluster Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with the enabled Kubernetes Cluster Receiver
This receiver requires a configured service account, RBAC rules for the cluster role, and the cluster role binding that binds the RBAC with the service account.
ServiceAccount object
RBAC rules for the ClusterRole object
ClusterRoleBinding object
2.11. OpenCensus Receiver Copy linkLink copied to clipboard!
The OpenCensus Receiver provides backwards compatibility with the OpenCensus project for easier migration of instrumented codebases. It receives metrics and traces in the OpenCensus format via gRPC or HTTP and JSON.
The OpenCensus Receiver is deprecated and might be removed in a future release.
OpenTelemetry Collector custom resource with the enabled OpenCensus Receiver
- 1
- The OpenCensus endpoint. If omitted, the default is
0.0.0.0:55678. - 2
- The server-side TLS configuration. See the OTLP Receiver configuration section for more details.
- 3
- You can also use the HTTP JSON endpoint to optionally configure CORS, which is enabled by specifying a list of allowed CORS origins in this field. Wildcards with
*are accepted under thecors_allowed_origins. To match any origin, enter only*.
2.12. Filelog Receiver Copy linkLink copied to clipboard!
The Filelog Receiver tails and parses logs from files.
OpenTelemetry Collector custom resource with an enabled Filelog Receiver that tails a text file
The next example shows how to make the Filelog Receiver work within security context constraints.
OpenTelemetry Collector custom resource with an enabled Filelog Receiver that parses cluster logs
You can use this receiver to collect logs from pod filesystems in one of two ways:
- Configuring the receiver in a sidecar container running alongside your application pod.
- Deploying the receiver as a DaemonSet on the host machine with appropriate permissions to access Kubernetes logs.
To collect logs from application containers, you can use this receiver with sidecar injection. The Red Hat build of OpenTelemetry Operator allows injecting an OpenTelemetry Collector as a sidecar container into an application pod. This approach is useful when your application writes logs to files within the container filesystem. This receiver can then tail log files and apply Operators to parse the logs.
To use this receiver in sidecar mode to collect logs from application containers, you must configure volume mounts in the OpenTelemetryCollector custom resource. Both the application container and the sidecar Collector must mount the same shared volume, such as emptyDir. Define the volume in the application’s Pod specification. See the following example:
OpenTelemetry Collector custom resource with the Filelog Receiver configured in sidecar mode
2.13. Journald Receiver Copy linkLink copied to clipboard!
The Journald Receiver parses journald events from the systemd journal and sends them as logs.
The Journald Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with the enabled Journald Receiver
- 1
- Filters output by message priorities or priority ranges. The default value is
info. - 2
- Lists the units to read entries from. If empty, entries are read from all units.
- 3
- Includes very long logs and logs with unprintable characters. The default value is
false. - 4
- If set to
true, the receiver pauses reading a file and attempts to resend the current batch of logs when encountering an error from downstream components. The default value isfalse. - 5
- The time interval to wait after the first failure before retrying. The default value is
1s. The units arems,s,m,h. - 6
- The upper bound for the retry backoff interval. When this value is reached, the time interval between consecutive retry attempts remains constant at this value. The default value is
30s. The supported units arems,s,m,h. - 7
- The maximum time interval, including retry attempts, for attempting to send a logs batch to a downstream consumer. When this value is reached, the data are discarded. If the set value is
0, retrying never stops. The default value is5m. The supported units arems,s,m,h.
2.14. Kubernetes Events Receiver Copy linkLink copied to clipboard!
The Kubernetes Events Receiver collects events from the Kubernetes API server. The collected events are converted into logs.
The Kubernetes Events Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenShift Container Platform permissions required for the Kubernetes Events Receiver
OpenTelemetry Collector custom resource with the enabled Kubernetes Event Receiver
2.15. Prometheus Remote Write Receiver Copy linkLink copied to clipboard!
The Prometheus Remote Write Receiver receives metrics from Prometheus using the Remote Write protocol and converts them to the OpenTelemetry format. This receiver supports only the Prometheus Remote Write v2 protocol.
The Prometheus Remote Write Receiver is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
OpenTelemetry Collector custom resource with the enabled Prometheus Remote Write Receiver
- 1
- The endpoint where the receiver listens for Prometheus Remote Write requests.
The following are the prerequisites for using this receiver with Prometheus:
- Prometheus is started with the metadata WAL records feature flag enabled.
- Prometheus Remote Write v2 Protocol is enabled in the Prometheus remote write configuration.
- Native histograms are enabled in Prometheus by using the feature flag.
- Prometheus is configured to convert classic histograms into native histograms.
For more information about enabling these Prometheus features, see the Prometheus documentation.