GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: separate connection log methods from app names by EhabY · Pull Request #30466 · coder/coder

Conversation

@EhabY

@EhabY EhabY commented Oct 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Connection logs now record how a connection was made (connection_method) separately from which app made it (app_name), as specified in the Completing Scalable IDE Session Tracking RFC. Storage, the HTTP API, search filters, and the UI move to the new fields. Legacy agent reports and the deprecated type field keep working.

What changes

API: GET /api/v2/connectionlog

  • connection_method (new): ssh, reconnecting_pty, workspace_app, port_forwarding, or tunnel.
  • app_name, app_display_name (new, optional): the self-reported name of the connecting app, such as cursor. Workspace app slugs and ports stay in web_info.slug_or_port.
  • type (deprecated): now a plain string, so new methods pass through. The Go SDK's ConnectionLog.Type becomes a string.
{"type": "vscode", "connection_method": "ssh", "app_name": "cursor", "app_display_name": "Cursor"}

Search filters

Filter Matches
method:ssh Connections made with that method
app:cursor SSH and reconnecting PTY connections from that app. Repeat it to match any of several apps: app:vscode app:cursor
type:vscode Deprecated; same results as before this PR

method: and app: intersect, like the existing owner filters. type: can't be combined with method: or app:. List and count always agree.

UI

  • The Type menu becomes a Method menu. Picking a method drops a leftover type: from old links.
  • A warning appears when the filter contains the deprecated type:.
  • Behavior change: the Active SSH connections preset now uses method:ssh instead of type:ssh, so it also includes SSH sessions from VS Code and JetBrains apps.
  • Rows show the app next to the method, for example "Cursor (SSH) session to …".

SDK

  • codersdk.ConnectionLogMethod is generated from the database enum by typegen dbenums instead of being maintained by hand.

Docs

  • The filter docs cover method: and app:, and include a table for replacing each type: value.

Upgrade impact

Migration 617 rewrites connection_logs under an ACCESS EXCLUSIVE lock.

  • vscode and jetbrains rows become ssh rows with app vscode or jetbrains. Other rows keep their method and have no app.
  • Rollback folds apps back into the old types, so per-app names are lost. Apps registered after this migration roll back to ssh.
Rows Lock duration
1 million 5.8 s
10 million 49.7 s
25 million 99.5 s

Single runs on indexed PostgreSQL 13 with 2 CPUs and 6 GB, excluding lock waits. Not a deployment guarantee.

Design decisions

  • Why keep type:? It has shipped since v2.25.0, the old Type menu wrote it into page URLs, and the old "Active SSH connections" preset used type:ssh. Removing it would break saved links and scripts.
  • When does it go away? In a future release, together with the type response field and excluded_app_names. Both follow one rule (db2sdk.ConnectionLogType), so there is no separate invariant to maintain.
  • Why excluded_app_names? Only type:ssh needs it. It means SSH outside the VS Code and JetBrains families, including connections with no reported app.
  • Why can't type: combine with the new filters? Old clients only send type:, and mixing a legacy alias with its replacements has no useful meaning.
  • Why no family: filter? It could never be complete, because new forks can show up before they're in the registry, and several family values would match nothing. A repeatable app: covers the same need.
  • Why are app filters limited to SSH and reconnecting PTY? app: matches what the response returns in app_name. Other methods store a destination slug or port in the same column, which belongs in separate workspace_app: and port: filters (follow-up).

Stack

Land #30466 → #30467. #30467 adds explicit agent reporting on top of this PR. The insights stack (#30497 → #29796 → #29906) is independent. Replaces #29674.

Review guide and line breakdown

Counts are relative to main. Generated API reference counts as generated; stories and fixtures count as tests.

Category Added Deleted Where to look
Source +507 −266 Migration 617, SQL and converters, search filters, SDK, enterprise handlers, UI, typegen dbenums
Generated +351 −247 sqlc output, Swagger, API reference, TypeScript types, codersdk/dbenums_gen.go
Tests +776 −183 Historical mappings, filter list/count consistency, migration up/down, UI
Docs +72 −23 Connection log fields and filters
Total +1,706 −719

