Skip to content

Commit e985a74

Browse files
committed
Document OpenTelemetry prometheus exporter
Signed-off-by: Pavol Loffay <[email protected]>
1 parent efe9f22 commit e985a74

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

modules/distr-tracing-otel-config-collector.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,48 @@ The Logging exporter prints data to the standard output.
393393
exporters: [logging]
394394
----
395395
<1> Verbosity of the logging export: `detailed` or `normal` or `basic`. When set to `detailed`, pipeline data is verbosely logged. Defaults to `normal`.
396+
397+
[id="prometheus-exporter_{context}"]
398+
==== Prometheus exporter
399+
400+
The Prometheus exporter exports data using the Prometheus or OpenMetrics formats.
401+
402+
* Support level: link:https://access.redhat.com/support/offerings/techpreview[Technology Preview]
403+
* Supported signals: metrics
404+
405+
.OpenTelemetry Collector custom resource with an enabled Prometheus exporter
406+
[source,yaml]
407+
----
408+
ports:
409+
- name: promexporter <1>
410+
port: 8889
411+
protocol: TCP
412+
config: |
413+
exporters:
414+
prometheus:
415+
endpoint: 0.0.0.0:8889 <2>
416+
tls: <3>
417+
ca_file: ca.pem
418+
cert_file: cert.pem
419+
key_file: key.pem
420+
namespace: prefix <4>
421+
const_labels: <5>
422+
label1: value1
423+
enable_open_metrics: true <6>
424+
resource_to_telemetry_conversion: <7>
425+
enabled: true
426+
metric_expiration: 180m <8>
427+
service:
428+
pipelines:
429+
metrics:
430+
exporters: [prometheus]
431+
----
432+
<1> Exposes the Prometheus port from the collector pod and service. You can enable scraping of metrics by Prometheus by using the port name in `ServiceMonitor` or `PodMonitor` custom resource.
433+
<2> The network endpoint where the metrics are exposed.
434+
<3> The server-side TLS configuration. Defines paths to TLS certificates.
435+
<4> If set, exports metrics under the provided value. No default.
436+
<5> Key-value pair labels that are applied for every exported metric. No default.
437+
<6> If `true`, metrics are exported using the OpenMetrics format. Exemplars are only exported in the OpenMetrics format and only for histogram and monotonic sum metrics such as `counter`. Disabled by default.
438+
<7> If `enabled` is `true`, all the resource attributes are converted to metric labels by default. Disabled by default.
439+
<8> Defines how long metrics are exposed without updates. The default is `5m`.
440+

0 commit comments

Comments
 (0)