Skip to content

Commit

Permalink
Segment: Add preset value for each event before sending to segment
Browse files Browse the repository at this point in the history
Preset value is only capured in the start command and if start command
fails as part of preflight test or even daemon not available phase then
this value is not available. We tried to map the preset data from amplitude
side and there is lot of `none` because some segment data (captured by
start action) doesn't have preset info. This PR make sure that each
events have preset value before sending it to segment.
  • Loading branch information
praveenkumar committed Jul 3, 2023
1 parent 8013005 commit 0a0a111
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/crc/segment/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (c *Client) upload(action string, a analytics.Properties) error {
if c.config.Get(crcConfig.ConsentTelemetry).AsString() != "yes" {
return nil
}
// Add preset value as property for each event before uploading to segment
preset := crcConfig.GetPreset(c.config)
a = a.Set("preset", preset)

identify := c.identifyNew()
hash, err := identifyHash(identify)
Expand Down

0 comments on commit 0a0a111

Please sign in to comment.