Skip to content

pcp2openmetrics & pcp2opentelemetry revisions - #2676

Open
lmchilton wants to merge 1 commit into
performancecopilot:mainfrom
lmchilton:openscanhub-revisions
Open

pcp2openmetrics & pcp2opentelemetry revisions#2676
lmchilton wants to merge 1 commit into
performancecopilot:mainfrom
lmchilton:openscanhub-revisions

Conversation

@lmchilton

Copy link
Copy Markdown
Contributor

openscanhub revisions for pcp2openmetrics & pcp2opentelemetry
Updated error in format for unit assignment in pcp2opentelemetry Updated http authentication

openscanhub revisions for pcp2openmetrics & pcp2opentelemetry
Updated error in format for unit assignment in pcp2opentelemetry
Updated http authentication
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ac42de9c-4829-4537-9af5-2f4f6b76d356

📥 Commits

Reviewing files that changed from the base of the PR and between 2243090 and 997640d.

📒 Files selected for processing (2)
  • src/pcp2openmetrics/pcp2openmetrics.py
  • src/pcp2opentelemetry/pcp2opentelemetry.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved unit conversion to correctly combine space, time, and count dimensions.
    • Corrected handling of dimensionless units.
    • HTTP Basic Authentication now requires secure HTTPS endpoints and rejects credentials sent over insecure connections.

Walkthrough

The OpenTelemetry exporter now composes multiple unit dimensions. Both exporters reject HTTP Basic Authentication for non-HTTPS endpoints before attaching credentials.

Changes

Unit formatting and authentication

Layer / File(s) Summary
Composite UCUM unit formatting
src/pcp2opentelemetry/pcp2opentelemetry.py
The exporter combines space, time, and count dimensions. It returns "1" only when no unit component exists.
HTTPS requirement for Basic Authentication
src/pcp2openmetrics/pcp2openmetrics.py, src/pcp2opentelemetry/pcp2opentelemetry.py
Both exporters raise ValueError for non-HTTPS endpoint URLs before creating or sending credentials.

Poem

I’m a rabbit checking units in a row,
Space, time, and count now compose as they go.
HTTPS guards each credential byte,
While dimensionless waits for an empty sight.
Hop, hop—the exporters keep the path right!

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title names the affected components but uses the vague term "revisions" and does not identify the authentication or unit-assignment changes. State the main changes directly, such as HTTPS enforcement for HTTP authentication and the corrected unit-dimension handling.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description identifies both affected components and mentions the unit-assignment and HTTP authentication updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

auth = None
if self.http_user and self.http_pass:
if not self.url.lower().startswith("https://"):
raise ValueError(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could break existing setups - should this just be a warning not an error?

first_unit = 0
elif units.dimTime:

if units.dimTime:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do these changes impact on tests? If not, why not? :)

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