feat(cloud-query): add Azure integration with support for metrics and logs queries#3421
feat(cloud-query): add Azure integration with support for metrics and logs queries#3421
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryThis PR adds Azure Monitor as a first-class workbench observability integration across the full stack — Go gRPC provider, Elixir schema/conversion/tool modules, GraphQL schema, and React form components. A number of earlier review concerns have been addressed: the Two Go-side P2 items remain: the ISO 8601 duration regex is compiled on every metrics call (should be a package-level Confidence Score: 4/5Not safe to merge until the Go compilation errors flagged in previous review rounds are resolved; once those are fixed, only minor P2 concerns remain. New findings in this pass are all P2 (regex efficiency and edge-case validation). However, multiple Go compile-time errors raised in prior review rounds —
|
| Filename | Overview |
|---|---|
| go/cloud-query/internal/tools/provider_azure.go | New Azure provider implementing Metrics, MetricsSearch, and Logs; still contains previously-flagged compile-time errors (new() with value arguments on lines 93 and 136). |
| go/cloud-query/internal/tools/datasource/azure.go | Azure datasource implementation; previously-flagged new() compile errors remain on lines 63–69; also contains a regex compiled on every call and an ISO 8601 validator that accepts degenerate inputs. |
| go/cloud-query/internal/tools/client/azure.go | Azure SDK client wrapper; creates new SDK client objects on every Logs/Metrics/MetricsSearch call rather than caching them in the struct. |
| lib/console/ai/tools/workbench/observability/metrics.ex | Adds per-query Azure metrics options (resource_id, metrics_namespace, aggregation, etc.) as an embedded schema; previously-missing metrics_namespace is now properly populated from per-query input. |
| lib/console/schema/workbench_tool.ex | Adds azure: 13 to the Tool enum and an AzureConnection embed with the four required credential fields; changeset validates all four are required. |
| lib/console/ai/tools/workbench/observability/logs.ex | Adds per-query Azure logs options (resource_id) as an embedded schema; correctly passes it to the gRPC backend. |
| assets/src/components/workbenches/tools/WorkbenchToolFormFields.tsx | AzureFormFields component collects Subscription ID, Tenant ID, Client ID, and Client Secret; orphaned Resource ID field has been removed. |
| assets/src/components/workbenches/tools/WorkbenchToolForm.tsx | Adds Azure to INITIAL_TOOL_CONFIG_BY_TYPE with only the four valid credential fields; previously-problematic resourceId field has been removed. |
Reviews (6): Last reviewed commit: "refactor: remove `resourceId` field from..." | Re-trigger Greptile
|
@greptileai there are no compilation failures. |
|
@greptileai review |
…ic per-query options
…-add-azure-metrics-integration-for-cloud-query
|
@greptileai review |
|
@greptileai Remember about go 1.26 language changes
Review again. |
|
@greptileai review |
…support, remove provider-specific options from default schemas
|
@floreks looks like there's a fair number of merge conflicts here |
…-add-azure-metrics-integration-for-cloud-query
|
resolved conflicts |
|
This will need to be adjusted to the latest workbench frontend changes. |
This pull request adds support for Azure Monitor as a configurable tool in the workbench, enabling users to connect to Azure and query metrics and logs from Azure resources. The changes span the frontend, backend Go models, GraphQL schema, and documentation to fully integrate Azure as a first-class observability integration.
The most important changes are:
Frontend integration and configuration:
WorkbenchToolType.Azurethroughout the frontend, including configuration forms, tool type lists, labels, categories, and icon mapping inWorkbenchToolForm.tsxandworkbenchToolsUtils.tsx.AzureFormFieldsinWorkbenchToolFormFields.tsxto collect Azure credentials and resource information from the user.Backend Go model and API updates:
models_gen.go.GraphQL and gRPC/protobuf support:
workbench.graphql.toolquery.prototo addAzureConnection, support Azure as aToolConnection, and introduced Azure-specific options for metrics queries.Documentation:
docs/api-reference.md) and README to document Azure Monitor support, required credentials, query options, and usage details.These changes collectively enable users to configure and use Azure Monitor as an observability tool within the workbench, with full support across the stack.
Test Plan
Locally and on dev env
Checklist
Plural Flow: console