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

[geneva] Vendor code for writing tracepoints on Linux #2114

Merged

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Sep 27, 2024

[Split off from #2113]

Changes

  • Adds code from https://github.com/microsoft/LinuxTracepoints-Net/ into the "External" folder in the GenevaExporter project. Decided to vendor this code because a) that package doesn't have a strong name which breaks the build and b) we're hoping dotnet/runtime will add support for user_events in the future and we won't need a dependency.

    Geneva will only be using the PerfTracepoint class. The files being included here are the subset from the repo required to get /Provider/PerfTracepoint.cs building.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)

@CodeBlanch CodeBlanch requested a review from a team as a code owner September 27, 2024 21:06
@github-actions github-actions bot added the comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva label Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 340 lines in your changes missing coverage. Please review.

Project coverage is 58.94%. Comparing base (71655ce) to head (cbd1ff9).
Report is 456 commits behind head on main.

Files with missing lines Patch % Lines
.../LinuxTracepoints-Net/Provider/TracepointHandle.cs 0.00% 178 Missing ⚠️
...al/LinuxTracepoints-Net/Provider/PerfTracepoint.cs 0.00% 87 Missing ⚠️
...nal/LinuxTracepoints-Net/Provider/RawFileHandle.cs 0.00% 35 Missing ⚠️
...xTracepoints-Net/Types/EventHeaderFieldEncoding.cs 0.00% 13 Missing ⚠️
.../External/LinuxTracepoints-Net/Provider/Utility.cs 0.00% 11 Missing ⚠️
...External/LinuxTracepoints-Net/Types/EventHeader.cs 0.00% 9 Missing ⚠️
...ernal/LinuxTracepoints-Net/Provider/DataSegment.cs 0.00% 3 Missing ⚠️
...xTracepoints-Net/Types/EventHeaderExtensionKind.cs 0.00% 2 Missing ⚠️
...nuxTracepoints-Net/Types/EventHeaderFieldFormat.cs 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2114       +/-   ##
===========================================
- Coverage   73.91%   58.94%   -14.98%     
===========================================
  Files         267       44      -223     
  Lines        9615     3924     -5691     
===========================================
- Hits         7107     2313     -4794     
+ Misses       2508     1611      -897     
Flag Coverage Δ
unittests-Exporter.Geneva 58.94% <0.00%> (?)

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

Files with missing lines Coverage Δ
...ry.Exporter.Geneva/External/TraceLoggingDynamic.cs 22.46% <ø> (ø)
...xTracepoints-Net/Types/EventHeaderExtensionKind.cs 0.00% <0.00%> (ø)
...nuxTracepoints-Net/Types/EventHeaderFieldFormat.cs 0.00% <0.00%> (ø)
...ernal/LinuxTracepoints-Net/Provider/DataSegment.cs 0.00% <0.00%> (ø)
...External/LinuxTracepoints-Net/Types/EventHeader.cs 0.00% <0.00%> (ø)
.../External/LinuxTracepoints-Net/Provider/Utility.cs 0.00% <0.00%> (ø)
...xTracepoints-Net/Types/EventHeaderFieldEncoding.cs 0.00% <0.00%> (ø)
...nal/LinuxTracepoints-Net/Provider/RawFileHandle.cs 0.00% <0.00%> (ø)
...al/LinuxTracepoints-Net/Provider/PerfTracepoint.cs 0.00% <0.00%> (ø)
.../LinuxTracepoints-Net/Provider/TracepointHandle.cs 0.00% <0.00%> (ø)

... and 250 files with indirect coverage changes

@rajkumar-rangaraj
Copy link
Contributor

Could you please update the PR summary to show how you decided to select only part of these files from the other repo. Later if we need to copy an update it will be useful.

Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj left a comment

Choose a reason for hiding this comment

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

Also, consider adding information on why #nullable enable is added on every file.

@CodeBlanch
Copy link
Member Author

@rajkumar-rangaraj @TimothyMothra I pushed some changes geared towards reducing the amount of changes to the files which are being vendored. Goal being to make it easier to update them in the future if needed.

@CodeBlanch CodeBlanch merged commit 68a25e8 into open-telemetry:main Sep 30, 2024
59 checks passed
@CodeBlanch CodeBlanch deleted the geneva-vendor-tracepoint-code branch September 30, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants