Skip to content

Commit

Permalink
fix(k8stagger)!: change default pod id attribute name to k8s.pod.uid
Browse files Browse the repository at this point in the history
The previous name was k8s.pod.id.
  • Loading branch information
aboguszewski-sumo committed Dec 27, 2023
1 parent 433eff7 commit c71c15e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions .changelog/1401.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix(k8stagger)!: change default pod id attribute name to k8s.pod.uid
19 changes: 18 additions & 1 deletion docs/upgrading.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Upgrading

- [Upgrading](#upgrading)
- [Upgrading to v0.90.1-sumo-0](#upgrading-to-v0910-sumo-0)
- [Upgrading to v0.91.0-sumo-0](#upgrading-to-v0910-sumo-0)
- [Sumo Logic Schema processor replaced with Sumo Logic processor](#sumo-logic-schema-processor-replaced-with-sumo-logic-processor)
- [`k8s_tagger` processor: default name of podID attribute has changed](#k8s_tagger-processor-default-name-of-podid-attribute-has-changed)
- [Upgrading to v0.90.1-sumo-0](#upgrading-to-v0901-sumo-0)
- [Change configuration for `syslogexporter`](#change-configuration-for-syslogexporter)
- [`sumologic` exporter: deprecate `clear_logs_timestamp`](#sumologic-exporter-deprecate-clear_logs_timestamp)
- [`sumologic` exporter: remove `routing_attributes_to_drop`](#sumologic-exporter-remove-routing_attributes_to_drop)
Expand Down Expand Up @@ -77,6 +80,20 @@ service:
[sumologicschema]: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/processor/sumologicschemaprocessor
[sumologicprocessor]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/sumologicprocessor
### `k8s_tagger` processor: default name of podID attribute has changed

By a mistake, in the [k8s_tagger][k8staggerprocessor], the default name for podID was set to `k8s.pod.id`. It has been changed to `k8s.pod.uid`.
If you want to still use the old name, add the following option to the config of the `k8s_tagger`:

```yaml
processors:
k8s_tagger:
tags:
podID: k8s.pod.id
```

[k8staggerprocessor]: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/processor/k8sprocessor

## Upgrading to v0.90.1-sumo-0

### Change configuration for `syslogexporter`
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/k8sprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ processors:
jobName: k8s.job.name
namespaceName: k8s.namespace.name
nodeName: k8s.node.name
podID: k8s.pod.id
podID: k8s.pod.uid
podName: k8s.pod.name
replicaSetName: k8s.replicaset.name
serviceName: k8s.service.name
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/k8sprocessor/kube/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ func TestExtractionRules(t *testing.T) {
"k8s.container.name": "auth-service-container-name",
"k8s.deployment.name": "dearest-deploy",
"k8s.pod.hostname": "auth-hostname3",
"k8s.pod.id": "33333",
"k8s.pod.uid": "33333",
"k8s.pod.name": "auth-service-abc12-xyz3",
"k8s.pod.startTime": pod.GetCreationTimestamp().String(),
"k8s.replicaset.name": "dearest-deploy-77c99ccb96",
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/k8sprocessor/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
defaultTagCronJobName = "k8s.cronjob.name"
defaultTagJobName = "k8s.job.name"
defaultTagNodeName = "k8s.node.name"
defaultTagPodUID = "k8s.pod.id"
defaultTagPodUID = "k8s.pod.uid"
defaultTagReplicaSetName = "k8s.replicaset.name"
defaultTagServiceName = "k8s.service.name"
defaultTagStatefulSetName = "k8s.statefulset.name"
Expand Down

0 comments on commit c71c15e

Please sign in to comment.