Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek authored and sumo-drosiek committed Feb 16, 2024
1 parent 6a4ae2a commit f7d8ccf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions pkg/exporter/sumologicexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ const (
DefaultClearLogsTimestamp bool = true
// DefaultLogKey defines default LogKey value
DefaultLogKey string = "log"
// DefaultAddTimestamp defines default AddTimestamp value
DefaultAddTimestamp bool = true
// DefaultTimestampKey defines default TimestampKey value
DefaultTimestampKey string = "timestamp"
// DefaultFlattenBody defines default FlattenBody value
DefaultFlattenBody bool = false
// DefaultDropRoutingAttribute defines default DropRoutingAttribute
DefaultDropRoutingAttribute string = ""
// DefaultStickySessionEnabled defines default StickySessionEnabled value
Expand Down
2 changes: 1 addition & 1 deletion pkg/exporter/sumologicexporter/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (s *sender) logToJSON(record plog.LogRecord) (string, error) {

// Only append the body when it's not empty to prevent sending 'null' log.
if body := recordCopy.Body(); !isEmptyAttributeValue(body) {
body.CopyTo(recordCopy.Attributes().PutEmpty("log"))
body.CopyTo(recordCopy.Attributes().PutEmpty(DefaultLogKey))
}

nextLine := new(bytes.Buffer)
Expand Down

0 comments on commit f7d8ccf

Please sign in to comment.