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

Commit 7dcced4

Browse files
Merge pull request #1519 from splunk/repo-sync
Pulling refs/heads/main into main
2 parents 5890a36 + e1d3e69 commit 7dcced4

File tree

9 files changed

+180
-4
lines changed

9 files changed

+180
-4
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
The Splunk Distribution of the OpenTelemetry Collector has the following configuration options than can be used by several :ref:`otel-components`.
1+
The Splunk Distribution of the OpenTelemetry Collector has the following :ref:`configuration options <collector-common-config>` than can be used by several :ref:`otel-components`.
22

33
* :ref:`collector-common-config-auth`
44
* :ref:`collector-common-config-grcp`
5+
* :ref:`collector-common-config-http`
56
* :ref:`collector-common-config-net`
67
* :ref:`collector-common-config-tls`

gdi/opentelemetry/collector-common-config.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Common configuration options
1414

1515
Authentication settings <common-config/collector-common-config-auth.rst>
1616
gRCP settings <common-config/collector-common-config-grcp.rst>
17+
HTTP settings <common-config/collector-common-config-http.rst>
1718
Network settings <common-config/collector-common-config-net.rst>
1819
TLS settings <common-config/collector-common-config-tls.rst>
1920

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ See the default settings and configuration options at:
3333
* :ref:`otel-linux-config`
3434
* By default, you'll obtain these :ref:`metrics <ootb-metrics-windows>`
3535

36+
.. include:: /_includes/gdi/collector-common-options.rst
37+
3638
To upgrade or uninstall, see:
3739

3840
* :ref:`otel-linux-upgrade`

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ See the default settings and configuration options at:
3434
* :ref:`otel-windows-config`
3535
* By default, you'll obtain these :ref:`metrics <ootb-metrics-windows>`
3636

37+
.. include:: /_includes/gdi/collector-common-options.rst
38+
3739
To upgrade or uninstall, see:
3840

3941
* :ref:`otel-windows-upgrade`

gdi/opentelemetry/common-config/collector-common-config-grcp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To configure gRCP clients in :ref:`exporters <otel-components-exporters>` use th
2323

2424
* Learn more at gRCP's :new-page:`Load Balancing README https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md`.
2525

26-
* ``compression``.
26+
* ``compression``
2727

