@@ -36,6 +36,7 @@ type Event struct {
36
36
IsAnonymous bool `json:"is_anonymous"`
37
37
UserID string `json:"user_id,omitempty"`
38
38
GroupID string `json:"group_id,omitempty"`
39
+ TenantID string `json:"tenant_id,omitempty"`
39
40
IP net.IP `json:"ip,omitempty"`
40
41
UserAgent string `json:"user_agent,omitempty"`
41
42
Locale string `json:"locale,omitempty"`
@@ -85,6 +86,7 @@ func injectEventToFlatMap(e Event, flatten map[string]string) {
85
86
flatten ["event.is_anonymous" ] = strconv .FormatBool (e .IsAnonymous )
86
87
flatten ["event.user_id" ] = e .UserID
87
88
flatten ["event.group_id" ] = e .GroupID
89
+ flatten ["event.tenant_id" ] = e .TenantID
88
90
flatten ["event.ip" ] = e .IP .String ()
89
91
flatten ["event.user_agent" ] = e .UserAgent
90
92
flatten ["event.locale" ] = e .Locale
@@ -158,6 +160,8 @@ func extractEventFromBaggage(b baggage.Baggage) Event {
158
160
e .UserID = b .Member ("event.user_id" ).Value ()
159
161
case "group_id" :
160
162
e .GroupID = b .Member ("event.group_id" ).Value ()
163
+ case "tenant_id" :
164
+ e .TenantID = b .Member ("event.tenant_id" ).Value ()
161
165
case "ip" :
162
166
e .IP = net .ParseIP (b .Member ("event.ip" ).Value ())
163
167
case "user_agent" :
0 commit comments