opentelemetry-collector/receiver
Yang Song 686132fc27
[chore] fix xconsumer mod versions (#11884)
#### Description

`make update-otel` failed in contrib due to the new packages added in
https://github.com/open-telemetry/opentelemetry-collector/pull/11779.
Pin a commit version for them in go mod to see if it unblocks contrib
2024-12-13 20:53:32 +00:00
..
internal [chore] Refactor obsreport for scrapers to use new scraper.Metrics (#11728) 2024-11-21 17:00:24 -08:00
nopreceiver [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
otlpreceiver [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
receiverhelper [service] update telemetry level to reflect their state (#11729) 2024-11-22 09:53:18 -08:00
receiverprofiles [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
receivertest [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
scraperhelper [chore]: enable gofumpt linter in receiver, scraper, semconv and service (#11856) 2024-12-12 17:59:26 +00:00
xreceiver [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
Makefile split receiver into its own module (#7195) 2023-03-02 12:04:58 -08:00
README.md [chore] Simplify general information in receivers/exporter readme (#9336) 2024-01-22 09:55:32 -08:00
doc.go [chore] use license shortform (#7694) 2023-05-18 13:11:17 -07:00
go.mod [chore] fix xconsumer mod versions (#11884) 2024-12-13 20:53:32 +00:00
go.sum fix(deps): update module google.golang.org/grpc to v1.68.1 (#11835) 2024-12-10 05:00:52 +00:00
package_test.go [chore] remove unused opencensus code (#9108) 2024-01-30 10:19:42 -08:00
receiver.go Remove deprecated funcs from receiver package (#11367) 2024-10-07 09:50:35 -07:00
receiver_test.go [chore]: enable gofumpt linter in receiver, scraper, semconv and service (#11856) 2024-12-12 17:59:26 +00:00

README.md

General Information

A receiver is how data gets into the OpenTelemetry Collector. 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.

This repository hosts the following receiver available in traces, metrics and logs pipelines:

The contrib repository has more receivers available in its builds.

Configuring Receivers

Receivers are configured via YAML under the top-level receivers tag. There must be at least one enabled receiver for a configuration to be considered valid.

The following is a sample configuration for the examplereceiver.

receivers:
  # Receiver 1.
  # <receiver type>:
  examplereceiver:
    # <setting one>: <value one>
    endpoint: 1.2.3.4:8080
    # ...
  # Receiver 2.
  # <receiver type>/<name>:
  examplereceiver/settings:
    # <setting two>: <value two>
    endpoint: 0.0.0.0:9211

A receiver instance is referenced by its full name in other parts of the config, such as in pipelines. A full name consists of the receiver type, '/' and the name appended to the receiver type in the configuration. All receiver full names must be unique.

For the example above:

  • Receiver 1 has full name examplereceiver.
  • Receiver 2 has full name examplereceiver/settings.

Receivers are enabled upon being added to a pipeline. For example:

service:
  pipelines:
    # Valid pipelines are: traces, metrics or logs
    # Trace pipeline 1.
    traces:
      receivers: [examplereceiver, examplereceiver/settings]
      processors: []
      exporters: [exampleexporter]
    # Trace pipeline 2.
    traces/another:
      receivers: [examplereceiver, examplereceiver/settings]
      processors: []
      exporters: [exampleexporter]

At least one receiver must be enabled per pipeline to be a valid configuration.