-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs: Support parsing State & Scopes and capture of formatted Message #1869
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,14 +17,28 @@ | |||||
#if NET461 || NETSTANDARD2_0 | ||||||
using System; | ||||||
using System.Collections.Generic; | ||||||
using Microsoft.Extensions.Logging; | ||||||
|
||||||
namespace OpenTelemetry.Logs | ||||||
{ | ||||||
public class OpenTelemetryLoggerOptions | ||||||
{ | ||||||
internal readonly List<BaseProcessor<LogRecord>> Processors = new List<BaseProcessor<LogRecord>>(); | ||||||
|
||||||
/// <summary> | ||||||
/// Gets or sets a value indicating whether or not log scopes should be included on generated <see cref="LogRecord"/>s. Default value: False. | ||||||
/// </summary> | ||||||
public bool IncludeScopes { get; set; } | ||||||
|
||||||
/// <summary> | ||||||
/// Gets or sets a value indicating whether or not log message should be included on generated <see cref="LogRecord"/>s. Default value: False. | ||||||
CodeBlanch marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
/// </summary> | ||||||
public bool IncludeMessage { get; set; } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think IncludeFormattedMessage is a better name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good. What about |
||||||
|
||||||
/// <summary> | ||||||
/// Gets or sets a value indicating whether or not log state should be parsed into <see cref="LogRecord.StateValues"/> on generated <see cref="LogRecord"/>s. Default value: False. | ||||||
CodeBlanch marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
/// </summary> | ||||||
public bool ParseStateValues { get; set; } | ||||||
|
||||||
/// <summary> | ||||||
/// Adds processor to the options. | ||||||
/// </summary> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion - my personal preference would be splitting this into two "if" statements. In this way it is easier to put breakpoint on the selected return statement instead of putting a condition-breakpoint (which is much slower since it uses debugger expression-evaluation engine).