mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
feat: allow users to specify 'service.name' attr (flyio) (#169)
This commit is contained in:
parent
58d928cd7b
commit
b8133eb46f
2 changed files with 13 additions and 1 deletions
6
.changeset/selfish-penguins-yell.md
Normal file
6
.changeset/selfish-penguins-yell.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@hyperdx/api': patch
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
feat: allow users to specify 'service.name' attr (flyio)
|
||||
|
|
@ -303,13 +303,19 @@ if .hdx_platform == "vector-internal" {
|
|||
if tmp_level != "info" {
|
||||
.st = tmp_level
|
||||
}
|
||||
.sv = .b.fly.app.name
|
||||
.ts = to_unix_timestamp(parse_timestamp(.b.timestamp, format: "%+") ?? now(), unit: "nanoseconds")
|
||||
.b._hdx_body = .b.message
|
||||
structured = parse_json(.b.message) ?? null
|
||||
if is_object(structured) {
|
||||
.b = merge(.b, structured, deep: true) ?? .b
|
||||
}
|
||||
|
||||
# use user-specifed service name by default
|
||||
.sv = .b."service.name"
|
||||
if is_nullish(.sv) {
|
||||
.sv = .b.fly.app.name
|
||||
}
|
||||
|
||||
# TODO: maybe move this to post_logs
|
||||
if !is_nullish(.b.message) {
|
||||
.b._hdx_body = .b.message
|
||||
|
|
|
|||
Loading…
Reference in a new issue