From f9c5e65ad45bd1b71fcdd314b7fc4f496e3293b9 Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Tue, 2 Jul 2024 10:36:15 +0200 Subject: [PATCH] feat: add namespace to faro receiver (#1108) * feat: add namespace to faro receiver This change adds the namespace field to the app meta. It's used to logically structure apps and will be used to facilitate a mapping to opentelemetry's service.namespace * changelog --- CHANGELOG.md | 1 + internal/component/faro/receiver/internal/payload/payload.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 761c842a2f..94f7394a92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Main (unreleased) ### Enhancements - Added a success rate panel on the Prometheus Components dashboard. (@thampiotr) +- Add namespace field to Faro payload (@cedricziel) ### Bugfixes diff --git a/internal/component/faro/receiver/internal/payload/payload.go b/internal/component/faro/receiver/internal/payload/payload.go index 7e4d626d5d..3b99af84b3 100644 --- a/internal/component/faro/receiver/internal/payload/payload.go +++ b/internal/component/faro/receiver/internal/payload/payload.go @@ -354,6 +354,7 @@ func (p Page) KeyVal() *KeyVal { // App holds metadata about the application event originates from type App struct { Name string `json:"name,omitempty"` + Namespace string `json:"namespace,omitempty"` Release string `json:"release,omitempty"` Version string `json:"version,omitempty"` Environment string `json:"environment,omitempty"` @@ -386,6 +387,7 @@ func (e Event) KeyVal() *KeyVal { func (a App) KeyVal() *KeyVal { kv := NewKeyVal() KeyValAdd(kv, "name", a.Name) + KeyValAdd(kv, "namespace", a.Namespace) KeyValAdd(kv, "release", a.Release) KeyValAdd(kv, "version", a.Version) KeyValAdd(kv, "environment", a.Environment)