Skip to content

Commit a82f12a

Browse files
authored
add_mode processor for gateway
1 parent e5d2997 commit a82f12a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/otelcol/config/collector/gateway_config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ processors:
8282
#value: staging/production/...
8383
#key: deployment.environment
8484

85+
# The following processor is used to add "otelcol.service.mode" attribute to the internal metrics
86+
resource/add_mode:
87+
attributes:
88+
- action: insert
89+
value: "gateway"
90+
key: otelcol.service.mode
91+
8592
# Detect if the collector is running on a cloud system. Overrides resource attributes set by receivers.
8693
# Detector order is important: the `system` detector goes last so it can't preclude cloud detectors from setting host/os info.
8794
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#ordering
@@ -142,7 +149,7 @@ service:
142149
exporters: [signalfx]
143150
metrics/internal:
144151
receivers: [prometheus/internal]
145-
processors: [memory_limiter, batch, resourcedetection/internal]
152+
processors: [memory_limiter, batch, resourcedetection/internal, resource/add_mode]
146153
exporters: [signalfx/internal]
147154
logs/signalfx:
148155
receivers: [signalfx]

0 commit comments

Comments
 (0)