Skip to content

feat(obs): introduce gpc.client.repo and gcp.client.artifact span attributes#4111

Closed
diegomarquezp wants to merge 87 commits intomainfrom
observability/tracing-attr/repo
Closed

feat(obs): introduce gpc.client.repo and gcp.client.artifact span attributes#4111
diegomarquezp wants to merge 87 commits intomainfrom
observability/tracing-attr/repo

Conversation

@diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Feb 12, 2026

This PR introduces a new generated class GapicProperties across all client GAPICs to store metadata such as the source repository and artifact name.

Changes

1. Gapic Generator (gapic-generator-java)

  • New Composer: Added GapicPropertiesClassComposer to generate a single GapicProperties.java per library.
  • Metadata Support: Updated Parser and PluginArgumentParser to accept repository and artifact (via GapicContext).
  • Stub Settings: Updated AbstractServiceStubSettingsClassComposer to integrate GapicProperties into the generated stub settings. Each service's StubSettings will have a getGapicPropertiess() method that will return new GapicProperties(). This is meant for later extension of GapicProperties in case there are service-specific methods.

2. GAX (gax-java)

  • Base Class: Added AbstractGapicProperties to provide a standard interface for library metadata.
  • Stub Integration: Updated StubSettings and ClientContext to hold and propagate GapicProperties.

3. Library Generation Scripts

  • Updated generate_library.sh and utilities.py to extract repository and artifact information from the configuration and pass them to the generator.

Manual test

The attributes are being recorded correctly.
image

diegomarquezp and others added 30 commits February 4, 2026 14:34
 - Rename SpanHandle to GaxSpan
 - Simplify adding op and attempt attributes
 - Use HashMap instead of ConcurrentHashMap
 - Remove error handling (for now)
…icTracer.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@diegomarquezp diegomarquezp changed the title feat(obs): introduce gpc.client.repo span attribute feat(obs): introduce gpc.client.repo and gcp.client.artifact span attributes Feb 24, 2026
@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed for 'java_showcase_integration_tests'

Failed conditions
74.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@diegomarquezp diegomarquezp marked this pull request as ready for review February 24, 2026 17:17
@diegomarquezp
Copy link
Contributor Author

Closing in favor of approach described in #4118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: l Pull request size is large. wip Work in Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants