diff --git a/.chloggen/k8sattribute-rename-metric.yaml b/.chloggen/k8sattribute-rename-metric.yaml new file mode 100755 index 000000000000..603cc48ad61b --- /dev/null +++ b/.chloggen/k8sattribute-rename-metric.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. +# If your change doesn't affect end users, such as a test fix or a tooling change, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: processor/k8sattributes + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: rename k8sattributes processor internal metrics + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [2322] + +# (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: diff --git a/processor/k8sattributesprocessor/internal/observability/observability.go b/processor/k8sattributesprocessor/internal/observability/observability.go index 1bb486788b43..e7ee543da68a 100644 --- a/processor/k8sattributesprocessor/internal/observability/observability.go +++ b/processor/k8sattributesprocessor/internal/observability/observability.go @@ -27,17 +27,17 @@ func init() { } var ( - mPodsUpdated = stats.Int64("otelsvc/k8s/pod_updated", "Number of pod update events received", "1") - mPodsAdded = stats.Int64("otelsvc/k8s/pod_added", "Number of pod add events received", "1") - mPodsDeleted = stats.Int64("otelsvc/k8s/pod_deleted", "Number of pod delete events received", "1") - mPodTableSize = stats.Int64("otelsvc/k8s/pod_table_size", "Size of table containing pod info", "1") - mIPLookupMiss = stats.Int64("otelsvc/k8s/ip_lookup_miss", "Number of times pod by IP lookup failed.", "1") - mNamespacesUpdated = stats.Int64("otelsvc/k8s/namespace_updated", "Number of namespace update events received", "1") - mNamespacesAdded = stats.Int64("otelsvc/k8s/namespace_added", "Number of namespace add events received", "1") - mNamespacesDeleted = stats.Int64("otelsvc/k8s/namespace_deleted", "Number of namespace delete events received", "1") - mReplicaSetsUpdated = stats.Int64("otelsvc/k8s/replicaset_updated", "Number of ReplicaSet update events received", "1") - mReplicaSetsAdded = stats.Int64("otelsvc/k8s/replicaset_added", "Number of ReplicaSet add events received", "1") - mReplicaSetsDeleted = stats.Int64("otelsvc/k8s/replicaset_deleted", "Number of ReplicaSet delete events received", "1") + mPodsUpdated = stats.Int64("processor.k8sattributes.pods.updated", "Number of pod update events received", "1") + mPodsAdded = stats.Int64("processor.k8sattributes.pods.added", "Number of pod add events received", "1") + mPodsDeleted = stats.Int64("processor.k8sattributes.pods.deleted", "Number of pod delete events received", "1") + mPodTableSize = stats.Int64("processor.k8sattributes.pods.table_size", "Size of table containing pod info", "1") + mIPLookupMiss = stats.Int64("processor.k8sattributes.ip_lookup_misses", "Number of times pod by IP lookup failed.", "1") + mNamespacesUpdated = stats.Int64("processor.k8sattributes.namespaces.updated", "Number of namespace update events received", "1") + mNamespacesAdded = stats.Int64("processor.k8sattributes.namespaces.added", "Number of namespace add events received", "1") + mNamespacesDeleted = stats.Int64("processor.k8sattributes.namespaces.deleted", "Number of namespace delete events received", "1") + mReplicaSetsUpdated = stats.Int64("processor.k8sattributes.replicasets.updated", "Number of ReplicaSet update events received", "1") + mReplicaSetsAdded = stats.Int64("processor.k8sattributes.replicasets.added", "Number of ReplicaSet add events received", "1") + mReplicaSetsDeleted = stats.Int64("processor.k8sattributes.replicasets.deleted", "Number of ReplicaSet delete events received", "1") ) var viewPodsUpdated = &view.View{ diff --git a/processor/k8sattributesprocessor/internal/observability/observability_test.go b/processor/k8sattributesprocessor/internal/observability/observability_test.go index ff8d26e29288..72031e19a68b 100644 --- a/processor/k8sattributesprocessor/internal/observability/observability_test.go +++ b/processor/k8sattributesprocessor/internal/observability/observability_test.go @@ -61,31 +61,31 @@ func TestMetrics(t *testing.T) { } tests := []testCase{ { - "otelsvc/k8s/pod_added", + "processor.k8sattributes.pods.added", RecordPodAdded, }, { - "otelsvc/k8s/pod_deleted", + "processor.k8sattributes.pods.deleted", RecordPodDeleted, }, { - "otelsvc/k8s/pod_updated", + "processor.k8sattributes.pods.updated", RecordPodUpdated, }, { - "otelsvc/k8s/ip_lookup_miss", + "processor.k8sattributes.ip_lookup_misses", RecordIPLookupMiss, }, { - "otelsvc/k8s/namespace_added", + "processor.k8sattributes.namespaces.added", RecordNamespaceAdded, }, { - "otelsvc/k8s/namespace_updated", + "processor.k8sattributes.namespaces.updated", RecordNamespaceUpdated, }, { - "otelsvc/k8s/namespace_deleted", + "processor.k8sattributes.namespaces.deleted", RecordNamespaceDeleted, }, }