opentelemetry-collector/receiver
Bogdan Drutu 62b0ae5be7
Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473)
* Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Processor

* Rename TraceProcessor to TraceConsumer as discussed.

* Add empty_test for processor.
2019-03-05 17:36:22 -08:00
..
jaegerreceiver Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00
opencensusreceiver Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00
prometheusreceiver Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00
zipkinreceiver Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00
README.md receiver: implemented Prometheus receiver 2019-02-10 22:58:39 -07:00
end_to_end_test.go Move debug processor to exporters, because no next. (#443) 2019-02-28 14:02:57 -08:00
factory.go Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00
receiver.go Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473) 2019-03-05 17:36:22 -08:00

README.md

A variety of receivers are available to the OpenCensus Service (both Agent and Collector)

Currently there are some inconsistencies between Agent and Collector configuration, those will be addressed by issue #135.

OpenCensus

This receiver receives spans from OpenCensus instrumented applications and translates them into the internal span types that are then sent to the collector/exporters.

Its address can be configured in the YAML configuration file under section "receivers", subsection "opencensus" and field "address". The syntax of the field "address" is [address|host]:<port-number>.

For example:

receivers:
  opencensus:
    address: "127.0.0.1:55678"

Writing with HTTP/JSON

The OpenCensus receiver for the agent can receive trace export calls via HTTP/JSON in addition to gRPC. The HTTP/JSON address is the same as gRPC as the protocol is recognized and processed accordingly.

To write traces with HTTP/JSON, POST to [address]/v1/trace. The JSON message format parallels the gRPC protobuf format, see this OpenApi spec for it.

The HTTP/JSON endpoint can also optionally CORS, which is enabled by specifying a list of allowed CORS origins in the cors_allowed_origins field:

receivers:
  opencensus:
    address: "localhost:55678"
    cors_allowed_origins:
    - http://test.com
    # Origins can have wildcards with *, use * by itself to match any origin.
    - https://*.example.com  

Collector Differences

(To be fixed via #135)

By default this receiver is ALWAYS started on the OpenCensus Collector, it can be disabled via command-line by using --receive-oc-trace=false. On the Collector only the port can be configured, example:

receivers:
  opencensus:
    port: 55678

Jaeger

This receiver receives spans from Jaeger collector HTTP and Thrift uploads and translates them into the internal span types that are then sent to the collector/exporters.

Its address can be configured in the YAML configuration file under section "receivers", subsection "jaeger" and fields "collector_http_port", "collector_thrift_port".

For example:

receivers:
  jaeger:
    collector_thrift_port: 14267
    collector_http_port: 14268

Collector Differences

(To be fixed via #135)

On the Collector Jaeger reception at the default ports can be enabled via command-line --receive-jaeger, and the name of the fields is slightly different:

receivers:
  jaeger:
    jaeger-thrift-tchannel-port: 14267
    jaeger-thrift-http-port: 14268

Zipkin

This receiver receives spans from Zipkin (V1 and V2) HTTP uploads and translates them into the internal span types that are then sent to the collector/exporters.

Its address can be configured in the YAML configuration file under section "receivers", subsection "zipkin" and field "address". The syntax of the field "address" is [address|host]:<port-number>.

For example:

receivers:
  zipkin:
    address: "127.0.0.1:9411"

Collector Differences

(To be fixed via #135)

On the Collector Zipkin reception at the port 9411 can be enabled via command-line --receive-zipkin. On the Collector only the port can be configured, example:

receivers:
  zipkin:
    port: 9411

Prometheus

This receiver is a drop-in replacement for getting Prometheus to scrape your services. Just like you would write in a YAML configuration file before starting Prometheus, such as with:

prometheus --config.file=prom.yaml

you can copy and paste that same configuration under section

receivers:
  prometheus:
    config:

such as:

receivers:
    prometheus:
      config:
        scrape_configs:
          - job_name: 'opencensus_service'
            scrape_interval: 5s
            static_configs:
              - targets: ['localhost:8889']

          - job_name: 'jdbc_apps'
            scrape_interval: 3s
            static_configs:
              - targets: ['localhost:9777']