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

[receiver/k8sobjects] ensure the k8s.namespace.name attribute is set for objects retrieved using the watch mode #36432

Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d1a9be1
[receiver/k8sobjects]: add k8s.namespace attribute to watched objects…
bacherfl Nov 18, 2024
1c977d2
update expectations
bacherfl Nov 18, 2024
7466582
add changelog entry
bacherfl Nov 19, 2024
95d8413
fix changelog type
bacherfl Nov 19, 2024
9227b9d
fix linting
bacherfl Nov 19, 2024
691a8f4
fix unit test
bacherfl Nov 19, 2024
1f4c570
fix linting
bacherfl Nov 19, 2024
00d8482
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Nov 19, 2024
87423bc
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Nov 19, 2024
8f16f2d
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Nov 22, 2024
3c648f6
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Nov 26, 2024
3f483ac
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Nov 28, 2024
07a8851
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Dec 2, 2024
9ff388f
undo structural changes to log bodies
bacherfl Dec 3, 2024
5372fcf
undo changes to transform processor
bacherfl Dec 3, 2024
1baf90e
re-add newlines
bacherfl Dec 3, 2024
11f5383
adapt changelog entry
bacherfl Dec 3, 2024
15d7cc6
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Dec 4, 2024
3d57869
revert unneeded changes
bacherfl Dec 5, 2024
fbce0dc
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Dec 9, 2024
de12a7d
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Dec 10, 2024
40b828c
remove unused import
bacherfl Dec 10, 2024
c258815
Merge branch 'main' into fix/36352/k8sobjects-namespace
bacherfl Dec 19, 2024
5b405b5
Merge branch 'main' into fix/36352/k8sobjects-namespace
ChrsMark Dec 20, 2024
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
Prev Previous commit
Next Next commit
revert unneeded changes
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
  • Loading branch information
bacherfl committed Dec 5, 2024
commit 3d57869486a9b359230b90336a9a334a4e0e2569
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
Loading