René's URL Explorer Experiment


Title: Create multiprocess files with process uuid by ethervoid · Pull Request #694 · prometheus/client_python · GitHub

Open Graph Title: Create multiprocess files with process uuid by ethervoid · Pull Request #694 · prometheus/client_python

X Title: Create multiprocess files with process uuid by ethervoid · Pull Request #694 · prometheus/client_python

Description: This is a draft open to discussion In order to be able to clean-up the process files once it's stopped or destroyed, we need to identify those files with a UUID. If not, those files are going to be processed and collected and will keep growing until we restart the server or master process to perform the cleanup of the metrics directory This change uses the psutil library that gives a hash based on PID+Process creation time in order to differentiate two processes with the same PID but those are different. I have some questions about the feasibility of this change: Is the approach ok? Mainly is respectful in case of exception and even though some files could be left behind is not the same situation as we have now. Also, there is an improvement that I can add and is marking those files I couldn't delete as "type_pid_uuid_defunct" so we can do something to directly remove those files Is it ok to start using an external library? I've seen you're trying to avoid it Tests are failing because the test process is not running and the unittest.mock library is only from 3.3 it's ok to move all the multiprocess tests to required that version to run? This change aims to fix #568 // @csmarchbanks Signed-off-by: Mario de Frutos mario@defrutos.org

Open Graph Description: This is a draft open to discussion In order to be able to clean-up the process files once it's stopped or destroyed, we need to identify those files with a UUID. If not, those files are going t...

X Description: This is a draft open to discussion In order to be able to clean-up the process files once it's stopped or destroyed, we need to identify those files with a UUID. If not, those files are goi...

