Skip to content

Reenable include scopes by default#399

Merged
stevejgordon merged 2 commits into
mainfrom
include-scopes
Apr 2, 2026
Merged

Reenable include scopes by default#399
stevejgordon merged 2 commits into
mainfrom
include-scopes

Conversation

@stevejgordon
Copy link
Copy Markdown
Contributor

@stevejgordon stevejgordon commented Apr 2, 2026

Now that the EDOT collector and managed OTLP handle duplicates, this is safe to use and ensures richer log messages by default.

Closes #380

@stevejgordon stevejgordon requested a review from a team as a code owner April 2, 2026 12:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 59ceb2a2-955e-4864-af12-07f4bfb55860

📥 Commits

Reviewing files that changed from the base of the PR and between 1a1f1b5 and 5609e14.

📒 Files selected for processing (5)
  • examples/Example.MinimalApi/Program.cs
  • src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs
  • src/Elastic.OpenTelemetry.Core/Extensions/OpenTelemetryLoggerOptionsExtensions.cs
  • src/Elastic.OpenTelemetry/Extensions/LoggerProviderBuilderExtensions.cs
  • tests/Elastic.OpenTelemetry.Tests/Diagnostics/event-id-snapshot.json
💤 Files with no reviewable changes (3)
  • tests/Elastic.OpenTelemetry.Tests/Diagnostics/event-id-snapshot.json
  • src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs
  • src/Elastic.OpenTelemetry/Extensions/LoggerProviderBuilderExtensions.cs

📝 Walkthrough

Walkthrough

This pull request enables logging scopes in OpenTelemetry by setting IncludeScopes = true in the logger options extension, removing the prior intentionally-disabled state. The warning message that detected this configuration has been removed from the logger message definitions. The example minimal API handler was updated to inject a typed ILogger directly instead of an ILoggerFactory, and now demonstrates scope usage with a TransactionId value. The related runtime check for ASP.NET Core presence and conditional warning emission has been removed from the logger provider builder configuration.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch include-scopes
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@stevejgordon stevejgordon requested a review from a team April 2, 2026 13:16
@stevejgordon stevejgordon merged commit a583521 into main Apr 2, 2026
13 of 14 checks passed
@stevejgordon stevejgordon deleted the include-scopes branch April 2, 2026 14:52
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.

Re-enable log scopes (by default)

2 participants