Telemetry.SourceGroup
A group that organizes related telemetry sources together. Sources and
collectors join it through their sourceGroupId; deleting the group keeps
its sources, outside any group.
name defaults to a generated unique name. Removing sortIndex from the
config clears it. teamId replaces the group when changed.
Creating a source group
Section titled “Creating a source group”A group with a source in it
const backend = yield* BetterStack.Telemetry.SourceGroup("backend", { name: "Backend", sortIndex: 1,});yield* BetterStack.Telemetry.Source("checkout", { platform: "open_telemetry", sourceGroupId: backend.id,});Looking up an existing group
Section titled “Looking up an existing group”Reference a group by id
const existing = BetterStack.Telemetry.SourceGroup.lookup({ id: "123456" });Reference a group by name (fails with AmbiguousLookup when several share it)
const backend = BetterStack.Telemetry.SourceGroup.lookup({ name: "Backend" });name string
Group name. Defaults to a unique name generated from the stack, stage and logical id.
sortIndex number | null
Display order among your source groups. Lower values come first.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
Attributes
Section titled “Attributes”id string always set
The source_group's id.
createdAt string
When the group was created.
name string
Group name.
sortIndex number | null
Display order among your source groups. Lower values come first.
teamId string
Team that owns the group, such as t123.
teamName string
Name of the team that owns the group.
updatedAt string
When the group was last updated.
Lookup
Section titled “Lookup”SourceGroup.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
teamId string
Team that owns it, such as t123. Defaults to the credentials' team.