Skip to content

GCP.Observability reference

Source: src/GCP/Observability/BucketsDatasetsLink.ts

A Cloud Observability dataset link that creates a linked BigQuery dataset over an observability analytics dataset (typically _Trace/Spans).

A dataset may have only one link. Create, update, and delete are long-running operations. Links have no labels field — Alchemy stamps ownership into the description. linkId and the parent dataset are identity; replacement is delete-first because a dataset cannot hold two links.

Link the default trace dataset to BigQuery

const link = yield* GCP.Observability.BucketsDatasetsLink("Analytics", {
dataset:
"projects/my-project/locations/us-central1/buckets/_Trace/datasets/Spans",
description: "bigquery analytics",
});

Named link from bucket and dataset ids

const link = yield* GCP.Observability.BucketsDatasetsLink("Analytics", {
bucket: "_Trace",
dataset: "Spans",
linkId: "trace_spans",
displayName: "Trace spans",
});

Change props on the same logical id; the engine keeps the physical id.

const link = yield* GCP.Observability.BucketsDatasetsLink("Analytics", {
dataset:
"projects/my-project/locations/us-central1/buckets/_Trace/datasets/Spans",
description: "updated analytics",
});

Source: src/GCP/Observability/TraceScope.ts

A Cloud Observability trace scope — a named collection of projects whose traces are queried together in Trace Explorer.

Trace scopes exist only in the global location. They have no labels field, so Alchemy stamps ownership into the description for list / nuke. traceScopeId and location are identity — changing either replaces the scope. resourceNames and description update in place. The system-managed _Default scope cannot be deleted.

Generated name covering this project

const scope = yield* GCP.Observability.TraceScope("App", {
resourceNames: ["projects/my-project"],
description: "application traces",
});

Named scope

const scope = yield* GCP.Observability.TraceScope("App", {
traceScopeId: "app-traces",
resourceNames: ["projects/my-project"],
});

Change props on the same logical id; the engine keeps the physical id.

const scope = yield* GCP.Observability.TraceScope("App", {
resourceNames: ["projects/my-project"],
description: "all application traces",
});