Skip to content

Commit cd440d1

Browse files
committed
rename k8sattributes processor internal metrics
Signed-off-by: Ziqi Zhao <[email protected]>
1 parent 16df49f commit cd440d1

File tree

3 files changed

+38
-18
lines changed

3 files changed

+38
-18
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use this changelog template to create an entry for release notes.
2+
# If your change doesn't affect end users, such as a test fix or a tooling change,
3+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
4+
5+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
6+
change_type: breaking
7+
8+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
9+
component: processor/k8sattributes
10+
11+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
12+
note: rename k8sattributes processor internal metrics
13+
14+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
15+
issues: [2322]
16+
17+
# (Optional) One or more lines of additional information to render under the primary note.
18+
# These lines will be padded with 2 spaces and then inserted directly into the document.
19+
# Use pipe (|) for multiline entries.
20+
subtext:

processor/k8sattributesprocessor/internal/observability/observability.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ func init() {
2727
}
2828

2929
var (
30-
mPodsUpdated = stats.Int64("otelsvc/k8s/pod_updated", "Number of pod update events received", "1")
31-
mPodsAdded = stats.Int64("otelsvc/k8s/pod_added", "Number of pod add events received", "1")
32-
mPodsDeleted = stats.Int64("otelsvc/k8s/pod_deleted", "Number of pod delete events received", "1")
33-
mPodTableSize = stats.Int64("otelsvc/k8s/pod_table_size", "Size of table containing pod info", "1")
34-
mIPLookupMiss = stats.Int64("otelsvc/k8s/ip_lookup_miss", "Number of times pod by IP lookup failed.", "1")
35-
mNamespacesUpdated = stats.Int64("otelsvc/k8s/namespace_updated", "Number of namespace update events received", "1")
36-
mNamespacesAdded = stats.Int64("otelsvc/k8s/namespace_added", "Number of namespace add events received", "1")
37-
mNamespacesDeleted = stats.Int64("otelsvc/k8s/namespace_deleted", "Number of namespace delete events received", "1")
38-
mReplicaSetsUpdated = stats.Int64("otelsvc/k8s/replicaset_updated", "Number of ReplicaSet update events received", "1")
39-
mReplicaSetsAdded = stats.Int64("otelsvc/k8s/replicaset_added", "Number of ReplicaSet add events received", "1")
40-
mReplicaSetsDeleted = stats.Int64("otelsvc/k8s/replicaset_deleted", "Number of ReplicaSet delete events received", "1")
30+
mPodsUpdated = stats.Int64("processor.k8sattributes.pods.updated", "Number of pod update events received", "1")
31+
mPodsAdded = stats.Int64("processor.k8sattributes.pods.added", "Number of pod add events received", "1")
32+
mPodsDeleted = stats.Int64("processor.k8sattributes.pods.deleted", "Number of pod delete events received", "1")
33+
mPodTableSize = stats.Int64("processor.k8sattributes.pods.table_size", "Size of table containing pod info", "1")
34+
mIPLookupMiss = stats.Int64("processor.k8sattributes.ip_lookup_misses", "Number of times pod by IP lookup failed.", "1")
35+
mNamespacesUpdated = stats.Int64("processor.k8sattributes.namespaces.updated", "Number of namespace update events received", "1")
36+
mNamespacesAdded = stats.Int64("processor.k8sattributes.namespaces.added", "Number of namespace add events received", "1")
37+
mNamespacesDeleted = stats.Int64("processor.k8sattributes.namespaces.deleted", "Number of namespace delete events received", "1")
38+
mReplicaSetsUpdated = stats.Int64("processor.k8sattributes.replicasets.updated", "Number of ReplicaSet update events received", "1")
39+
mReplicaSetsAdded = stats.Int64("processor.k8sattributes.replicasets.added", "Number of ReplicaSet add events received", "1")
40+
mReplicaSetsDeleted = stats.Int64("processor.k8sattributes.replicasets.deleted", "Number of ReplicaSet delete events received", "1")
4141
)
4242

4343
var viewPodsUpdated = &view.View{

processor/k8sattributesprocessor/internal/observability/observability_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -61,31 +61,31 @@ func TestMetrics(t *testing.T) {
6161
}
6262
tests := []testCase{
6363
{
64-
"otelsvc/k8s/pod_added",
64+
"processor.k8sattributes.pods.added",
6565
RecordPodAdded,
6666
},
6767
{
68-
"otelsvc/k8s/pod_deleted",
68+
"processor.k8sattributes.pods.deleted",
6969
RecordPodDeleted,
7070
},
7171
{
72-
"otelsvc/k8s/pod_updated",
72+
"processor.k8sattributes.pods.updated",
7373
RecordPodUpdated,
7474
},
7575
{
76-
"otelsvc/k8s/ip_lookup_miss",
76+
"processor.k8sattributes.ip_lookup_misses",
7777
RecordIPLookupMiss,
7878
},
7979
{
80-
"otelsvc/k8s/namespace_added",
80+
"processor.k8sattributes.namespaces.added",
8181
RecordNamespaceAdded,
8282
},
8383
{
84-
"otelsvc/k8s/namespace_updated",
84+
"processor.k8sattributes.namespaces.updated",
8585
RecordNamespaceUpdated,
8686
},
8787
{
88-
"otelsvc/k8s/namespace_deleted",
88+
"processor.k8sattributes.namespaces.deleted",
8989
RecordNamespaceDeleted,
9090
},
9191
}

0 commit comments

Comments
 (0)