Out of scope: explicit agent wire fields (#30467), workspace_app: and port: filters, JetBrains per-product propagation, and a raw port-forward producer.

Generated with Coder Agents on behalf of @EhabY.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@EhabY EhabY mentioned this pull request Oct 7, 2026
feat: report agent connection methods and app identities #30467
Merged
@github-actions

github-actions Bot commented Oct 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

  • docs/admin/monitoring/connection-logs.md
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned EhabY Oct 7, 2026
This was referenced Oct 7, 2026
feat: report the app that made a connection #29675
Closed
feat: separate connection log methods from app identities #29674
Closed
@EhabY
EhabY added this pull request to stack #30469 October 7, 2026 14:01
@EhabY
EhabY force-pushed the feat/connection-log-methods branch from 7b61be1 to b586449 Compare October 7, 2026 17:32
This was referenced Oct 8, 2026
fix: deduplicate template insights family metrics #30497
Merged
feat!: label the VS Code family and report built-in app usage per app #29906
Merged
@EhabY
EhabY force-pushed the feat/connection-log-methods branch from b586449 to 5a3450d Compare October 8, 2026 14:10
@EhabY
EhabY requested a review from code-asher October 8, 2026 14:32
@EhabY
EhabY marked this pull request as ready for review October 8, 2026 14:32
@EhabY
EhabY requested a review from nickvigilante as a code owner October 8, 2026 14:32
@EhabY
EhabY force-pushed the feat/connection-log-methods branch from 5a3450d to aabf3b0 Compare October 8, 2026 15:12
nickvigilante
nickvigilante reviewed Oct 8, 2026
View reviewed changes

@nickvigilante nickvigilante left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Docs overall LGTM. My robot found some things worth flagging, but you can take them or leave them.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EhabY reacted with rocket emoji
All reactions
  • 🚀 1 reaction
Comment thread coderd/searchquery/search.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/ConnectionLogPage/ConnectionLogPage.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/ConnectionLogPage/connectionLogMethodLabels.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/ConnectionLogPage/ConnectionLogFilter.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/database/migrations/000617_connection_logs_method_app_name.down.sql Resolved

Uh oh!

There was an error while loading. Please reload this page.

code-asher
code-asher reviewed Oct 8, 2026
View reviewed changes

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Tested it out and it looks good! Mostly just wondering if we need the family filter and thinking we can make app repeatable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EhabY reacted with rocket emoji
All reactions
  • 🚀 1 reaction
Comment thread coderd/agentapi/connectionlog_test.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/database/migrations/000614_connection_logs_method_app_name.up.sql Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/database/queries/connectionlogs.sql
-- nothing. Other methods store a destination in app_name_or_port.
AND CASE
WHEN @app_names :: text[] IS NOT NULL THEN
connection_method IN ('ssh', 'reconnecting_pty') AND app_name_or_port = ANY(@app_names :: text[])

@code-asher code-asher Oct 8, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Any harm in letting it match anything, even if not ssh or reconnecting_pty? Could be nice to also get web apps and be able to search ports.

Although app:8080 would be kinda weird, so maybe we would only want to allow workspace apps and eventually add a separate port filter.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@EhabY EhabY Oct 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I went back and forth on this one. I'd like app: to keep matching what the response shows in app_name, and for workspace apps the slug lives in web_info.slug_or_port, so mixing them felt confusing. I think separate workspace_app: and port: filters would be cleaner, so I'd rather do those in a follow-up. wdyt?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@code-asher code-asher Oct 9, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yeah we can address this later! Maybe we run it by the dev or design channel to see if folks have opinions.

The ssh/webinfo split we introduce at the API feels kinda odd to me, I wish we simply returned the whole row as it came from the DB. But, most users probably never even see that anyway since they would have to interact with the API.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@EhabY EhabY Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yep agreed, it's an (API) design question and needs product/dev input!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@EhabY EhabY Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Opened #30650

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/database/queries/connectionlogs.sql Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/searchquery/search.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread enterprise/coderd/connectionlog.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/typegen/main.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread codersdk/connectionlog.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread site/src/pages/ConnectionLogPage/ConnectionLogFilter.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/searchquery/search.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@EhabY EhabY changed the title feat: separate connection log methods from app identities feat: separate connection log methods from app names Oct 9, 2026
@EhabY
EhabY requested review from code-asher and nickvigilante October 9, 2026 12:12
@EhabY
EhabY force-pushed the feat/connection-log-methods branch from ae47b7f to 036757d Compare October 9, 2026 12:25
code-asher
code-asher approved these changes Oct 9, 2026
View reviewed changes

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Beautiful!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/agentapi/connectionlog_test.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

EhabY and others added 4 commits October 12, 2026 15:39
@EhabY
feat: separate connection log methods from app identities
45ab85a
@EhabY
fix: address connection log review feedback
703cb96
- Remove the family filter and its presets, and make app repeatable.
- Drop a legacy type filter when a method is picked, and warn when the
  filter contains type.
- Describe app names as self-reported rather than client identities.
- List every method in convertConnectionLog and panic on unknown ones.
- Compare whole rows in the agentapi connection log test.
- Add a type filter migration table to the docs.
@EhabY
test(coderd/agentapi): drop comment that refers to a removed helper
3073dce
@EhabY
fix(coderd/database/migrations): renumber connection log migration to…
c33fc14
… 000617
@EhabY
EhabY force-pushed the feat/connection-log-methods branch from 036757d to c33fc14 Compare October 12, 2026 12:42
@EhabY EhabY mentioned this pull request Oct 12, 2026
Decide how connection log filters match workspace apps and ports #30650
Open
@EhabY
EhabY merged commit 5b060be into main Oct 12, 2026
36 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@EhabY
EhabY deleted the feat/connection-log-methods branch October 12, 2026 12:56
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@code-asher code-asher code-asher approved these changes
@nickvigilante nickvigilante Awaiting requested review from nickvigilante

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@EhabY EhabY

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@EhabY @nickvigilante @code-asher
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.