Skip to content

WIP: Audit events#176

Draft
alec-w wants to merge 1 commit intomainfrom
basic-audit-log
Draft

WIP: Audit events#176
alec-w wants to merge 1 commit intomainfrom
basic-audit-log

Conversation

@alec-w
Copy link
Contributor

@alec-w alec-w commented Feb 16, 2026

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

The latest Buf updates on your PR. Results from workflow buf-ci / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 23, 2026, 2:08 PM

@gemini-code-assist
Copy link

Summary of Changes

Hello @alec-w, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a foundational audit logging mechanism within the SDK. It introduces new Protobuf definitions for audit log structures and a dedicated service to manage them. The changes include all necessary auto-generated code for Go and TypeScript, along with the integration of the new audit client into the existing Go SDK, ensuring that audit functionalities are readily available for use and testing.

Highlights

  • New Audit Log Protobuf Definition: Introduced a new Log message in proto/audit/v1alpha1/audit.proto to standardize audit log entries, including fields for ID, timestamp, event type, entity type, entity ID, and a message.
  • New Audit Service Protobuf Definition: Defined an AuditService in proto/connect/audit_service/v1alpha1/audit_service.proto with RPCs for AddLog and ListLogs, enabling interaction with audit log data.
  • Generated Go and TypeScript Code: Automatically generated Go and TypeScript code for the new audit log and audit service Protobuf definitions, including client and server stubs for gRPC and Connect.
  • Go SDK Client Integration: Integrated the new audit service client into the main Go SDK client set and provided a fake implementation for testing purposes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • gen/go/proto/audit/v1alpha1/audit.pb.go
    • Added generated Go code for the Log Protobuf message.
  • gen/go/proto/connect/audit_service/v1alpha1/audit_service.pb.go
    • Added generated Go code for the AuditService Protobuf messages and service definitions.
  • gen/go/proto/connect/audit_service/v1alpha1/audit_service_grpc.pb.go
    • Added generated Go gRPC client and server interfaces for the AuditService.
  • gen/go/proto/connect/audit_service/v1alpha1/v1alpha1connect/audit_service.connect.go
    • Added generated Go Connect client and handler for the AuditService.
  • gen/ts/proto/audit/v1alpha1/audit_pb.ts
    • Added generated TypeScript code for the Log Protobuf message.
  • gen/ts/proto/connect/audit_service/v1alpha1/audit_service_pb.ts
    • Added generated TypeScript code for the AuditService Protobuf messages and service definitions.
  • pkg/connect/client/audit/v1alpha1/audit.go
    • Added a new Go client for the audit service, including AddLog and ListLogs methods.
  • pkg/connect/client/audit/v1alpha1/fake/fake.go
    • Added a fake implementation for the audit service client, supporting AddLog and ListLogs with in-memory storage.
  • pkg/connect/client/clientset.go
    • Updated the main client set to include the new AuditV1Alpha1 client.
  • pkg/connect/client/fake/client/fakeclient.go
    • Updated the fake client set to include the new fake AuditV1Alpha1 client.
  • pkg/connect/client/fake/connect/fakeconnect.go
    • Updated the fake connect implementation to include a map for AuditLogs and a ValidateAuditLog method.
  • proto/audit/v1alpha1/audit.proto
    • Added the Protobuf definition for the Log message.
  • proto/connect/audit_service/v1alpha1/audit_service.proto
    • Added the Protobuf definition for the AuditService with AddLog and ListLogs RPCs.
Activity
  • The pull request is currently marked as 'WIP' (Work In Progress), indicating that the author is still actively developing and refining the changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new audit logging feature. It adds protobuf definitions for Log and AuditService, along with the corresponding generated Go and TypeScript code. It also includes a Go client and a fake client for the new service, and integrates them into the existing clientsets. The changes are well-structured. I have one suggestion to enhance the filtering capabilities in the AuditService.

string event_type = 1;
string entity_type = 2;
string entity_id = 3;
// TODO add time based filters

Choose a reason for hiding this comment

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

medium

The Filter message is missing time-based filtering capabilities, which is a crucial feature for an audit log service. The TODO comment indicates this is planned. I suggest adding start_time and end_time fields to enable filtering logs by a time range. You'll also need to import google/protobuf/timestamp.proto if you add these fields.

    google.protobuf.Timestamp start_time = 4;
    google.protobuf.Timestamp end_time = 5;

@alec-w alec-w force-pushed the basic-audit-log branch 3 times, most recently from 0d299a6 to 239c5ba Compare February 23, 2026 14:02
@alec-w alec-w changed the title WIP: log WIP: Audit events Feb 23, 2026
@alec-w alec-w self-assigned this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant