open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.15k stars 545 forks source link

Add comment to the safety of the uint8 cast #5819

Closed MadVikingGod closed 3 months ago

MadVikingGod commented 3 months ago

Closes #5666 Closes #5571 Closes #5626

The conversion referenced in both issues is impossible to overflow. This PR leaves a comment to that effect.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.5%. Comparing base (522f603) to head (a4b5caa).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5819/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5819 +/- ## ===================================== Coverage 64.5% 64.5% ===================================== Files 200 200 Lines 12563 12563 ===================================== + Hits 8112 8114 +2 + Misses 4215 4214 -1 + Partials 236 235 -1 ``` | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5819?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [samplers/probability/consistent/tracestate.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5819?src=pr&el=tree&filepath=samplers%2Fprobability%2Fconsistent%2Ftracestate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvcHJvYmFiaWxpdHkvY29uc2lzdGVudC90cmFjZXN0YXRlLmdv) | `100.0% <ø> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5819/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)