Skip to content

Commit 9d81156

Browse files
committed
configuration: Add settings/telemetry section
This is for OpenTelemetry (OTEL). Signed-off-by: Andrew Clayton <[email protected]>
1 parent 3a3ead8 commit 9d81156

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

source/configuration/index.rst

+59
Original file line numberDiff line numberDiff line change
@@ -5444,6 +5444,12 @@ that stores instance-wide preferences.
54445444
uploaded
54455445
via the :doc:`control API <../controlapi>`.
54465446
5447+
* - **telemetry**
5448+
- Object:
5449+
OpenTelemetry configuration
5450+
5451+
*(since 1.34.0)*
5452+
54475453
In turn, the **http** option exposes the following settings:
54485454
54495455
.. list-table::
@@ -5584,6 +5590,59 @@ In turn, the **http** option exposes the following settings:
55845590
**.webp**, **.woff2**, **.woff**, **.xml**, and
55855591
**.zip**.
55865592
5593+
The **telemetry** option exposes the following settings:
5594+
5595+
.. list-table::
5596+
:header-rows: 1
5597+
5598+
* - Option
5599+
- Description
5600+
5601+
* - **endpoint** (required)
5602+
- The endpoint for the OpenTelemetry (OTEL) Collector.
5603+
5604+
It takes a URL to either a gRPC or HTTP(S) endpoint.
5605+
5606+
* - **protocol** (required)
5607+
- Determines the protocol used to communicate with the endpoint.
5608+
5609+
Can be either *http(s)* or *grpc*
5610+
5611+
* - **batch_size**
5612+
- Number of spans to cache before triggering a transaction with the
5613+
configured endpoint. This is optional.
5614+
5615+
This allows the user to cache up to N spans before the OpenTelemetry
5616+
(OTEL) background thread sends spans over the network to the
5617+
collector.
5618+
5619+
If specified, it must be a positive integer.
5620+
5621+
* - **sampling_ratio**
5622+
- Percentage of requests to trace.
5623+
5624+
This allows the user to only trace anywhere from 0% to 100% of
5625+
requests that hit Unit. In high throughput environments this
5626+
percentage should be lower. This allows the user to save space in
5627+
storing span data, and to collect request metrics like time to decode
5628+
headers and whatnot without storing massive amounts of duplicate
5629+
superfluous data.
5630+
5631+
If specified, it must be a positive floating point number.
5632+
5633+
Example:
5634+
5635+
.. code-block:: json
5636+
5637+
"settings": {
5638+
"telemetry": {
5639+
"batch_size": 20,
5640+
"endpoint": "http://example.com/v1/traces",
5641+
"protocol": "http",
5642+
"sampling_ratio": 1.0
5643+
}
5644+
},
5645+
55875646
.. _configuration-access-log:
55885647
55895648
**********

0 commit comments

Comments
 (0)