Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add README to config components #2072

Merged
merged 8 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions config/configgrpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# gRPC Configuration Settings

gRPC exposes a [variety of settings](https://godoc.org/google.golang.org/grpc).
Several of these settings are available for configuration within individual
receivers or exporters. In general, none of these settings should need to be
adjusted.

## Client Configuration

[Exporters](https://github.com/open-telemetry/opentelemetry-collector/blob/master/exporter/README.md)
leverage client configuration.

Note that client configuration supports TLS configuration, however
configuration parameters are not defined under `tls_settings` like server
configuration. For more information, see [configtls
README](../configtls/README.md).

- [`balancer_name`](https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md)
- `compression` (default = gzip): Compression type to use (only gzip is supported today)
- `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md)
- `headers`: name/value pairs added to the request
- [`keepalive`](https://godoc.org/google.golang.org/grpc/keepalive#ClientParameters)
- `permit_without_stream`
- `time`
- `timeout`
- [`read_buffer_size`](https://godoc.org/google.golang.org/grpc#ReadBufferSize)
- [`write_buffer_size`](https://godoc.org/google.golang.org/grpc#WriteBufferSize)

Example:

```yaml
exporter:
otlp:
endpoint: otelcol2:55690
headers:
test1: "value1"
test 2": "value 2"
flands marked this conversation as resolved.
Show resolved Hide resolved
```

## Server Configuration

[Receivers](https://github.com/open-telemetry/opentelemetry-collector/blob/master/receiver/README.md)
leverage server configuration.

Note that transport configuration can also be configured. For more information,
see [confignet README](../confignet/README.md).

- [`keepalive`](https://godoc.org/google.golang.org/grpc/keepalive#ServerParameters)
- [`enforcement_policy`](https://godoc.org/google.golang.org/grpc/keepalive#EnforcementPolicy)
- `min_time`
- `permit_without_stream`
- [`server_parameters`](https://godoc.org/google.golang.org/grpc/keepalive#ServerParameters)
- `max_connection_age`
- `max_connection_age_grace`
- `max_connection_idle`
- `time`
- `timeout`
- [`max_concurrent_streams`](https://godoc.org/google.golang.org/grpc#MaxConcurrentStreams)
- [`max_recv_msg_size_mib`](https://godoc.org/google.golang.org/grpc#MaxRecvMsgSize)
- [`read_buffer_size`](https://godoc.org/google.golang.org/grpc#ReadBufferSize)
- [`tls_settings`](../configtls/README.md)
- [`write_buffer_size`](https://godoc.org/google.golang.org/grpc#WriteBufferSize)
56 changes: 56 additions & 0 deletions config/confighttp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# HTTP Configuration Settings

HTTP exposes a [variety of settings](https://golang.org/pkg/net/http/).
Several of these settings are available for configuration within individual
receivers or exporters.

## Client Configuration

[Exporters](https://github.com/open-telemetry/opentelemetry-collector/blob/master/exporter/README.md)
leverage client configuration.

Note that client configuration supports TLS configuration, however
configuration parameters are not defined under `tls_settings` like server
configuration. For more information, see [configtls
README](../configtls/README.md).

- `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md)
flands marked this conversation as resolved.
Show resolved Hide resolved
flands marked this conversation as resolved.
Show resolved Hide resolved
- `headers`: name/value pairs added to the request
flands marked this conversation as resolved.
Show resolved Hide resolved
- [`read_buffer_size`](https://golang.org/pkg/net/http/#Transport)
- [`timeout`](https://golang.org/pkg/net/http/#Client)
- [`write_buffer_size`](https://golang.org/pkg/net/http/#Transport)

Example:

```yaml
exporter:
otlp:
endpoint: otelcol2:55690
headers:
test1: "value1"
test 2": "value 2"
flands marked this conversation as resolved.
Show resolved Hide resolved
```

## Server Configuration

[Receivers](https://github.com/open-telemetry/opentelemetry-collector/blob/master/receiver/README.md)
leverage server configuration.

- [`cors_allowed_origins`](https://github.com/rs/cors): An empty list means
that CORS is not enabled at all. A wildcard can be used to match any origin
or one or more characters of an origin.
- `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md)
- [`tls_settings`](../configtls/README.md)

Example:

```yaml
receivers:
otlp:
cors_allowed_origins:
- https://foo.bar.com
- https://*.test.com
endpoint: 0.0.0.0:55690
protocols:
http:
```
18 changes: 18 additions & 0 deletions config/confignet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Network Configuration Settings

[Receivers](https://github.com/open-telemetry/opentelemetry-collector/blob/master/receiver/README.md)
leverage network configuration to set connection and transport information.

- `endpoint`: Configures the address for this network connection. For TCP and
UDP networks, the address has the form "host:port". The host must be a
literal IP address, or a host name that can be resolved to IP addresses. The
port must be a literal port number or a service name. If the host is a
literal IPv6 address it must be enclosed in square brackets, as in
"[2001:db8::1]:80" or "[fe80::1%zone]:80". The zone specifies the scope of
the literal IPv6 address as defined in RFC 4007.
- `transport`: Known protocols are "tcp", "tcp4" (IPv4-only), "tcp6"
(IPv6-only), "udp", "udp4" (IPv4-only), "udp6" (IPv6-only), "ip", "ip4"
(IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket".

Note that for TCP receivers only the `endpoint` configuration setting is
required.
100 changes: 100 additions & 0 deletions config/configtls/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# TLS Configuration Settings

Crypto TLS exposes a [variety of settings](https://godoc.org/crypto/tls).
Several of these settings are available for configuration within individual
receivers or exporters.

Note that mutual TLS (mTLS) is also supported.

## TLS / mTLS Configuration

By default, TLS is enabled:

- `insecure` (default = false): whether to enable client transport security for
the exporter's gRPC connection. See
[grpc.WithInsecure()](https://godoc.org/google.golang.org/grpc#WithInsecure).

As a result, the following parameters are also required:

- `cert_file`: Path to the TLS cert to use for TLS required connections. Should
only be used if `insecure` is set to false.
- `key_file`: Path to the TLS key to use for TLS required connections. Should
only be used if `insecure` is set to false.

A certificate authority may also need to be defined:

- `ca_file`: Path to the CA cert. For a client this verifies the server
certificate. For a server this verifies client certificates. If empty uses
system root CA. Should only be used if `insecure` is set to false.

How TLS/mTLS is configured depends on whether configuring the client or server.
See below for examples.

## Client Configuration

[Exporters](https://github.com/open-telemetry/opentelemetry-collector/blob/master/exporter/README.md)
leverage client configuration.

Note that client configuration supports TLS configuration, however
configuration parameters are not defined under `tls_settings` like server
configuration. For more information, see [configtls
README](../configtls/README.md).

Beyond TLS configuration, the following setting can optionally be configured:

- `server_name_override`: If set to a non-empty string, it will override the
virtual host name of authority (e.g. :authority header field) in requests
(typically used for testing).

Example:

```yaml
exporters:
otlp:
endpoint: myserver.local:55690
insecure: false
ca_file: server.crt
cert_file: client.crt
key_file: client.key
otlp/insecure:
endpoint: myserver.local:55690
insecure: true
```

## Server Configuration

[Receivers](https://github.com/open-telemetry/opentelemetry-collector/blob/master/receiver/README.md)
leverage server configuration.

Beyond TLS configuration, the following setting can optionally be configured
(required for mTLS):

- `client_ca_file`: Path to the TLS cert to use by the server to verify a
client certificate. (optional) This sets the ClientCAs and ClientAuth to
RequireAndVerifyClientCert in the TLSConfig. Please refer to
https://godoc.org/crypto/tls#Config for more information.

Example:

```yaml
receivers:
otlp:
protocols:
grpc:
endpoint: mysite.local:55690
tls_settings:
cert_file: server.crt
key_file: server.key
otlp/mtls:
protocols:
grpc:
client_ca_file: client.pem
endpoint: mysite.local:55690
tls_settings:
cert_file: server.crt
key_file: server.key
otlp/notls:
protocols:
grpc:
endpoint: mysite.local:55690
```
4 changes: 0 additions & 4 deletions docs/pipelines.md

This file was deleted.

1 change: 1 addition & 0 deletions exporter/exporterhelper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ The following configuration options can be modified:
User should calculate this as `num_seconds * requests_per_second` where:
- `num_seconds` is the number of seconds to buffer in case of a backend outage
- `requests_per_second` is the average number of requests per seconds.
- `timeout` (defult = 5s): Time to wait per individual attempt to send data to a backend.

The full list of settings exposed for this helper exporter are documented [here](factory.go).