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

use a local const for grpc time conversions #1505

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

brettmc
Copy link
Collaborator

@brettmc brettmc commented Feb 8, 2025

using a newly-added const in ClockInterface breaks things for some older PHP versions, so lets use a local const for now

using a newly-added const in ClockInterface breaks things for some older PHP versions, so
lets use a local const for now
@brettmc brettmc requested a review from a team as a code owner February 8, 2025 09:39
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.78%. Comparing base (5d24db8) to head (f1d428a).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1505      +/-   ##
============================================
- Coverage     70.84%   70.78%   -0.06%     
  Complexity     2762     2762              
============================================
  Files           408      408              
  Lines          8342     8342              
============================================
- Hits           5910     5905       -5     
- Misses         2432     2437       +5     
Flag Coverage Δ
8.1 70.48% <100.00%> (+0.02%) ⬆️
8.2 70.67% <100.00%> (-0.05%) ⬇️
8.3 70.72% <100.00%> (+0.03%) ⬆️
8.4 70.66% <100.00%> (-0.10%) ⬇️

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

Files with missing lines Coverage Δ
src/Contrib/Grpc/GrpcTransport.php 47.22% <100.00%> (ø)
src/Contrib/Grpc/GrpcTransportFactory.php 71.79% <100.00%> (ø)

... and 6 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 5d24db8...f1d428a. Read the comment docs.

@@ -25,6 +24,8 @@ final class GrpcTransportFactory implements TransportFactoryInterface
{
use LogsMessagesTrait;

public const MILLIS_PER_SECOND = 1_000;
Copy link
Contributor

Choose a reason for hiding this comment

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

If this was protected, might we discourage wider usage? (hopefully in favour of ClockInterface::MILLIS_PER_SECOND where applicable)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, absolutely. Since the class is final, I think it can be private.

@brettmc brettmc merged commit 8316c50 into open-telemetry:main Feb 9, 2025
10 of 11 checks passed
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.

2 participants