opentelemetry-collector/extension
Tigran Najaryan 91728bc8ce
Make component interfaces uniform (#488)
This change fixes inconsistencies in component interfaces. Motivation:

- Uniformness results in reduction of code that currently has to
  deal with differences.
- Processor.Start is missing and is important for allowing processors
  to communicate with the Host.

What's changed:

- Introduced Component interface.
- Unified Host interface.
- Added a Start function to processors (via Component interface).
- Start/Shutdown is now called for Processors from service start/shutdown.
- Receivers, Exporters, Processors, Extensions now embed Component interface.
- Replaced StartTraceReception/StartMetricsReception by single Start function for receivers.
- Replaced StopTraceReception/StopMetricsReception by single Shutdown function for receivers.

Note: before merging this we need to announce the change in Gitter since it
breaks existing implementations in contrib (although the fix is easy).

Resolves #477
Resolves #262
2020-01-10 08:49:34 -05:00
..
extensiontest Make component interfaces uniform (#488) 2020-01-10 08:49:34 -05:00
healthcheckextension Make component interfaces uniform (#488) 2020-01-10 08:49:34 -05:00
pprofextension Make component interfaces uniform (#488) 2020-01-10 08:49:34 -05:00
zpagesextension Make component interfaces uniform (#488) 2020-01-10 08:49:34 -05:00
README.md Rename all github paths from opentelemtry-service to opentelemetry-collector (#371) 2019-09-27 17:17:03 -04:00
extension.go Make component interfaces uniform (#488) 2020-01-10 08:49:34 -05:00
factory.go Validate configuration object tags (#383) 2019-10-15 07:18:49 -07:00
factory_test.go Rename all github paths from opentelemtry-service to opentelemetry-collector (#371) 2019-09-27 17:17:03 -04:00

README.md

Extensions

Note This documentation is still in progress. For any questions, please reach out in the OpenTelemetry Gitter or refer to the issues page.

Supported service extensions (sorted alphabetically):

Ordering Extensions

The order extensions are specified for the service is important as this is the order in which each extension will be started and the reverse order in which they will be shutdown. The ordering is determined in the extensions tag under the service tag in the configuration file, example:

service:
  # Extensions specified below are going to be loaded by the service in the
  # order given below, and shutdown on reverse order.
  extensions: [health_check, pprof, zpages]

Health Check

Health Check extension enables an HTTP url that can be probed to check the status of the the OpenTelemetry Collector. The only configuration setting is the port in which the endpoint is going to be available, the default port is 13133.

This extension can be used as kubernetes liveness and readiness probe.

Configuration:


extensions:
  # Configures the health_check extension to expose an HTTP endpoint with the
  # service status.
  health_check:
    # Specifies the port in which the HTTP endpoint is going to be opened. The
    # default value is 13133.
    port: 13133

Performance Profiler

Performance Profiler extension enables the golang net/http/pprof endpoint. This is typically used by developers to collect performance profiles and investigate issues with the service.

Configuration:


extensions:
  # Configures the pprof (Performance Profiler) extension to expose an HTTP
  # endpoint that can be used by the golang tool pprof to collect profiles.
  # The default values are listed below.
  pprof:
    # The endpoint in which the pprof will be listening to. Use localhost:<port>
    # to make it available only locally, or ":<port>" to make it available on
    # all network interfaces.
    endpoint: localhost:1777
    # Fraction of blocking events that are profiled. A value <= 0 disables
    # profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details.
    block_profile_fraction: 0
    # Fraction of mutex contention events that are profiled. A value <= 0
    # disables profiling. See https://golang.org/pkg/runtime/#SetMutexProfileFraction
    # for details.
    mutex_profile_fraction: 0

zPages

Enables an extension that serves zPages, an HTTP endpoint that provides live data for debugging different components that were properly instrumented for such. All core exporters and receivers provide some zPage instrumentation.

Configuration:

extensions:
  # Configures the zPages extension to expose an HTTP endpoint that can be used
  # to debug components of the service.
  zpages:
    # Specifies the HTTP endpoint is going to be opened to serve zPages.
    # Use localhost:<port> to make it available only locally, or ":<port>" to
    # make it available on all network interfaces.
    # The default value is listed below.
    endpoint: localhost:55679