mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: move span k8s tag to root (#226)
This commit is contained in:
parent
dc88a59da6
commit
3e885bfa2c
2 changed files with 24 additions and 0 deletions
6
.changeset/tall-panthers-travel.md
Normal file
6
.changeset/tall-panthers-travel.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@hyperdx/api': patch
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
fix: move span k8s tags to root
|
||||
|
|
@ -635,6 +635,24 @@ if is_object(.r) {
|
|||
.b.process = tmp_process
|
||||
.b.__events = .r.logs
|
||||
|
||||
# TODO: maybe we want to move "tag" to the root level
|
||||
# extract k8s tags
|
||||
if !is_nullish(.b.process.tag."k8s.pod.name") {
|
||||
.b."k8s.pod.name" = del(.b.process.tag."k8s.pod.name")
|
||||
}
|
||||
if !is_nullish(.b.process.tag."k8s.pod.uid") {
|
||||
.b."k8s.pod.uid" = del(.b.process.tag."k8s.pod.uid")
|
||||
}
|
||||
if !is_nullish(.b.process.tag."k8s.namespace.name") {
|
||||
.b."k8s.namespace.name" = del(.b.process.tag."k8s.namespace.name")
|
||||
}
|
||||
if !is_nullish(.b.process.tag."k8s.node.name") {
|
||||
.b."k8s.node.name" = del(.b.process.tag."k8s.node.name")
|
||||
}
|
||||
if !is_nullish(.b.process.tag."k8s.deployment.name") {
|
||||
.b."k8s.deployment.name" = del(.b.process.tag."k8s.deployment.name")
|
||||
}
|
||||
|
||||
if (.b."span.kind" == "server") {
|
||||
if (exists(.b."http.status_code") && exists(.b."http.method") && exists(.b."http.route")) {
|
||||
.b._hdx_body = join([
|
||||
|
|
|
|||
Loading…
Reference in a new issue