Skip to content

Commit

Permalink
fix: add refinery version to refinery metric and log (#899)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

- #847

## Short description of the changes

This PR adds `refinery_version` to both legacy metrics and honeycomb
logger.

Example of the newly added field:


![Screenshot 2023-11-13 at 2 15 37
PM](https://github.com/honeycombio/refinery/assets/22300958/13f588e9-f1d2-4dfe-96e4-995cd44447e6)
![Screenshot 2023-11-13 at 2 15 13
PM](https://github.com/honeycombio/refinery/assets/22300958/be67a329-4f9b-467f-876d-ab1b52458869)
  • Loading branch information
VinozzZ authored Nov 13, 2023
1 parent bb92f71 commit 0db9133
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions logger/honeycomb.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func (h *HoneycombLogger) Start() error {
}
h.libhClient = libhClient

h.libhClient.AddField("refinery_version", h.Version)
if hostname, err := os.Hostname(); err == nil {
h.libhClient.AddField("hostname", hostname)
}
Expand Down
1 change: 1 addition & 0 deletions metrics/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func (h *LegacyMetrics) initLibhoney(mc config.LegacyMetricsConfig) error {
}
h.libhClient = libhClient

h.libhClient.AddField("refinery_version", h.Version)
// add some general go metrics to every report
// goroutines
if hostname, err := os.Hostname(); err == nil {
Expand Down

0 comments on commit 0db9133

Please sign in to comment.