2828
* Compression type valid values are ``gzip``, ``snappy``, ``zstd``, and ``none``
2929

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. _collector-common-config-http:
2+
3+
*********************************************************************************
4+
Configure HTTP
5+
*********************************************************************************
6+
7+
HTTP exposes a variety of settings you can adjust within individual receivers or exporters of the Collector.
8+
9+
Configure HTTP clients
10+
=============================================================================================
11+
12+
To configure HTTP clients in :ref:`exporters <otel-components-exporters>` use these settings:
13+
14+
.. note:: Client configuration supports TLS. For more information, see :ref:`collector-common-config-tls`.
15+
16+
* ``endpoint``. Address and port for this connection
17+
18+
* ``tls``. See :ref:`collector-common-config-tls`
19+
20+
* ``headers``. Name-value pairs added to the HTTP request headers
21+
22+
* Certain headers such as Content-Length and Connection are automatically written when needed.
23+
24+
* The ``Host`` header is automatically derived from the endpoint value. However, this automatic assignment can be overridden by explicitly setting the ``Host`` field in the ``headers`` field.
25+
26+
* If the ``Host`` header is provided then it overrides ``Host`` field in ``Request``. For more information see :new-page:`Go's Request <https://pkg.go.dev/net/http#Request>`.
27+
28+
* ``read_buffer_size``
29+
30+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
31+
32+
* ``timeout``
33+
34+
* For more information see :new-page:`Go's Client <https://pkg.go.dev/net/http#Client>`.
35+
36+
* ``write_buffer_size``
37+
38+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
39+
40+
* ``compression``. Compression type to use
41+
42+
* Compression type valid values are ``deflate``, ``gzip``, ``snappy``, ``zlib``, ``zstd``, and ``none``.
43+
44+
* If compression is set to ``none``, all data is treated as uncompressed, and any other inputs cause an error.
45+
46+
* ``max_idle_conns``
47+
48+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
49+
50+
* ``max_idle_conns_per_host``
51+
52+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
53+
54+
* ``max_conns_per_host``
55+
56+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
57+
58+
* ``idle_conn_timeout``
59+
60+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
61+
62+
* ``auth``. See :ref:`collector-common-config-auth`
63+
64+
* ``disable_keep_alives``
65+
66+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
67+
68+
* ``http2_read_idle_timeout``
69+
70+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
71+
72+
* ``http2_ping_timeout``
73+
74+
* For more information see :new-page:`Go's Transport <https://pkg.go.dev/net/http#Transport>`.
75+
76+
* ``cookies``
77+
78+
* [``enabled``]. If enabled, the client stores cookies from server responses and reuse them in subsequent requests.
79+
80+
* For more information see :new-page:`Go's CookieJar type <https://pkg.go.dev/net/http#CookieJar>` documentation.
81+
82+
For example:
83+
84+
.. code-block:: yaml
85+
86+
exporter:
87+
otlphttp:
88+
endpoint: otelcol2:55690
89+
auth:
90+
authenticator: some-authenticator-extension
91+
tls:
92+
ca_file: ca.pem
93+
cert_file: cert.pem
94+
key_file: key.pem
95+
headers:
96+
test1: "value1"
97+
"test 2": "value 2"
98+
compression: zstd
99+
cookies:
100+
enabled: true
101+
102+
Configure HTTP servers
103+
=============================================================================================
104+
105+
To configure HTTP servers in :ref:`collector receivers <otel-components-receivers>` use these settings:
106+
107+
* ``cors``. Configure CORS to allow the receiver to accept traces from web browsers, even if the receiver is hosted at a different origin
108+
109+
* If left blank or set to ``null``, CORS is not enabled.
110+
111+
* See the list of :new-page:`CORS parameters <https://github.com/rs/cors#parameters>`.
112+
113+
* ``allowed_origins``. List of origins allowed to send requests to the receiver. An origin may contain a wildcard ``*`` to replace 0 or more characters. To allow any origin, set ``["*"]``. If no origins are listed, CORS will not be enabled.
114+
115+
* ``allowed_headers``. Allow CORS requests to include headers outside the :new-page:`default safelist <https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_request_header>`. By default, safelist headers and X-Requested-With are allowed. To allow any request header, set to ``["*"]``.
116+
117+
* ``max_age``. Sets the value of the ``Access-Control-Max-Age`` header, allowing clients to cache the response to CORS preflight requests. If not set, browsers use a default of 5 seconds. See more at :new-page:`Access-Control-Max-Age <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age>`.
118+
119+
* ``endpoint``
120+
121+
* For valid syntax see :new-page:`gRPC Name Resolution <https://github.com/grpc/grpc/blob/master/doc/naming.md>`.
122+
123+
* ``max_request_body_size``. ``20971520`` (20MiB) by default. Configures the maximum allowed body size in bytes for a single request
124+
125+
* ``compression_algorithms``
126+
127+
* ``tls``. See :ref:`collector-common-config-tls`
128+
129+
* ``auth``. See :ref:`collector-common-config-auth`
130+
131+
* ``request_params``. List of query parameter names to add to the auth context, along with the HTTP headers.
132+
133+
.. note:: You can enable the :ref:`attributes-processor` to append any http header using a custom key. You also need to enable ``"include_metadata"``.
134+
135+
For example:
136+
137+
.. code-block:: yaml
138+
139+
receivers:
140+
otlp:
141+
protocols:
142+
http:
143+
include_metadata: true
144+
auth:
145+
request_params:
146+
- token
147+
authenticator: some-authenticator-extension
148+
cors:
149+
allowed_origins:
150+
- https://foo.bar.com
151+
- https://*.test.com
152+
allowed_headers:
153+
- Example-Header
154+
max_age: 7200
155+
endpoint: 0.0.0.0:55690
156+
compression_algorithms: ["", "gzip"]
157+
158+
processors:
159+
attributes:
160+
actions:
161+
- key: http.client_ip
162+
from_context: X-Forwarded-For
163+
action: upsert
164+
165+
Learn more
166+
=============================================================================================
167+
168+
For more details on the available settings refer to :new-page:`HTTP Configuration Settings <https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp>` in OTel's GitHub repo.

gdi/opentelemetry/components/oauth2client-extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The following settings are required to configure the extension:
7777

7878
* If void, there is no timeout on the client.
7979

80-
For more information on the client side TLS settings, see :new-page:`TLS configuration settings <https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configtls>` in GitHub.
80+
For more information on the client side TLS settings, see :ref:`collector-common-config-tls`.
8181

8282
.. _oauth2client-extension-example:
8383

gdi/opentelemetry/components/splunk-hec-receiver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ To allow the receiver to work with client extensions, add the following in the C
8989
* :new-page:`OIDC Authentication <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/oidcauthextension>`
9090
* :new-page:`OAuth 2 client <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/oauth2clientauthextension>`
9191

92-
For advanced users, you can implement your own authentication extension to fulfill your requirements using the :new-page:`open-telemetry auth Go package <https://github.com/open-telemetry/opentelemetry-collector/tree/main/extension/auth>` and the :new-page:`configauth Go package <https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configauth>`.
92+
For advanced users, you can implement your own authentication extension to fulfill your requirements using the :new-page:`open-telemetry auth Go package <https://github.com/open-telemetry/opentelemetry-collector/tree/main/extension/auth>` and :ref:`collector-common-config-tls`.
9393

9494
Settings
9595
======================

gdi/opentelemetry/install-the-collector.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Use these configurations to change the default settings in each Collector packag
117117
* :ref:`otel-linux-config`
118118
* :ref:`otel-windows-config`
119119

120+
.. include:: /_includes/gdi/collector-common-options.rst
121+
120122
.. raw:: html
121123

122124
<embed>

0 commit comments

Comments
 (0)