Skip to content
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

[sdk-logs] Update LogRecord for Logger API additions #4456

Merged

Conversation

CodeBlanch
Copy link
Member

Relates to #4433

Changes

  • Updates LogRecord for additions of Logger, SeverityText, and Severity.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated

@CodeBlanch CodeBlanch requested a review from a team April 28, 2023 22:34
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #4456 (ff0db7d) into main (3884bee) will decrease coverage by 0.06%.
The diff coverage is 62.50%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4456      +/-   ##
==========================================
- Coverage   83.41%   83.35%   -0.06%     
==========================================
  Files         313      313              
  Lines       12485    12512      +27     
==========================================
+ Hits        10414    10430      +16     
- Misses       2071     2082      +11     
Impacted Files Coverage Δ
src/OpenTelemetry/Logs/LoggerSdk.cs 0.00% <0.00%> (ø)
src/OpenTelemetry/Logs/LogRecord.cs 62.58% <33.33%> (-2.30%) ⬇️
.../OpenTelemetry/Logs/ILogger/OpenTelemetryLogger.cs 87.75% <84.21%> (-1.00%) ⬇️

... and 3 files with indirect coverage changes

/// <summary>
/// Gets or sets the log <see cref="LogRecordSeverity"/>.
/// </summary>
internal LogRecordSeverity? Severity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nullable or just Unspecified?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like Nullable is more the .NET way for saying a value type is unspecified but originally I didn't have LogRecordSeverity.Unspecified defined 🤣 If you think it would be better to just default to that and drop Nullable I'm good with it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok leaving this for now. Good question though.. I think we should opt for one or the other: nullable or Unspecified. I think I'll open an issue where we can capture a punch list of small questions like this for us to circle back to before we declare stable.

@alanwest alanwest merged commit 455b9a8 into open-telemetry:main May 2, 2023
@CodeBlanch CodeBlanch deleted the sdk-logs-logrecord-updates branch May 2, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants