Skip to content

AxiomLogs

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:34

The logs capability for Axiom: checks a dataset is reachable and creates datasets that are missing.

  • Logs

new AxiomLogs(client, opts): AxiomLogs

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:44

client is a thunk — the token is resolved on first call, so describe() (which needs no auth) works without one.

() => object

AxiomLogsOptions

AxiomLogs

readonly key: "logs"

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:36

The capability key, always logs.

Logs.key


readonly providerName: "axiom" = "axiom"

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:38

The provider name, axiom.

Logs.providerName

checkToken(dataset?): Promise<{ ok: boolean; reason?: string; }>

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:84

Ask the provider whether it accepts the token. dataset names one the token is expected to hold (the caller’s own), which a provider may probe in place of a name it makes up: a token that cannot see a dataset that does not exist may still reach its own. ok: false only when the provider refused it; an error that says nothing about the token (a network failure, a missing token, an answer that could mean either) throws.

string

Promise<{ ok: boolean; reason?: string; }>

Logs.checkToken


describe(): Promise<{ envKeys: string[]; provider: string; }>

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:49

Returns the env var names the app reads at runtime for this provider.

Promise<{ envKeys: string[]; provider: string; }>

Logs.describe


ensureDataset(name): Promise<{ alreadyExists: boolean; }>

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:99

Create the aggregation dataset if it does not already exist. Idempotent.

string

Promise<{ alreadyExists: boolean; }>

Logs.ensureDataset


readDataset(name): Promise<LogsDataset>

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:68

Read a dataset without changing anything (holocron doctor logs). A dataset that is not there is exists: false, not an error, and one the token may not see is forbidden: true; any other failure throws.

string

Promise<LogsDataset>

Logs.readDataset


whoami(): Promise<{ dataset: string; ok: boolean; }>

Defined in: plugins/holocron-plugin-axiom/src/capabilities/logs.ts:56

Verify the token by fetching the target dataset’s info.

Promise<{ dataset: string; ok: boolean; }>

Logs.whoami