Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 93c82ba

Browse files
Merge pull request #2262 from splunk/urbiz-=D6367-collector-common-congif
[6367]: Collector common config
2 parents c405277 + 259d6eb commit 93c82ba

11 files changed

+413
-10
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The Splunk Distribution of the OpenTelemetry Collector has the following configuration options than can be used by several :ref:`otel-components`.
2+
3+
* :ref:`collector-common-config-auth`
4+
* :ref:`collector-common-config-grcp`
5+
* :ref:`collector-common-config-net`
6+
* :ref:`collector-common-config-tls`
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _collector-common-config:
2+
3+
****************************************************************
4+
Common configuration options
5+
****************************************************************
6+
7+
.. meta::
8+
:description: Learn how to perform common actions with the Collector.
9+
10+
.. toctree::
11+
:maxdepth: 4
12+
:titlesonly:
13+
:hidden:
14+
15+
Authentication settings <common-config/collector-common-config-auth.rst>
16+
gRCP settings <common-config/collector-common-config-grcp.rst>
17+
Network settings <common-config/collector-common-config-net.rst>
18+
TLS settings <common-config/collector-common-config-tls.rst>
19+
20+
.. note:: The following list might not contain all the latest additions and updates. For a complete list of Collector common settings see the ``opentelemetry`` repository in GitHub.
21+
22+
.. include:: /_includes/gdi/collector-common-options.rst

gdi/opentelemetry/collector-kubernetes/collector-kubernetes-intro.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ To configure the Collector, including adding additional components or activating
6464
* :ref:`kubernetes-config-logs`
6565
* :ref:`otel-kubernetes-config-advanced`
6666

67+
.. include:: /_includes/gdi/collector-common-options.rst
68+
6769
.. raw:: html
6870

