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

[k8sclusterreceiver] remove opencensus.resourcetype resource attribute #27616

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
27 changes: 27 additions & 0 deletions .chloggen/k8sclusterreceiver-opencensus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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: k8sclusterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Remove opencensus.resourcetype resource attribute"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [26487]

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,5 @@ Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4
| k8s.resourcequota.uid | The k8s resourcequota uid. | Any Str | true |
| k8s.statefulset.name | The k8s statefulset name. | Any Str | true |
| k8s.statefulset.uid | The k8s statefulset uid. | Any Str | true |
| opencensus.resourcetype | The OpenCensus resource type. | Any Str | false |
| openshift.clusterquota.name | The k8s ClusterResourceQuota name. | Any Str | true |
| openshift.clusterquota.uid | The k8s ClusterResourceQuota uid. | Any Str | true |
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, crq *quotav1.ClusterResourceQuot
rb := mb.NewResourceBuilder()
rb.SetOpenshiftClusterquotaName(crq.Name)
rb.SetOpenshiftClusterquotaUID(string(crq.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func RecordSpecMetrics(logger *zap.Logger, mb *imetadata.MetricsBuilder, c corev
rb.SetK8sPodName(pod.Name)
rb.SetK8sNodeName(pod.Spec.NodeName)
rb.SetK8sNamespaceName(pod.Namespace)
rb.SetOpencensusResourcetype("container")
rb.SetContainerID(utils.StripContainerID(containerID))
rb.SetK8sContainerName(c.Name)
image, err := docker.ParseImageName(imageStr)
Expand Down
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/internal/cronjob/cronjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, cj *batchv1.CronJob, ts pcommon.
rb.SetK8sNamespaceName(cj.Namespace)
rb.SetK8sCronjobUID(string(cj.UID))
rb.SetK8sCronjobName(cj.Name)
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, ds *appsv1.DaemonSet, ts pcommon
rb.SetK8sNamespaceName(ds.Namespace)
rb.SetK8sDaemonsetName(ds.Name)
rb.SetK8sDaemonsetUID(string(ds.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func RecordMetrics(mb *imetadata.MetricsBuilder, dep *appsv1.Deployment, ts pcom
rb.SetK8sDeploymentName(dep.Name)
rb.SetK8sDeploymentUID(string(dep.UID))
rb.SetK8sNamespaceName(dep.Namespace)
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/internal/jobs/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, j *batchv1.Job, ts pcommon.Times
rb.SetK8sNamespaceName(j.Namespace)
rb.SetK8sJobName(j.Name)
rb.SetK8sJobUID(string(j.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ all_set:
enabled: true
k8s.statefulset.uid:
enabled: true
opencensus.resourcetype:
enabled: true
openshift.clusterquota.name:
enabled: true
openshift.clusterquota.uid:
Expand Down Expand Up @@ -303,8 +301,6 @@ none_set:
enabled: false
k8s.statefulset.uid:
enabled: false
opencensus.resourcetype:
enabled: false
openshift.clusterquota.name:
enabled: false
openshift.clusterquota.uid:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func RecordMetrics(mb *imetadata.MetricsBuilder, ns *corev1.Namespace, ts pcommo
rb := mb.NewResourceBuilder()
rb.SetK8sNamespaceUID(string(ns.UID))
rb.SetK8sNamespaceName(ns.Name)
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(imetadata.WithResource(rb.Emit()))
}

Expand Down
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/internal/node/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func CustomMetrics(set receiver.CreateSettings, rb *metadata.ResourceBuilder, no

rb.SetK8sNodeUID(string(node.UID))
rb.SetK8sNodeName(node.Name)
rb.SetOpencensusResourcetype("k8s")
rb.SetK8sKubeletVersion(node.Status.NodeInfo.KubeletVersion)
rb.SetK8sKubeproxyVersion(node.Status.NodeInfo.KubeProxyVersion)
rb.Emit().MoveTo(rm.Resource())
Expand Down
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/internal/pod/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func RecordMetrics(logger *zap.Logger, mb *metadata.MetricsBuilder, pod *corev1.
rb.SetK8sNodeName(pod.Spec.NodeName)
rb.SetK8sPodName(pod.Name)
rb.SetK8sPodUID(string(pod.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))

for _, c := range pod.Spec.Containers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, rs *appsv1.ReplicaSet, ts pcommo
rb.SetK8sNamespaceName(rs.Namespace)
rb.SetK8sReplicasetName(rs.Name)
rb.SetK8sReplicasetUID(string(rs.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func RecordMetrics(mb *metadata.MetricsBuilder, rc *corev1.ReplicationController
rb.SetK8sNamespaceName(rc.Namespace)
rb.SetK8sReplicationcontrollerName(rc.Name)
rb.SetK8sReplicationcontrollerUID(string(rc.UID))
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ func RecordMetrics(mb *metadata.MetricsBuilder, rq *corev1.ResourceQuota, ts pco
rb.SetK8sResourcequotaUID(string(rq.UID))
rb.SetK8sResourcequotaName(rq.Name)
rb.SetK8sNamespaceName(rq.Namespace)
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(metadata.WithResource(rb.Emit()))
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func RecordMetrics(mb *imetadata.MetricsBuilder, ss *appsv1.StatefulSet, ts pcom
rb.SetK8sStatefulsetUID(string(ss.UID))
rb.SetK8sStatefulsetName(ss.Name)
rb.SetK8sNamespaceName(ss.Namespace)
rb.SetOpencensusResourcetype("k8s")
mb.EmitForResource(imetadata.WithResource(rb.Emit()))
}

Expand Down
7 changes: 0 additions & 7 deletions receiver/k8sclusterreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,6 @@ resource_attributes:
type: string
enabled: true

opencensus.resourcetype:
description: The OpenCensus resource type.
type: string
enabled: false
warnings:
if_configured: This resource_attribute is deprecated and will be removed soon.

attributes:
k8s.namespace.name:
description: The k8s namespace name.
Expand Down