Skip to content

Commit

Permalink
Added new dimension to internal metrics to identify mode (#1634)
Browse files Browse the repository at this point in the history
* Add mode to gateway config

* Add mode to agent config

* add mode for cluster receiver

* updated examples with new collector mode

* fix extra line

Co-authored-by: jvoravong <[email protected]>

* add changelog item

* Update .chloggen/add_collector_mode.yaml

---------

Co-authored-by: jvoravong <[email protected]>
  • Loading branch information
technimad-splunk and jvoravong authored Jan 30, 2025
1 parent 8fc7872 commit 2f4ca14
Show file tree
Hide file tree
Showing 144 changed files with 525 additions and 70 deletions.
12 changes: 12 additions & 0 deletions .chloggen/add_collector_mode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: agent, clusterReceiver, gateway
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add new dimension `otelcol.service.mode` to internal metrics to identify collector mode
# One or more tracking issues related to the change
issues: [1634]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -474,6 +479,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: c231dafe36c0682673dddd6c85709ccee470181c3126470b2e645cd7ba56507c
checksum/config: fcb21155261f59bb9d209e0d4f5c0748d04cff784753bff6a92183f22b14d58a
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
component: otel-k8s-cluster-receiver
release: default
annotations:
checksum/config: 255712b444c57ed04dd3499a8655f166a80985e294e08e7237b6b500ef76b0b3
checksum/config: 5080b8509ea7b5474b08c17da8a05009a8fdf466709c300f7fd4826f0111037e
spec:
serviceAccountName: default-splunk-otel-collector
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -424,6 +429,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 44f909abad1637b2e78068afc4ab38b2fd530cce14f57ee66f13f5e565ab30ee
checksum/config: ad95b3c2831a47c954119c1715845cc9ed49dc506bddc27026fd350360bdd969
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
component: otel-k8s-cluster-receiver
release: default
annotations:
checksum/config: 255712b444c57ed04dd3499a8655f166a80985e294e08e7237b6b500ef76b0b3
checksum/config: 5080b8509ea7b5474b08c17da8a05009a8fdf466709c300f7fd4826f0111037e
spec:
serviceAccountName: default-splunk-otel-collector
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -302,6 +307,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 836fcc21881bde4060a0d9edff09d7809cee53e63e6a1168001c531a47680516
checksum/config: 07098b77606a130fe8b3c0619fc513eb0e700265d1abf11c5571479d7274c0ef
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
component: otel-k8s-cluster-receiver
release: default
annotations:
checksum/config: 255712b444c57ed04dd3499a8655f166a80985e294e08e7237b6b500ef76b0b3
checksum/config: 5080b8509ea7b5474b08c17da8a05009a8fdf466709c300f7fd4826f0111037e
spec:
serviceAccountName: default-splunk-otel-collector
nodeSelector:
Expand Down
6 changes: 6 additions & 0 deletions examples/add-sampler/rendered_manifests/configmap-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -290,6 +295,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
2 changes: 1 addition & 1 deletion examples/add-sampler/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 087b234e31830ae8352ceafdb062671206dac92eb3490ff008cd6a734536c1d9
checksum/config: 0d926858899a7d27ca9c752f9db3f257c8e93ba953d32c0303bd382d2f78f30c
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
component: otel-k8s-cluster-receiver
release: default
annotations:
checksum/config: 255712b444c57ed04dd3499a8655f166a80985e294e08e7237b6b500ef76b0b3
checksum/config: 5080b8509ea7b5474b08c17da8a05009a8fdf466709c300f7fd4826f0111037e
spec:
serviceAccountName: default-splunk-otel-collector
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -466,6 +471,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: c83c91c483abdf4d4f0f76b0c2dfcc2c900966e258fde53ab368e7e427eb05d4
checksum/config: 25545be88b6636d4e92888850b2dfcdc95bc2201cf8e45c80f22ad6edcde385f
kubectl.kubernetes.io/default-container: otel-collector
sidecar.istio.io/inject: "false"
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
component: otel-k8s-cluster-receiver
release: default
annotations:
checksum/config: 255712b444c57ed04dd3499a8655f166a80985e294e08e7237b6b500ef76b0b3
checksum/config: 5080b8509ea7b5474b08c17da8a05009a8fdf466709c300f7fd4826f0111037e
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: default-splunk-otel-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -287,6 +292,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
component: otel-collector-agent
release: default
annotations:
checksum/config: 447bfd0ac5cea8708f6ca3c5904fb629da253463ed465d5badaf167ce00c793c
checksum/config: 99ecbdd7c6f9b7bb4a206b6c1d9c4c6b8a1f9ee74ff85d1089ac0630c29c6c98
kubectl.kubernetes.io/default-container: otel-collector
spec:
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: agent
resourcedetection:
detectors:
- env
Expand Down Expand Up @@ -271,6 +276,7 @@ data:
- resource/add_agent_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/agent
traces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: clusterReceiver
resource/k8s_cluster:
attributes:
- action: insert
Expand Down Expand Up @@ -115,6 +120,7 @@ data:
- resource/add_collector_k8s
- resourcedetection
- resource
- resource/add_mode
receivers:
- prometheus/k8s_cluster_receiver
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ data:
- action: insert
key: k8s.namespace.name
value: ${K8S_NAMESPACE}
resource/add_mode:
attributes:
- action: insert
key: otelcol.service.mode
value: gateway
resource/logs:
attributes:
- action: upsert
Expand Down Expand Up @@ -199,6 +204,7 @@ data:
- batch
- resource/add_collector_k8s
- resourcedetection
- resource/add_mode
- resource/add_cluster_name
receivers:
- prometheus/collector
Expand Down
Loading

0 comments on commit 2f4ca14

Please sign in to comment.