Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
ThiagoBarradas committed Feb 3, 2021
2 parents 5de47a7 + f71ebd3 commit 493750f
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ This sink adds four additional properties:
* `application` holds the value from `applicationName`
* `level` is the actual log level of the event.
* `stack_trace` holds the stack trace portion of an exception.
* `exception` holds the `.toString()` of an exception.

If `newrelic.linkingmetadata` property is present in an event, it will be unrolled into individual NewRelic properties used for "logs in context".

Original file line number Diff line number Diff line change
@@ -40,6 +40,10 @@ public NewRelicLogItem(LogEvent logEvent, IFormatProvider formatProvider)
this.Message = logEvent.RenderMessage(formatProvider);
this.Attributes.Add("level", logEvent.Level.ToString());
this.Attributes.Add("stack_trace", logEvent.Exception?.StackTrace ?? "");
if (logEvent.Exception != null)
{
this.Attributes.Add("exception", logEvent.Exception.ToString() ?? "");
}

foreach (var property in logEvent.Properties)
{

0 comments on commit 493750f

Please sign in to comment.