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] Expose logging SDK implementation as public #4568

Merged
merged 4 commits into from
Jun 9, 2023

Conversation

CodeBlanch
Copy link
Member

Relates to #4433

Changes

  • Exposes the logging implementation in OpenTelemetry and removes the added InternalsVisibleTos

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@CodeBlanch CodeBlanch requested a review from a team June 8, 2023 17:19
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #4568 (52f83a3) into main (2e57e2d) will decrease coverage by 0.07%.
The diff coverage is 53.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4568      +/-   ##
==========================================
- Coverage   85.19%   85.13%   -0.07%     
==========================================
  Files         320      320              
  Lines       12678    12679       +1     
==========================================
- Hits        10801    10794       -7     
- Misses       1877     1885       +8     
Impacted Files Coverage Δ
...metry.Exporter.Console/ConsoleLogRecordExporter.cs 0.00% <0.00%> (ø)
...metry/Logs/BatchExportLogRecordProcessorOptions.cs 100.00% <ø> (ø)
...ry/Logs/Builder/LoggerProviderBuilderExtensions.cs 97.91% <ø> (ø)
src/OpenTelemetry/Logs/LoggerProviderExtensions.cs 86.66% <ø> (ø)
...etryProtocol/Implementation/LogRecordExtensions.cs 92.50% <62.50%> (-2.80%) ⬇️
.../OpenTelemetry/Logs/ILogger/OpenTelemetryLogger.cs 86.23% <100.00%> (-1.50%) ⬇️
src/OpenTelemetry/Logs/LogRecord.cs 67.14% <100.00%> (ø)
src/OpenTelemetry/Sdk.cs 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

@@ -157,7 +160,7 @@ public ActivityTraceFlags TraceFlags
/// <summary>
/// Gets or sets the log <see cref="Microsoft.Extensions.Logging.LogLevel"/>.
/// </summary>
// todo: [Obsolete("Use Severity instead LogLevel will be removed in a future version.")]
[Obsolete("Use Severity instead LogLevel will be removed in a future version.")]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[Obsolete("Use Severity instead LogLevel will be removed in a future version.")]
[Obsolete("Use Severity instead LogLevel will be removed in a future release with a major version.")]

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 think a bit more discussion is needed around our strategy on this and then we can land a policy doc + update all the warnings we have sprinkled around?

/cc @alanwest

@CodeBlanch CodeBlanch merged commit d57e6f8 into open-telemetry:main Jun 9, 2023
@CodeBlanch CodeBlanch deleted the sdk-logs-public branch June 9, 2023 22:44
mfogliatto pushed a commit to mfogliatto/opentelemetry-dotnet that referenced this pull request Jun 10, 2023
* Obsoleted `LogRecord.LogLevel` in favor of the `LogRecord.Severity` property
which matches the [OpenTelemetry Specification > Logs DataModel > Severity
definition](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitynumber).
([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433))
Copy link
Contributor

Choose a reason for hiding this comment

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

The PR number needs to be corrected.

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.

4 participants