René's URL Explorer Experiment


Title: Add support for retention policy on large tables · Issue #20743 · coder/coder · GitHub

Open Graph Title: Add support for retention policy on large tables · Issue #20743 · coder/coder

X Title: Add support for retention policy on large tables · Issue #20743 · coder/coder

Description: We keep many large tables, such as audit logs, API keys, connection logs, and now Bridge's request logs for forensic purposes, meaning that, in the case of an incident, an admin can find all of the details necessary for an event. However...

Open Graph Description: We keep many large tables, such as audit logs, API keys, connection logs, and now Bridge's request logs for forensic purposes, meaning that, in the case of an incident, an admin can find all of the...

X Description: We keep many large tables, such as audit logs, API keys, connection logs, and now Bridge's request logs for forensic purposes, meaning that, in the case of an incident, an admin can find all of...

Opengraph URL: https://github.com/coder/coder/issues/20743

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for retention policy on large tables","articleBody":"We keep many large tables, such as audit logs, API keys, connection logs, and now Bridge's request logs for forensic purposes, meaning that, in the case of an incident, an admin can find all of the details necessary for an event.\n\nHowever, many customers prefer to use an external data source/SIEM (e.g. Splunk, Datadog) as their source of truth and want to keep the Coder PostgreSQL database relatively small/lightweight. This has several advantages:\n\n- Data centralization (logs are centralized across tools, not just Coder)\n- Low database cost (keep PostgreSQL disk/resources low)\n- Improved day-to-day database performance (queries by Coder perform better rather than going across all rows)\n- Improved migration performance (when upgrading Coder, migrations do not have to go through many sources)\n- PostgreSQL typically isn't technically fantastic at holding these types of event-based data indefinitely and there are better options.\n\nIn fact, our documentation actually mentions how to purge audit logs: https://coder.com/docs/admin/security/audit-logs#purging-old-audit-logs\n\n> [!NOTE]\n> For full context, check out [our most recent R&D reto](https://www.notion.so/coderhq/Retros-142c7591854041dcac6707538e07898e?p=2a8d579be592806282c3d4de78d98cfb&pm=s)\n\n## Definition of done\n\n- [x] Brief scan of tables to ensure there are not other obvious culprits for a retention policy\n- [x] The following tables have a configurable retention policy via a Coder server flag. Each one has an individual policy\n  - [x] Connection Logs\n  - [x] Audit Logs\n  - [x] API Keys\n  - [x] ~~Bridge Request Logs~~ AI Bridge docs updates #21055\n  - [ ] Nice to have: A global policy can also be applied to all of these\n- [x] The retention policy is disabled by default to prevent breaking changes for customers. Down the road, we can consider changing this to a default value but we should warn customers and provide docs on how they can keep it disabled.\n- [x] dbpurge is modified to purge these based on the retention policy\n  - [x] API keys are only purged if they are past the policy and the key has expired\n- [x] Our docs, changelog, and best practices doc recommend setting a 90-day retention policy as well as mention how these various logs can be ingested, similar to audit logs: https://coder.com/docs/admin/security/audit-logs#capturingexporting-audit-logs","author":{"url":"https://github.com/bpmct","@type":"Person","name":"bpmct"},"datePublished":"2025-11-12T17:10:25Z","url":"https://github.com/coder/coder/issues/20743"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3925372b-96ec-ae30-57d2-3ae8db35030e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE41C:1201C:1A35F07:22D8D93:6B015077
html-safe-nonce7aa44cdf4abea59f42c35b71bf74e9b790d9a6127ee424ce1fab370191c37693
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDFDOjEyMDFDOjFBMzVGMDc6MjJEOEQ5Mzo2QjAxNTA3NyIsInZpc2l0b3JfaWQiOiI2NDM0NDQ2NjM4NTgzOTkyNDM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3c45e677736c062ecf331008c3b13290cb26e9a66cac2f50691fedd9182d5e9e
hovercard-subject-tagissue:3617458562
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/20743/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ec89cccbbf3fc8f87635c5867e52c433e0912748cd125e5c89983399ff4f6bd8/coder/coder/issues/20743
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ec89cccbbf3fc8f87635c5867e52c433e0912748cd125e5c89983399ff4f6bd8/coder/coder/issues/20743
og:image:altWe keep many large tables, such as audit logs, API keys, connection logs, and now Bridge's request logs for forensic purposes, meaning that, in the case of an incident, an admin can find all of the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebpmct
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/20743#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F20743
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F20743
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/20743
Reloadhttps://github.com/coder/coder/issues/20743
Reloadhttps://github.com/coder/coder/issues/20743
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests469 (469)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/20743
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/20743
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
#21055https://github.com/coder/coder/pull/21055
Add support for retention policy on large tableshttps://github.com/coder/coder/issues/20743#top
#21055https://github.com/coder/coder/pull/21055
https://github.com/mafredri
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Nov 12, 2025https://github.com/coder/coder/issues/20743#issue-3617458562
https://coder.com/docs/admin/security/audit-logs#purging-old-audit-logshttps://coder.com/docs/admin/security/audit-logs#purging-old-audit-logs
our most recent R&D retohttps://www.notion.so/coderhq/Retros-142c7591854041dcac6707538e07898e?p=2a8d579be592806282c3d4de78d98cfb&pm=s
docs: add data retention and export documentation for AI Bridge #21055https://github.com/coder/coder/pull/21055
https://coder.com/docs/admin/security/audit-logs#capturingexporting-audit-logshttps://coder.com/docs/admin/security/audit-logs#capturingexporting-audit-logs
Nexthttps://github.com/coder/coder/issues/20743?timeline_page=1
mtojekhttps://github.com/mtojek
mafredrihttps://github.com/mafredri
on Nov 13, 2025https://github.com/coder/coder/issues/20743#event-20918946194
matifalihttps://github.com/matifali
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
on Nov 13, 2025https://github.com/coder/coder/issues/20743#event-20922246929
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Nov 28, 2025https://github.com/coder/coder/issues/20743#issuecomment-3589784382
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Dec 1, 2025https://github.com/coder/coder/issues/20743#issuecomment-3596432835
#21021https://github.com/coder/coder/pull/21021
mafredrihttps://github.com/mafredri
on Dec 1, 2025https://github.com/coder/coder/issues/20743#event-21275574086
feat(coderd): add retention policy configurationhttps://github.com/coder/coder/commit/b5e66fa60fc81677995dd60ac706bb89ef199f67
b5e66fahttps://github.com/coder/coder/commit/b5e66fa60fc81677995dd60ac706bb89ef199f67
feat(coderd/database/dbpurge): add retention for connection logshttps://github.com/coder/coder/commit/0fb3b51fea9e74beacaf923cbf724f7f34a49c43
0fb3b51https://github.com/coder/coder/commit/0fb3b51fea9e74beacaf923cbf724f7f34a49c43
feat(coderd/database/dbpurge): add retention for audit logshttps://github.com/coder/coder/commit/0339e55cef2239c2d2fb4daf81c48294684d632a
0339e55https://github.com/coder/coder/commit/0339e55cef2239c2d2fb4daf81c48294684d632a
feat(coderd/database/dbpurge): make API keys retention configurablehttps://github.com/coder/coder/commit/bd8e537ba818c84ae1c765668f4aa802ea2fb824
bd8e537https://github.com/coder/coder/commit/bd8e537ba818c84ae1c765668f4aa802ea2fb824
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Dec 3, 2025https://github.com/coder/coder/issues/20743#issuecomment-3605947844
#21021https://github.com/coder/coder/pull/21021
mafredrihttps://github.com/mafredri
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 3, 2025https://github.com/coder/coder/issues/20743#event-21327799820
kminhtrihttps://github.com/kminhtri
on Dec 15, 2025https://github.com/coder/coder/issues/20743#event-21560180349
feat(coderd): add retention policy configuration (coder#21021)https://github.com/kminhtri/coder/commit/dba19b6d0fb10d44c3d177256a5cf581daeb7dee
coder#21021https://github.com/coder/coder/pull/21021
dba19b6https://github.com/kminhtri/coder/commit/dba19b6d0fb10d44c3d177256a5cf581daeb7dee
feat(coderd/database/dbpurge): add retention for connection logs (cod…https://github.com/kminhtri/coder/commit/9a91dd4b7f80f570c06acb4ee4caa0b993a54524
cod…https://github.com/coder/coder/pull/21022
9a91dd4https://github.com/kminhtri/coder/commit/9a91dd4b7f80f570c06acb4ee4caa0b993a54524
feat(coderd/database/dbpurge): add retention for audit logs (coder#21025https://github.com/kminhtri/coder/commit/159850fb5c08ca1a7612533b18efd4722ef4b1e6
coder#21025https://github.com/coder/coder/pull/21025
159850fhttps://github.com/kminhtri/coder/commit/159850fb5c08ca1a7612533b18efd4722ef4b1e6
feat(coderd/database/dbpurge): make API keys retention configurable (c…https://github.com/kminhtri/coder/commit/a8afb811d9ea9f4be32868237c660767f7f8efc7
c…https://github.com/coder/coder/pull/21037
a8afb81https://github.com/kminhtri/coder/commit/a8afb811d9ea9f4be32868237c660767f7f8efc7
docs: add data retention documentation (coder#21038)https://github.com/kminhtri/coder/commit/bc3e09a56647f56cd8631974ae7bb6fe9fcd3b8e
coder#21038https://github.com/coder/coder/pull/21038
bc3e09ahttps://github.com/kminhtri/coder/commit/bc3e09a56647f56cd8631974ae7bb6fe9fcd3b8e
feat: add retention config for `workspace_agent_logs` (coder#21039)https://github.com/kminhtri/coder/commit/6b01539f675f18f904e20ba36e0061ee8e2675be
coder#21039https://github.com/coder/coder/pull/21039
6b01539https://github.com/kminhtri/coder/commit/6b01539f675f18f904e20ba36e0061ee8e2675be
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/20743
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/20743
mafredrihttps://github.com/mafredri
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
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.