mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * observability/otel/otel-collector/otel-collector-processors.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="otel-processors-resource-detection-processor_{context}"]
|
|
= Resource Detection Processor
|
|
|
|
[role="_abstract"]
|
|
The Resource Detection Processor identifies host resource details in alignment with OpenTelemetry's resource semantic standards. Using the detected information, this processor can add or replace the resource values in telemetry data. This processor supports traces and metrics. You can use this processor with multiple detectors such as the Docket metadata detector or the `OTEL_RESOURCE_ATTRIBUTES` environment variable detector.
|
|
|
|
:FeatureName: The Resource Detection Processor
|
|
include::snippets/technology-preview.adoc[]
|
|
|
|
.{product-title} permissions required for the Resource Detection Processor
|
|
[source,yaml]
|
|
----
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: otel-collector
|
|
rules:
|
|
- apiGroups: ["config.openshift.io"]
|
|
resources: ["infrastructures", "infrastructures/status"]
|
|
verbs: ["get", "watch", "list"]
|
|
# ...
|
|
----
|
|
|
|
.OpenTelemetry Collector using the Resource Detection Processor
|
|
[source,yaml]
|
|
----
|
|
# ...
|
|
config:
|
|
processors:
|
|
resourcedetection:
|
|
detectors: [openshift]
|
|
override: true
|
|
service:
|
|
pipelines:
|
|
traces:
|
|
processors: [resourcedetection]
|
|
metrics:
|
|
processors: [resourcedetection]
|
|
# ...
|
|
----
|
|
|
|
.OpenTelemetry Collector using the Resource Detection Processor with an environment variable detector
|
|
[source,yaml]
|
|
----
|
|
# ...
|
|
config:
|
|
processors:
|
|
resourcedetection/env:
|
|
detectors: [env] # <1>
|
|
timeout: 2s
|
|
override: false
|
|
# ...
|
|
----
|
|
<1> Specifies which detector to use. In this example, the environment detector is specified.
|