Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(bigquery): Add labels support to BigQueryToolConfig for job tracking and monitoring #3582

Copy link
Copy link
@Faraaz1994

Description

@Faraaz1994
Issue body actions

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Is your feature request related to a problem? Please describe.
Currently, the BigQuery tool in ADK does not provide a way for developers to add custom labels to BigQuery jobs created by their agents. This makes it difficult to:

  • Track and monitor BigQuery costs associated with specific agents or use cases
  • Organize and filter BigQuery jobs in the Google Cloud Console
  • Implement billing attribution and resource organization strategies
  • Differentiate between jobs from different environments (dev, staging, production)

While the tool automatically adds an internal adk-bigquery-tool label with the caller_id, there's no mechanism for users to add their own custom labels for tracking and monitoring purposes.

Describe the solution you'd like
Add a labels configuration field to BigQueryToolConfig that allows users to specify custom key-value pairs to be applied to all BigQuery jobs executed by the agent. The solution should:

  • Configuration Option: Add an optional labels parameter to BigQueryToolConfig accepting a dictionary of string key-value pairs
  • Validation: Ensure labels follow BigQuery's requirements (non-empty string keys, string values)
  • Job Application: Automatically apply configured labels to all BigQuery jobs alongside the existing internal labels Documentation: Provide clear documentation on how to use labels for tracking and monitoring

Example usage:

from google.adk.tools.bigquery import BigQueryToolConfig

config = BigQueryToolConfig(
    labels={
        "environment": "production",
        "team": "data-analytics",
        "agent": "sales-insights"
    }
)
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

needs review[Status] The PR/issue is awaiting review from the maintainer[Status] The PR/issue is awaiting review from the maintainerplanned[Status] This issue is planned to be work on by ADK eng team[Status] This issue is planned to be work on by ADK eng teamtools[Component] This issue is related to tools[Component] This issue is related to tools

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.