-
Notifications
You must be signed in to change notification settings - Fork 774
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
[otlp] Add note on ilogger scopes #4818
[otlp] Add note on ilogger scopes #4818
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4818 +/- ##
==========================================
- Coverage 83.96% 83.95% -0.01%
==========================================
Files 293 293
Lines 11966 11966
==========================================
- Hits 10047 10046 -1
- Misses 1919 1920 +1
|
@@ -242,6 +246,28 @@ services.AddHttpClient( | |||
Note: The single instance returned by `HttpClientFactory` is reused by all | |||
export requests. | |||
|
|||
## Experimental features |
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.
@alanwest FYI I took this from your previous PR.
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.
categorize this into signals (logs, metrics sub-headings)
as attributes mapped as follows: | ||
* `CategoryName` maps to `dotnet.ilogger.category_name`. | ||
* `EventId` maps to two attributes `Id` and `Name` representing `Event.Id` and | ||
`EventId.Name`, respectively. |
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.
Why is this EventId.Name
instead of Event.Name
(it seems super weird comparing with Event.Id
)?
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.
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.
I know but the names we have here sound wrong.
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.
There was a typo which I fixed. It should be EventId.Id
not Event.Id
. Sorry for the confusion
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.
There was a typo which I fixed. It should be
EventId.Id
notEvent.Id
. Sorry for the confusion
It's getting even worse.
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.
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.
I think @reyang is asking about the "attribute" key?
The attribute names are just "Id" and "Name" as per this doc.
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.
LGTM
Co-authored-by: Reiley Yang <reyang@microsoft.com>
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.
Need to sort out the names before introducing the experimental feature.
I have removed the experimental part to revisit it as separate todo |
@@ -82,6 +82,15 @@ Core](../../examples/AspNetCore/Program.cs) example app. Check this | |||
for configuring OpenTelemetry with `ILogger` for certain application types such | |||
as ASP.NET Core and .NET Worker. | |||
|
|||
**ILogger Scopes**: OTLP Log Exporter supports exporting ILogger scopes as | |||
Attributes. Scopes must be enabled at the SDK level using |
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.
Attributes. Scopes must be enabled at the SDK level using | |
attributes. Scopes must be enabled at the SDK level using |
Changes
Additional note on supporting ILogger scopes and special casing for attributes.