6971
<embed>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. _collector-common-config-auth:
2+
3+
*********************************************************************************
4+
Configure authentication
5+
*********************************************************************************
6+
7+
You can configure two types of authentication for the Collector:
8+
9+
* Server type authentication takes place in incoming HTTP/gRPC requests and is typically used by :ref:`receivers <otel-components-receivers>`. Server type authenticators include:
10+
11+
* :ref:`Basic Auth extension <basic-auth-extension>`
12+
* Bearer Token extension
13+
* OIDC extension
14+
15+
* Client type authentication takes place in outgoing HTTP/gRPC requests and is typically used by :ref:`exporters <otel-components-exporters>`. Client type authenticators include:
16+
17+
* ASAP Client Authentication extension
18+
* :ref:`Basic Auth extension <basic-auth-extension>`
19+
* Bearer Token extension
20+
* :ref:`oauth2client-extension`
21+
* Sigv4 extension
22+
23+
.. note:: For more details see :new-page:`Auth Configuration Settings https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configauth` in OTel's GitHub repo.
24+
25+
Example
26+
=============================================================================================
27+
28+
See the following example covering different auth options:
29+
30+
.. code-block:: yaml
31+
32+
extensions:
33+
oidc:
34+
# see the blog post on securing the otelcol for information
35+
# on how to setup an OIDC server and how to generate the TLS certs
36+
# required for this example
37+
# https://medium.com/opentelemetry/securing-your-opentelemetry-collector-1a4f9fa5bd6f
38+
issuer_url: http://localhost:8080/auth/realms/opentelemetry
39+
audience: account
40+
41+
oauth2client:
42+
client_id: someclientid
43+
client_secret: someclientsecret
44+
token_url: https://example.com/oauth2/default/v1/token
45+
scopes: ["api.metrics"]
46+
# tls settings for the token client
47+
tls:
48+
insecure: true
49+
ca_file: /var/lib/mycert.pem
50+
cert_file: certfile
51+
key_file: keyfile
52+
# timeout for the token client
53+
timeout: 2s
54+
55+
receivers:
56+
otlp/with_auth:
57+
protocols:
58+
grpc:
59+
endpoint: localhost:4318
60+
tls:
61+
cert_file: /tmp/certs/cert.pem
62+
key_file: /tmp/certs/cert-key.pem
63+
auth:
64+
## oidc is the extension name to use as the authenticator for this receiver
65+
authenticator: oidc
66+
67+
otlphttp/withauth:
68+
endpoint: http://localhost:9000
69+
auth:
70+
authenticator: oauth2client
71+
72+
73+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.. _collector-common-config-grcp:
2+
3+
*********************************************************************************
4+
Configure gRCP
5+
*********************************************************************************
6+
7+
gRPC exposes a variety of settings you can adjust within individual receivers or exporters of the Collector.
8+
9+
.. note::
10+
11+
To configure transport, see :ref:`collector-common-config-net`.
12+
13+
Configure gRCP clients
14+
=============================================================================================
15+
16+
To configure gRCP clients in :ref:`exporters <otel-components-exporters>` use these settings:
17+
18+
* ``auth``. See :ref:`collector-common-config-auth`
19+
20+
* ``balancer_name``
21+
22+
* Defaults: ``pick_first`` before version 0.103.0, ``round_robin`` for v0.103.0 or higher
23+
24+
* Learn more at gRCP's :new-page:`Load Balancing README https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md`.
25+
26+
* ``compression``.
27+
28+
* Compression type valid values are ``gzip``, ``snappy``, ``zstd``, and ``none``
29+
30+
* ``endpoint``
31+
32+
* For valid syntax see :new-page:`gRPC Name Resolution <https://github.com/grpc/grpc/blob/master/doc/naming.md>`.
33+
34+
* ``headers``
35+
36+
* ``keepalive``
37+
38+
* ``read_buffer_size``
39+
40+
* ``tls``. See :ref:`collector-common-config-tls`.
41+
42+
* ``write_buffer_size``
43+
44+
For example:
45+
46+
.. code-block:: yaml
47+
48+
exporters:
49+
otlp:
50+
endpoint: otelcol2:55690
51+
auth:
52+
authenticator: some-authenticator-extension
53+
tls:
54+
ca_file: ca.pem
55+
cert_file: cert.pem
56+
key_file: key.pem
57+
headers:
58+
test1: "value1"
59+
"test 2": "value 2"
60+
61+
Configure gRCP servers
62+
=============================================================================================
63+
64+
To configure gRCP servers in :ref:`collector receivers <otel-components-receivers>` use these settings:
65+
66+
* ``auth``. See :ref:`collector-common-config-auth`
67+
68+
* ``keepalive``
69+
70+
* ``max_concurrent_streams``
71+
72+
* ``max_recv_msg_size_mib``
73+
74+
* ``read_buffer_size``
75+
76+
* ``tls``. See :ref:`collector-common-config-tls`
77+
78+
* ``write_buffer_size``
79+
80+
Learn more
81+
=============================================================================================
82+
83+
For more details on the available settings refer to:
84+
85+
* :new-page:`gRPC Configuration Settings <https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configgrpc>` in OTel's GitHub repo
86+
* :new-page:`Golang's gRCP documentation <https://pkg.go.dev/google.golang.org/grpc>`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _collector-common-config-net:
2+
3+
*********************************************************************************
4+
Configure network settings
5+
*********************************************************************************
6+
7+
:ref:`Collector receivers <otel-components-receivers>` leverage network configuration to set connection and transport information.
8+
9+
You can configure the following network settings:
10+
11+
* ``endpoint``. Configures the address for this network connection.
12+
13+
* 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.
14+
15+
* 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.
16+
17+
* ``transport``. You can use the following protocols:
18+
19+
* "tcp"
20+
* "tcp4" (IPv4-only)
21+
* "tcp6" (IPv6-only)
22+
* "udp"
23+
* "udp4" (IPv4-only)
24+
* "udp6" (IPv6-only)
25+
* "ip"
26+
* "ip4" (IPv4-only)
27+
* "ip6" (IPv6-only)
28+
* "unix"
29+
* "unixgram"
30+
* "unixpacket"
31+
32+
* ``dialer_timeout``. No timeout by default. The maximum amount of time a dial waits for a connect to complete.
33+
34+
.. note:: TCP receivers only require the ``endpoint`` configuration setting.
35+
36+
37+

0 commit comments

Comments
 (0)