Skip to content

Commit

Permalink
revert unneeded changes
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl committed Dec 5, 2024
1 parent 15d7cc6 commit 3d57869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/k8sobjectsreceiver/unstructured_to_logdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
semconv "go.opentelemetry.io/collector/semconv/v1.13.0"
semconv "go.opentelemetry.io/collector/semconv/v1.9.0"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/watch"
)
Expand Down Expand Up @@ -86,7 +86,7 @@ func getNamespace(e unstructured.Unstructured) string {
return namespace
}
// try to look up namespace in object.metadata.namespace (for objects reported via watch mode)
if namespace, ok, _ := unstructured.NestedString(e.Object, "object", "metadata", "namespace"); ok && namespace != "" {
if namespace, ok, _ := unstructured.NestedString(e.Object, "object", "metadata", "namespace"); ok {
return namespace
}
return ""
Expand Down

0 comments on commit 3d57869

Please sign in to comment.