Skip to content

Shivaneep o11y template logic - #9064

Draft
shivanee-p wants to merge 2 commits into
shivaneep-o11y-gax-tracingfrom
shivaneep-o11y-template-logic
Draft

Shivaneep o11y template logic#9064
shivanee-p wants to merge 2 commits into
shivaneep-o11y-gax-tracingfrom
shivaneep-o11y-template-logic

Conversation

@shivanee-p

Copy link
Copy Markdown
Contributor

No description provided.

@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 introduces support for telemetry tracing by adding the enableTelemetryTracing option to the GAPIC generator, client options, and templates, along with corresponding unit tests. The feedback highlights a potential compilation issue where getGaxTracer is imported in the generated templates but not yet used, which will trigger unused local errors if noUnusedLocals is enabled in the generated client's configuration.

import jsonProtos = require('../../protos/protos.json');
import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax';
{%- endif %}
{% if api.enableTelemetryTracing %} import { getGaxTracer } from 'google-gax'; {% endif %}

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.

high

Importing getGaxTracer without using it in the generated client code will cause compilation errors (e.g., TS6133: 'getGaxTracer' is declared but its value is never read) when noUnusedLocals is enabled in the generated client's tsconfig.json.

If the telemetry tracing logic is not yet implemented in the templates, please remove this import or implement the tracer usage in this pull request.

import {getJSON} from '../json-helper.cjs';
// @ts-ignore
const dirname = path.dirname(fileURLToPath(import.meta.url));
{% if api.enableTelemetryTracing %} import { getGaxTracer } from 'google-gax'; {% endif %}

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.

high

Importing getGaxTracer without using it in the generated client code will cause compilation errors (e.g., TS6133: 'getGaxTracer' is declared but its value is never read) when noUnusedLocals is enabled in the generated client's tsconfig.json.

If the telemetry tracing logic is not yet implemented in the templates, please remove this import or implement the tracer usage in this pull request.

@shivanee-p
shivanee-p changed the base branch from main to shivaneep-o11y-flag August 3, 2026 23:53
@shivanee-p
shivanee-p changed the base branch from shivaneep-o11y-flag to shivaneep-o11y-gax-tracing August 4, 2026 01:17
@shivanee-p
shivanee-p force-pushed the shivaneep-o11y-template-logic branch from 317f5d3 to 445a74d Compare August 4, 2026 01:55
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