Skip to content

[otlp] Add log exception attributes under feature flag#4892

Merged
CodeBlanch merged 21 commits into
open-telemetry:mainfrom
vishweshbankwar:vibankwa/reintroduce-exception-attributes
Oct 3, 2023
Merged

[otlp] Add log exception attributes under feature flag#4892
CodeBlanch merged 21 commits into
open-telemetry:mainfrom
vishweshbankwar:vibankwa/reintroduce-exception-attributes

Conversation

@vishweshbankwar

@vishweshbankwar vishweshbankwar commented Sep 26, 2023

Copy link
Copy Markdown
Member

Towards #4875
Design discussion issue #

Changes

Adds an experimental feature flag OTEL_DOTNET_EXPERIMENTAL_EMIT_EXCEPTION_LOG_ATTRIBUTES to allow exporting attributes corresponding to LogRecord.Exception to otlp endpoint.

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)

@codecov

codecov Bot commented Sep 26, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4892 (d17aa23) into main (b0038ae) will increase coverage by 0.18%.
The diff coverage is 96.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4892      +/-   ##
==========================================
+ Coverage   83.23%   83.41%   +0.18%     
==========================================
  Files         294      295       +1     
  Lines       12279    12294      +15     
==========================================
+ Hits        10220    10255      +35     
+ Misses       2059     2039      -20     
Flag Coverage Δ
unittests 83.41% <96.15%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...etryProtocol/Implementation/ExperimentalOptions.cs 100.00% <100.00%> (ø)
....Exporter.OpenTelemetryProtocol/OtlpLogExporter.cs 100.00% <100.00%> (+6.25%) ⬆️
...rotocol/Implementation/OtlpLogRecordTransformer.cs 87.34% <94.11%> (ø)

... and 7 files with indirect coverage changes

@vishweshbankwar vishweshbankwar marked this pull request as ready for review September 27, 2023 00:40
@vishweshbankwar vishweshbankwar requested a review from a team September 27, 2023 00:40
Comment thread src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md Outdated
Comment thread src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporter.cs Outdated
Comment on lines +5 to +10
* Added ability to export attributes corresponding to `LogRecord.Exception` i.e.
`exception.type`, `exception.message` and `exception.stacktrace`. These
attributes will be exported when
`OTEL_DOTNET_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES` environment variable will be
set to `true`.
([#4892](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4892))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should move this below the other 2 "unreleased" entries right? I've been telling people recently to order things chronologically hopefully I'm not mistaken 🤣

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I vote for 1) the latest release should be at the top, the oldest release should be at the bottom 2) within a release, changes are ordered based on when the PR got merged (the latest one should be at the bottom).

Example for 1) https://github.com/dotnet/core/tree/main/release-notes/8.0#releases

Example for 2) https://github.com/dotnet/core/blob/main/release-notes/8.0/preview/8.0.0-rc.1.md#notable-fixes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@vishweshbankwar The unreleased section is at the top, yes, but the new entry goes into the bottom of that section 😄

@vishweshbankwar vishweshbankwar Oct 3, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I need to get my eyes checked😆 . Fixed the sequence.

Comment thread src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporter.cs Outdated

@CodeBlanch CodeBlanch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sent a few nits but LGTM

@CodeBlanch CodeBlanch added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Oct 2, 2023
Comment thread src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md Outdated
Comment thread src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants