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.

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.

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 Oct 18, 2024
@ChrsMark ChrsMark removed the Stale label Oct 18, 2024
@@ -69,6 +69,14 @@ resource_attributes:
description: "Glusterfs volume path"
enabled: true
type: string
container.csi.volume.id:
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 bit concerned from the semantic conventions perspective since those are not yet defined as resource attributes there. See open-telemetry/semantic-conventions#1337 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 This needs to go thru semconv first. I'm really not sure if container.csi.volume.id: is a good name.

Copy link
Member

Choose a reason for hiding this comment

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

Just to avoid possible confusion here. It has been added in SemConv with open-telemetry/semantic-conventions#1337 but is only part of the registry and not defined as Resource or metric attribute. So I'm not sure if we can already use it.

Copy link
Author

Choose a reason for hiding this comment

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

I opened open-telemetry/semantic-conventions#1499 to clear this up. Is there anything else you can see I'm missing?

@@ -148,6 +148,39 @@ func TestDetailedPVCLabels(t *testing.T) {
"k8s.namespace.name": "pod-namespace",
},
},
{
name: "persistentVolumeClaim - with detailed PVC labels (CSI PV with GCP driver)",
Copy link
Member

Choose a reason for hiding this comment

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

Could we also enhance the scraper's tests like at https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kubeletstatsreceiver/scraper_test.go#L598? The resulted files are really useful for reference since they contain the whole information.

Copy link
Contributor

github-actions bot commented Nov 6, 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 Nov 6, 2024
@gdvalle
Copy link
Author

gdvalle commented Nov 13, 2024

not stale, waiting for consensus in open-telemetry/semantic-conventions#1499

@github-actions github-actions bot removed the Stale label Nov 14, 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.

7 participants