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

Metadata support for Snaps #2814

Open
metalmatze opened this issue May 22, 2024 · 0 comments
Open

Metadata support for Snaps #2814

metalmatze opened this issue May 22, 2024 · 0 comments
Labels
area/metadata Something about enrich the profiles with metadata enhancement New feature or request

Comments

@metalmatze
Copy link
Member

Is your feature request related to a problem? Please describe.

When profiling applications, we get a good amount of metadata attached as labels. However, we could collect even more metadata for snaps, which would be helpful when querying for specific profiles.

Describe the solution you'd like

Without knowing to much on how we currently collect some more metadata for e.g. docker, the parca-agent could collect some information from the environ file associated with a process run as a snap.

Here's an example for the parca-agent snap itself:
cat /proc/<PID>/environ

REVISION=2226
SNAP=/snap/parca-agent/2226
SNAP_ARCH=amd64
SNAP_COMMON=/var/snap/parca-agent/common
SNAP_CONTEXT=Zm3XgSnLDxdAlwuTNJM75BU3b1N1UlhE3IBTyWjsBSjq_3CRQDMJLANG=C.UTF-8
SNAP_COOKIE=Zm3XgSnLDxdAlwuTNJM75BU3b1N1UlhE3IBTyWjsBSjq_3CRQDMJ
SNAP_DATA=/var/snap/parca-agent/2226LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
SNAP_EUID=0PWD=/var/snap/parca-agent/2226SYSTEMD_EXEC_PID=31197
SNAP_INSTANCE_KEY=
SNAP_INSTANCE_NAME=parca-agent
SNAP_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
SNAP_NAME=parca-agent
SNAP_REAL_HOME=/root
SNAP_REEXEC=
SNAP_UID=0
SNAP_USER_COMMON=/root/snap/parca-agent/common
SNAP_USER_DATA=/root/snap/parca-agent/2226
SNAP_VERSION=v0.30.0-97740e13SHLVL=0

Describe alternatives you've considered

Maybe there's another way. I'm not sure.

Additional context

@metalmatze metalmatze added enhancement New feature or request area/metadata Something about enrich the profiles with metadata labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metadata Something about enrich the profiles with metadata enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant