open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.23k stars 765 forks source link

[repo] Simplify preprocessor directives after dropping support for .NET 6 and .NET7 #5851

Closed Kielek closed 1 month ago

Kielek commented 1 month ago

Fixes #5848 Follow up to #5712

Changes

Simplify preprocessor directives after dropping support for .NET 6 and .NET7

Merge requirement checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.27%. Comparing base (6250307) to head (6a6a889). Report is 320 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/graphs/tree.svg?width=650&height=150&src=pr&token=vscyfvPfy5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5851 +/- ## ========================================== + Coverage 83.38% 86.27% +2.88% ========================================== Files 297 257 -40 Lines 12531 11168 -1363 ========================================== - Hits 10449 9635 -814 + Misses 2082 1533 -549 ``` | [Flag](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [unittests-Project-Experimental](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `86.13% <ø> (?)` | | | [unittests-Project-Stable](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `86.11% <ø> (?)` | | | [unittests-UnstableCoreLibraries-Experimental](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `85.60% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [...c/OpenTelemetry.Api/Logs/LogRecordAttributeList.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Api%2FLogs%2FLogRecordAttributeList.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuQXBpL0xvZ3MvTG9nUmVjb3JkQXR0cmlidXRlTGlzdC5jcw==) | `69.02% <ø> (+0.88%)` | :arrow_up: | | [src/OpenTelemetry.Api/Logs/LogRecordData.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Api%2FLogs%2FLogRecordData.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuQXBpL0xvZ3MvTG9nUmVjb3JkRGF0YS5jcw==) | `100.00% <ø> (ø)` | | | [...nTelemetry.Api/Logs/LogRecordSeverityExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Api%2FLogs%2FLogRecordSeverityExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuQXBpL0xvZ3MvTG9nUmVjb3JkU2V2ZXJpdHlFeHRlbnNpb25zLmNz) | `100.00% <ø> (ø)` | | | [src/OpenTelemetry.Api/Logs/Logger.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Api%2FLogs%2FLogger.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuQXBpL0xvZ3MvTG9nZ2VyLmNz) | `100.00% <ø> (ø)` | | | [src/OpenTelemetry.Api/Logs/LoggerProvider.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Api%2FLogs%2FLoggerProvider.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuQXBpL0xvZ3MvTG9nZ2VyUHJvdmlkZXIuY3M=) | `100.00% <ø> (ø)` | | | [...metheus.AspNetCore/PrometheusExporterMiddleware.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry.Exporter.Prometheus.AspNetCore%2FPrometheusExporterMiddleware.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuRXhwb3J0ZXIuUHJvbWV0aGV1cy5Bc3BOZXRDb3JlL1Byb21ldGhldXNFeHBvcnRlck1pZGRsZXdhcmUuY3M=) | `72.50% <ø> (+2.50%)` | :arrow_up: | | [...try/Logs/ILogger/OpenTelemetryLoggingExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry%2FLogs%2FILogger%2FOpenTelemetryLoggingExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkvTG9ncy9JTG9nZ2VyL09wZW5UZWxlbWV0cnlMb2dnaW5nRXh0ZW5zaW9ucy5jcw==) | `97.43% <ø> (+0.03%)` | :arrow_up: | | [src/OpenTelemetry/Logs/LogRecord.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry%2FLogs%2FLogRecord.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkvTG9ncy9Mb2dSZWNvcmQuY3M=) | `70.77% <ø> (+1.04%)` | :arrow_up: | | [src/OpenTelemetry/Metrics/AggregatorStore.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry%2FMetrics%2FAggregatorStore.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkvTWV0cmljcy9BZ2dyZWdhdG9yU3RvcmUuY3M=) | `87.46% <ø> (+7.08%)` | :arrow_up: | | [src/OpenTelemetry/Metrics/Exemplar/Exemplar.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree&filepath=src%2FOpenTelemetry%2FMetrics%2FExemplar%2FExemplar.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkvTWV0cmljcy9FeGVtcGxhci9FeGVtcGxhci5jcw==) | `87.09% <ø> (-12.91%)` | :arrow_down: | | ... and [8 more](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | | ... and [210 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/pull/5851/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)
reyang commented 1 month ago

This is great, thanks @Kielek!