Opengraph URL: https://github.com/prometheus/client_python/pull/694

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:683b96ab-d84b-3836-b766-4bfc3a799099
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8226:22514B:1BC884:225B55:6991178E
html-safe-nonce9a430ca8782a96b7969516ed3c9d2e6748c6c8d8ae25e4a1d08fe6d641a28527
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjI2OjIyNTE0QjoxQkM4ODQ6MjI1QjU1OjY5OTExNzhFIiwidmlzaXRvcl9pZCI6IjQ1NjgzNDg0Mzg2NzcyMzE1MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7be19aef8e4288920cd798566fc1fa3805c6cdd0dd9022c8c00ac4261d24b0f1
hovercard-subject-tagpull_request:732525180
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/prometheus/client_python/pull/694/files
twitter:imagehttps://avatars.githubusercontent.com/u/741240?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/741240?s=400&v=4
og:image:altThis is a draft open to discussion In order to be able to clean-up the process files once it's stopped or destroyed, we need to identify those files with a UUID. If not, those files are going t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/prometheus/client_python git https://github.com/prometheus/client_python.git
octolytics-dimension-user_id3380462
octolytics-dimension-user_loginprometheus
octolytics-dimension-repository_id30618733
octolytics-dimension-repository_nwoprometheus/client_python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id30618733
octolytics-dimension-repository_network_root_nwoprometheus/client_python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_python%2Fpull%2F694%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_python%2Fpull%2F694%2Ffiles
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=prometheus%2Fclient_python
Reloadhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Reloadhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Reloadhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
prometheus https://patch-diff.githubusercontent.com/prometheus
client_pythonhttps://patch-diff.githubusercontent.com/prometheus/client_python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fprometheus%2Fclient_python
Fork 842 https://patch-diff.githubusercontent.com/login?return_to=%2Fprometheus%2Fclient_python
Star 4.3k https://patch-diff.githubusercontent.com/login?return_to=%2Fprometheus%2Fclient_python
Code https://patch-diff.githubusercontent.com/prometheus/client_python
Issues 105 https://patch-diff.githubusercontent.com/prometheus/client_python/issues
Pull requests 28 https://patch-diff.githubusercontent.com/prometheus/client_python/pulls
Discussions https://patch-diff.githubusercontent.com/prometheus/client_python/discussions
Actions https://patch-diff.githubusercontent.com/prometheus/client_python/actions
Projects 0 https://patch-diff.githubusercontent.com/prometheus/client_python/projects
Wiki https://patch-diff.githubusercontent.com/prometheus/client_python/wiki
Security 0 https://patch-diff.githubusercontent.com/prometheus/client_python/security
Insights https://patch-diff.githubusercontent.com/prometheus/client_python/pulse
Code https://patch-diff.githubusercontent.com/prometheus/client_python
Issues https://patch-diff.githubusercontent.com/prometheus/client_python/issues
Pull requests https://patch-diff.githubusercontent.com/prometheus/client_python/pulls
Discussions https://patch-diff.githubusercontent.com/prometheus/client_python/discussions
Actions https://patch-diff.githubusercontent.com/prometheus/client_python/actions
Projects https://patch-diff.githubusercontent.com/prometheus/client_python/projects
Wiki https://patch-diff.githubusercontent.com/prometheus/client_python/wiki
Security https://patch-diff.githubusercontent.com/prometheus/client_python/security
Insights https://patch-diff.githubusercontent.com/prometheus/client_python/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fprometheus%2Fclient_python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fprometheus%2Fclient_python%2Fissues%2Fnew%2Fchoose
ethervoidhttps://patch-diff.githubusercontent.com/ethervoid
prometheus:masterhttps://patch-diff.githubusercontent.com/prometheus/client_python/tree/master
ethervoid:568_use_process_uuid_for_multiprocesshttps://patch-diff.githubusercontent.com/ethervoid/client_python/tree/568_use_process_uuid_for_multiprocess
Conversation 13 https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694
Commits 1 https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/commits
Checks 0 https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/checks
Files changed https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Create multiprocess files with process uuid https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#top
Show all changes 1 commit https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
159a96d Create multiprocess files with process uuid ethervoid Sep 13, 2021 https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/commits/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f
Clear filters https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
mmap_dict.py https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f248ada13a15c950f4da13b5b03fd01a6c7b426a9c13cf6cb43cf844d68a3aa3
multiprocess.py https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03ef
utils.py https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-baa2ef9e7b045f1d4c69c4806fff045deb82f5d72b013668e3412da9842c34c8
values.py https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
setup.py https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
prometheus_client/mmap_dict.pyhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f248ada13a15c950f4da13b5b03fd01a6c7b426a9c13cf6cb43cf844d68a3aa3
View file https://patch-diff.githubusercontent.com/ethervoid/client_python/blob/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f/prometheus_client/mmap_dict.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f248ada13a15c950f4da13b5b03fd01a6c7b426a9c13cf6cb43cf844d68a3aa3
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f248ada13a15c950f4da13b5b03fd01a6c7b426a9c13cf6cb43cf844d68a3aa3
prometheus_client/multiprocess.pyhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03ef
View file https://patch-diff.githubusercontent.com/ethervoid/client_python/blob/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f/prometheus_client/multiprocess.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03ef
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03ef
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03ef
roidelapluiehttps://patch-diff.githubusercontent.com/roidelapluie
Sep 16, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r709863309
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
roidelapluiehttps://patch-diff.githubusercontent.com/roidelapluie
Sep 16, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r709865468
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
ethervoidhttps://patch-diff.githubusercontent.com/ethervoid
Sep 16, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r709882267
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
csmarchbankshttps://patch-diff.githubusercontent.com/csmarchbanks
Sep 16, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r710505834
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
ethervoidhttps://patch-diff.githubusercontent.com/ethervoid
Sep 17, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r710767384
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
csmarchbankshttps://patch-diff.githubusercontent.com/csmarchbanks
Sep 21, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r713180541
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
ethervoidhttps://patch-diff.githubusercontent.com/ethervoid
Sep 22, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r713719006
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
csmarchbankshttps://patch-diff.githubusercontent.com/csmarchbanks
Sep 22, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r714372108
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#518https://github.com/prometheus/client_python/pull/518
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
ethervoidhttps://patch-diff.githubusercontent.com/ethervoid
Sep 23, 2021https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#r714657598
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files
prometheus_client/utils.pyhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-baa2ef9e7b045f1d4c69c4806fff045deb82f5d72b013668e3412da9842c34c8
View file https://patch-diff.githubusercontent.com/ethervoid/client_python/blob/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f/prometheus_client/utils.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-baa2ef9e7b045f1d4c69c4806fff045deb82f5d72b013668e3412da9842c34c8
prometheus_client/values.pyhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
View file https://patch-diff.githubusercontent.com/ethervoid/client_python/blob/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f/prometheus_client/values.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904
setup.pyhttps://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
View file https://patch-diff.githubusercontent.com/ethervoid/client_python/blob/159a96d81f7dd3fa5140a4f322ab04fbcee00e8f/setup.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
https://patch-diff.githubusercontent.com/prometheus/client_python/pull/694/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.