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

[processor/k8sattributes] rename k8sattributes processor internal metrics #23369

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .chloggen/k8sattribute-rename-metric.yaml
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
Expand Down