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

[Instrumentation.Runtime] Two internal refactors #559

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

xiang17
Copy link
Contributor

@xiang17 xiang17 commented Aug 3, 2022

Fixes #.

Changes

Refactor some private code for minor non-blocker comments.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #559 (66f194d) into main (bbb3faf) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #559   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        167     167           
  Lines       5101    5100    -1     
=====================================
+ Misses      5101    5100    -1     
Impacted Files Coverage Δ
...elemetry.Instrumentation.Runtime/RuntimeMetrics.cs 0.00% <0.00%> (ø)

{
tasks.Add(Task.Run(() => { Console.Write("Hi"); }));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

You could probably add Asserts for pending items as well.

}

Task.WaitAll(tasks.ToArray());

meterProvider.ForceFlush(MaxTimeToAllowForFlush);

var lockContentionCountMetric = exportedItems.FirstOrDefault(i => i.Name == "process.runtime.dotnet.monitor.lock_contention.count");
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR, another refactoring suggestion: You could probably have these metrics names stored as const strings in RuntimeMetrics.cs and refer them here without having to hard code them.

@utpilla
Copy link
Contributor

utpilla commented Aug 3, 2022

Left some suggestions which could be considered in a follow-up PR.

@utpilla utpilla merged commit 3dbb571 into open-telemetry:main Aug 3, 2022
@xiang17 xiang17 deleted the xiang17/AddUnitTest branch August 3, 2022 04:18
samimusallam pushed a commit to samimusallam/opentelemetry-dotnet-contrib that referenced this pull request Aug 9, 2022
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.

3 participants