Skip to content

feat(logging): split GAPIC from the logging handwritten package#8929

Open
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:feat/disentangle-logging-handwritten
Open

feat(logging): split GAPIC from the logging handwritten package#8929
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:feat/disentangle-logging-handwritten

Conversation

@quirogas

@quirogas quirogas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Decouple the handwritten Logging wrapper from the auto-generated GAPIC client layer by importing a standalone version of the GAPIC library. Standalone -api packages are now generated and maintained independently.

  • Removed embedded GAPIC generated code (src/v2/) and OwlBot files (owlbot.py, .OwlBot.yaml).
  • Added dependency on standalone @google-cloud/logging-api (^0.2.0).
  • Re-exported v2 and protos directly from @google-cloud/logging-api.
  • Preserved top-level and namespace access to all v2 GAPIC sub-clients (LoggingServiceV2Client, ConfigServiceV2Client, MetricsServiceV2Client).

Internal: b/531788771

@quirogas quirogas self-assigned this Jul 21, 2026
@product-auto-label product-auto-label Bot added the api: logging Issues related to the Cloud Logging API. label Jul 21, 2026

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

Copy link
Copy Markdown
Contributor

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 removes auto-generated GAPIC client files and configurations, transitioning the internal ./v2 module to an external dependency on @google-cloud/logging-api. Feedback suggests replacing the require statement for @google-cloud/logging-api with an ES6 import in src/index.ts to preserve TypeScript type safety and eliminate the need for an ESLint suppression comment.

Comment on lines 40 to +41
// eslint-disable-next-line @typescript-eslint/no-var-requires
const v2 = require('./v2');
const v2 = require('@google-cloud/logging-api');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using 'require' to import '@google-cloud/logging-api' forces the use of an 'eslint-disable' comment and types 'v2' as 'any', which bypasses TypeScript's type safety. Since '@google-cloud/logging-api' is now an external dependency, it can be cleanly imported using ES6 'import' syntax to preserve type safety and eliminate the lint warning suppression.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-var-requires
const v2 = require('./v2');
const v2 = require('@google-cloud/logging-api');
import * as v2 from '@google-cloud/logging-api';

@quirogas
quirogas marked this pull request as ready for review July 23, 2026 07:07
@quirogas
quirogas requested a review from a team as a code owner July 23, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the Cloud Logging API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant