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

[Exporter.Prometheus] remove redundant if in WriteUnicodeNoEscape #6077

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

SimonCropp
Copy link
Contributor

Fixes #
Design discussion issue #

Changes

0x07FF is 2047
0xFFFF is 65535

Since there is ordinal <= 0x07FF check before the ordinal <= 0xFFFF then the ordinal <= 0xFFFF confition is always true

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@SimonCropp SimonCropp requested a review from a team as a code owner January 20, 2025 11:44
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package label Jan 20, 2025
@Kielek Kielek changed the title remove redundant if in WriteUnicodeNoEscape [Exporter.Prometheus] remove redundant if in WriteUnicodeNoEscape Jan 22, 2025
Copy link
Contributor

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

Technically, the change is correct. Maybe it is worth to add some comment about boundaries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants