Skip to content

Commit

Permalink
feat: add namespace to faro receiver (#1108)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cedricziel committed Jul 2, 2024
1 parent 5d7b707 commit f9c5e65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions internal/component/faro/receiver/internal/payload/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f9c5e65

Please sign in to comment.