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

[receiver/kubeletstatsreciever] add volume attrs for CSI-backed PVCs #32055

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

Conversation

gdvalle
Copy link

@gdvalle gdvalle commented Apr 1, 2024

A retry of #25170, where it was auto-closed from no maintainer activity.

Description:
Add a couple new attrs to record information about CSI volume type.
These are now part of semconv as of open-telemetry/semantic-conventions#1337

  • container.csi.plugin.name: The raw CSI.Driver field.
  • container.csi.volume.id: The raw CSI.VolumeHandle field.

Also, if we can identify the CSI driver as a GCP-backed one, use the VolumeHandle to populate gce.pd.name. This gives parity with the legacy GCEPersistentDisk in-tree PV kind.

Link to tracking Issue: n/a

Testing:
A test is added to validate all labels described above are populated.

Documentation:
A changelog entry is added.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 18, 2024
@gdvalle
Copy link
Author

gdvalle commented Apr 19, 2024

Bump, not stale, just awaiting review.

@github-actions github-actions bot removed the Stale label Apr 19, 2024
Copy link
Contributor

github-actions bot commented May 4, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 4, 2024
@gdvalle
Copy link
Author

gdvalle commented May 6, 2024

Bump

@mx-psi mx-psi removed the Stale label May 6, 2024
@mx-psi
Copy link
Member

mx-psi commented May 6, 2024

@gdvalle can you fix the merge conflicts and make CI pass? Thanks

@gdvalle
Copy link
Author

gdvalle commented May 6, 2024

@mx-psi CI is green now!

@mx-psi
Copy link
Member

mx-psi commented May 7, 2024

@dmitryax @TylerHelmuth PTAL!

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 22, 2024
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

We've started being stricter with how we add new attributes in k8s components, specifically looking for approval from the semantic convention SIG on the proposed semantic conventions.

Please open a PR at https://github.com/open-telemetry/semantic-conventions, similar to open-telemetry/semantic-conventions#997, to propose these new attributes.

@mx-psi mx-psi removed their assignment Jun 13, 2024
@github-actions github-actions bot removed the Stale label Jun 14, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 28, 2024
@gdvalle
Copy link
Author

gdvalle commented Jul 9, 2024

bump

Comment on lines 507 to 508
| csi.driver | CSI driver | Any Str | true |
| csi.volume.handle | CSI volume handle | Any Str | true |
Copy link
Member

Choose a reason for hiding this comment

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

csi is kubernetes specific concern only, right? In that case, it's better to prepend it with k8s. namespace.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's not the case...

Copy link
Member

Choose a reason for hiding this comment

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

I'm still not 100% sure about the naming here. csi namespace may be too ambiguous. I don't have any suggestions at this point. I'm open to merging the PR as is. Can you please submit a PR for open-telemetry/semantic-conventions#1119? Maybe we will get some more feedback there

Copy link
Author

Choose a reason for hiding this comment

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

Done open-telemetry/semantic-conventions#1337

The alteration of k8s.volume.type done here (adding a special csiPersistentVolume value) maybe looks less appealing if we want to keep the 1:1 mapping here. It's still technically a persistentVolumeClaim, so perhaps we should leave it at that, and users can query for defined(csi.driver) or something to enumerate CSI-backed PVCs.

@dmitryax dmitryax removed the Stale label Jul 9, 2024
@dmitryax dmitryax closed this Jul 9, 2024
@dmitryax dmitryax reopened this Jul 9, 2024
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.44%. Comparing base (90603af) to head (5f63e9e).
Report is 1429 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #32055      +/-   ##
==========================================
+ Coverage   82.62%   83.44%   +0.82%     
==========================================
  Files        1808     2158     +350     
  Lines      140874   168416   +27542     
==========================================
+ Hits       116392   140542   +24150     
- Misses      20310    22956    +2646     
- Partials     4172     4918     +746     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Jul 24, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 31, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Sep 14, 2024
@gdvalle
Copy link
Author

gdvalle commented Sep 23, 2024

@TylerHelmuth or @dmitryax could you please re-open this? The semconv has been established/merged and branch is updated to match.

@jmacd jmacd reopened this Sep 27, 2024
@jmacd jmacd requested a review from a team as a code owner September 27, 2024 16:40
@github-actions github-actions bot removed the Stale label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants