Add organization_id to internal event identifiers for workspace events

Summary

As part of the Organizations Feature Parity self-assessment (Q6.1), structured logs, audit events, and usage ping do not include organization_id metadata for workspace internal events.

What needs to change

Add organization to the identifiers list in each event YAML file so the internal events framework automatically records organization_id in structured logs and usage ping. Update the corresponding track_internal_event call in the workspace model to pass organization context explicitly where it is not already derivable from the project.

  • ee/config/events/track_started_workspaces.yml
  • ee/config/events/create_workspace_result.yml
  • ee/config/events/click_new_workspace_button.yml
  • ee/config/events/click_open_workspace_button.yml
  • ee/config/events/devfile_validate_result.yml

See ee/app/models/remote_development/workspace.rb#L343 where track_internal_event("track_started_workspaces", user: user, project: project, ...) is called without organization context.

References

  • Self-assessment: https://gitlab.com/gitlab-com/gl-infra/tenant-scale/organizations/organizations-feature-parity/-/work_items/13+
Edited Mar 04, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading