Skip to content

Commit

Permalink
Add omitempty for serviceName
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Aug 24, 2023
1 parent a47157d commit 8c542e4
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions logging/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ type Element struct {

// Resource is a logging resource
type Resource struct {
ResourceType string `json:"resourceType"` // LogEvent
ID string `json:"id"` // 7f4c85a8-e472-479f-b772-2916353d02a4
ApplicationName string `json:"applicationName"` // OPS
EventID string `json:"eventId"` // 110114
Category string `json:"category"` // TRACELOG
Component string `json:"component"` // "TEST"
TransactionID string `json:"transactionId"` // 2abd7355-cbdd-43e1-b32a-43ec19cd98f0
ServiceName string `json:"serviceName"` // OPS
ApplicationInstance string `json:"applicationInstance"` // INST-00002
ApplicationVersion string `json:"applicationVersion"` // 1.0.0
OriginatingUser string `json:"originatingUser"` // SomeUser
ServerName string `json:"serverName"` // app.example.com
LogTime string `json:"logTime"` // 2017-01-31T08:00:00Z
Severity string `json:"severity"` // INFO
TraceID string `json:"traceId,omitempty"` // xxx
SpanID string `json:"spanId,omitempty"` // yyy
LogData LogData `json:"logData"` // Log data
Custom json.RawMessage `json:"custom,omitempty"` // Custom log fields
ResourceType string `json:"resourceType"` // LogEvent
ID string `json:"id"` // 7f4c85a8-e472-479f-b772-2916353d02a4
ApplicationName string `json:"applicationName"` // OPS
EventID string `json:"eventId"` // 110114
Category string `json:"category"` // TRACELOG
Component string `json:"component"` // "TEST"
TransactionID string `json:"transactionId"` // 2abd7355-cbdd-43e1-b32a-43ec19cd98f0
ServiceName string `json:"serviceName,omitempty"` // OPS
ApplicationInstance string `json:"applicationInstance"` // INST-00002
ApplicationVersion string `json:"applicationVersion"` // 1.0.0
OriginatingUser string `json:"originatingUser"` // SomeUser
ServerName string `json:"serverName"` // app.example.com
LogTime string `json:"logTime"` // 2017-01-31T08:00:00Z
Severity string `json:"severity"` // INFO
TraceID string `json:"traceId,omitempty"` // xxx
SpanID string `json:"spanId,omitempty"` // yyy
LogData LogData `json:"logData"` // Log data
Custom json.RawMessage `json:"custom,omitempty"` // Custom log fields
Meta map[string]interface{} `json:"-"`
Error error `json:"-"`
}
Expand Down

0 comments on commit 8c542e4

Please sign in to comment.