Skip to content

use a local const for grpc time conversions#1505

Merged
brettmc merged 2 commits into
open-telemetry:mainfrom
brettmc:grpc-const
Feb 9, 2025
Merged

use a local const for grpc time conversions#1505
brettmc merged 2 commits into
open-telemetry:mainfrom
brettmc:grpc-const

Conversation

@brettmc

@brettmc brettmc commented Feb 8, 2025

Copy link
Copy Markdown
Contributor

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
@codecov

codecov Bot commented Feb 8, 2025

Copy link
Copy Markdown

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.

{
use LogsMessagesTrait;

public const MILLIS_PER_SECOND = 1_000;

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.

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

Copy link
Copy Markdown
Contributor 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
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