Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new dimension to internal metrics to identify mode #1634

Merged
merged 9 commits into from
Jan 30, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,13 @@ processors:
value: "{{ .Values.environment }}"
{{- end }}

# The following processor is used to add "otelcol.service.mode" attribute to the internal metrics
resource/add_mode:
attributes:
- action: insert
value: "agent"
key: otelcol.service.mode

{{- if .Values.isWindows }}
metricstransform:
transforms:
Expand Down Expand Up @@ -1050,6 +1057,7 @@ service:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
{{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }}
- k8sattributes/metrics
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ processors:
key: deployment.environment
{{- end }}

# The following processor is used to add "otelcol.service.mode" attribute to the internal metrics
resource/add_mode:
attributes:
- action: insert
value: "gateway"
key: otelcol.service.mode

exporters:
{{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }}
signalfx:
Expand Down Expand Up @@ -257,6 +264,7 @@ service:
- batch
- resource/add_collector_k8s
- resourcedetection
- resource/add_mode
{{- if .Values.clusterName }}
- resource/add_cluster_name
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ processors:
value: "{{ .Values.environment }}"
{{- end }}

# The following processor is used to add "otelcol.service.mode" attribute to the internal metrics
resource/add_mode:
attributes:
- action: insert
value: "clusterReceiver"
key: otelcol.service.mode


resource/k8s_cluster:
attributes:
# XXX: Added so that Smart Agent metrics and OTel metrics don't map to the same MTS identity
Expand Down Expand Up @@ -278,6 +286,7 @@ service:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
{{- if (eq (include "splunk-otel-collector.platformMetricsEnabled" $) "true") }}
- k8sattributes/metrics
{{- end }}
Expand Down
Loading