Skip to content

migrate Clock classes to API#1281

Merged
brettmc merged 6 commits into
open-telemetry:mainfrom
brettmc:clock-to-api
Apr 29, 2024
Merged

migrate Clock classes to API#1281
brettmc merged 6 commits into
open-telemetry:mainfrom
brettmc:clock-to-api

Conversation

@brettmc

@brettmc brettmc commented Apr 19, 2024

Copy link
Copy Markdown
Contributor
  • move Clock* + Util into API
  • add a deprecated wrapper for ClockFactory and Util
  • remove unused StopWatch* classes

Fixes: #1280

- move Clock* + Util into API
- add a deprecated wrapper for ClockFactory and Util
- remove unused StopWatch* classes
Comment thread src/SDK/Common/Time/ClockFactory.php
@brettmc
brettmc marked this pull request as ready for review April 22, 2024 06:33
@brettmc
brettmc requested a review from a team April 22, 2024 06:33

@ChrisLightfootWild ChrisLightfootWild left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Amazing, thanks for this! ⏱️

Comment thread src/API/Common/Time/ClockFactory.php Outdated
Comment thread src/API/Common/Time/Util.php Outdated
Comment thread src/API/Common/Time/ClockInterface.php Outdated
brettmc added 2 commits April 24, 2024 10:37
It's not really a factory, and really only provides access to a system clock. Create a
Clock class which is more clear in its purpose.
per review feedback, it's only used in Zipkin. Removed some unused consts from ClockInterface
Comment thread src/API/Common/Time/Clock.php Outdated
Comment thread src/API/Common/Time/Clock.php Outdated
@codecov

codecov Bot commented Apr 27, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 73.97%. Comparing base (cea2d7c) to head (477b845).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1281      +/-   ##
============================================
- Coverage     74.31%   73.97%   -0.34%     
+ Complexity     2391     2365      -26     
============================================
  Files           349      347       -2     
  Lines          7124     7071      -53     
============================================
- Hits           5294     5231      -63     
- Misses         1830     1840      +10     
Flag Coverage Δ
8.1 73.97% <82.60%> (-0.34%) ⬇️
8.2 73.97% <82.60%> (-0.34%) ⬇️
8.3 73.97% <82.60%> (-0.34%) ⬇️
8.4 72.84% <82.60%> (-0.35%) ⬇️

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

Files Coverage Δ
src/API/Common/Time/Clock.php 100.00% <100.00%> (ø)
src/API/Common/Time/SystemClock.php 64.28% <ø> (ø)
src/API/Common/Time/TestClock.php 0.00% <ø> (ø)
src/Contrib/Zipkin/SpanConverter.php 96.45% <100.00%> (+0.05%) ⬆️
src/SDK/Logs/LogRecordProcessorFactory.php 100.00% <100.00%> (ø)
src/SDK/Logs/Processor/BatchLogRecordProcessor.php 100.00% <ø> (ø)
src/SDK/Metrics/Meter.php 76.11% <ø> (ø)
src/SDK/Metrics/MeterProvider.php 85.71% <ø> (ø)
src/SDK/Metrics/MetricRegistry/MetricRegistry.php 77.10% <ø> (ø)
...talenessHandler/DelayedStalenessHandlerFactory.php 100.00% <ø> (ø)
... and 8 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cea2d7c...477b845. Read the comment docs.

@brettmc
brettmc merged commit fc161a8 into open-telemetry:main Apr 29, 2024
@brettmc
brettmc deleted the clock-to-api branch January 29, 2025 21:50
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.

Move ClockInterface / ClockFactory from SDK to API

6 participants