API Reference
UsageEventRecord
Canonical usage event written to the telemetry ledger.
Inheritance
- Object
- UsageEventRecord
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method ClaudeSessionUsageAdapter.ImportAsync
- Method CodexSessionUsageAdapter.ImportAsync
- Method CopilotSessionUsageAdapter.ImportAsync
- Method InMemoryUsageEventStore.GetAll
- Method IUsageEventStore.GetAll
- Method IUsageTelemetryAdapter.ImportAsync
- Method LmStudioConversationUsageAdapter.ImportAsync
- Method SqliteUsageEventStore.GetAll
- Property UsageTelemetryProviderScanResult.Events
- Property UsageTelemetryQuickReportResult.Events
- Property UsageTelemetrySnapshot.Events
Accepted by parameters
- Method InMemoryUsageEventStore.TryGet
- Method InMemoryUsageEventStore.Upsert
- Method InMemoryUsageEventStore.UpsertRange
- Method IUsageAccountResolver.Resolve
- Method IUsageEventStore.TryGet
- Method IUsageEventStore.Upsert
- Method IUsageEventStore.UpsertRange
- Method SqliteUsageEventStore.TryGet
- Method SqliteUsageEventStore.Upsert
- Method SqliteUsageEventStore.UpsertRange
- Method UsageAccountBindingResolver.Resolve
- Method UsageDailyAggregateBuilder.Build
- Method UsageTelemetryApiPricing.BuildDisplayCost
- Method UsageTelemetryApiPricing.Estimate
- Method UsageTelemetryApiPricing.EstimateEvent
- Method UsageTelemetryIdentity.BuildDeduplicationKeys
- Constructor UsageTelemetryProviderScanResult.UsageTelemetryProviderScanResult
- Constructor UsageTelemetrySnapshot.UsageTelemetrySnapshot
- Method UsageTelemetryHeatmapDocumentBuilder.Build
- Method UsageTelemetryOverviewBuilder.Build
Constructors
public UsageEventRecord(String eventId, String providerId, String adapterId, String sourceRootId, DateTimeOffset timestampUtc) #Initializes a new usage event record.
Parameters
- eventId System.String
- providerId System.String
- adapterId System.String
- sourceRootId System.String
- timestampUtc System.DateTimeOffset
Methods
public IReadOnlyList<String> GetDeduplicationKeys() #IReadOnlyList<String>Returns dedupe keys in priority order for this event.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String EventId { get; } #Gets the stable event identifier supplied by the importer.
public String ProviderId { get; } #Gets the stable provider identifier.
public String AdapterId { get; } #Gets the stable adapter identifier.
public String SourceRootId { get; } #Gets the source root that produced the event.
public String ProviderAccountId { get; set; } #Gets or sets the provider-owned account identifier when available.
public String AccountLabel { get; set; } #Gets or sets the provider-specific account label.
public String PersonLabel { get; set; } #Gets or sets the optional person-level grouping label used to merge several provider accounts.
public String MachineId { get; set; } #Gets or sets the machine identifier or label associated with the event.
public String SessionId { get; set; } #Gets or sets the provider session identifier when available.
public String ThreadId { get; set; } #Gets or sets the provider thread or conversation identifier when available.
public String TurnId { get; set; } #Gets or sets the provider turn identifier when available.
public String ResponseId { get; set; } #Gets or sets the provider response identifier when available.
public DateTimeOffset TimestampUtc { get; } #Gets the UTC timestamp associated with the event.
public String Model { get; set; } #Gets or sets the model name associated with the event.
public String Surface { get; set; } #Gets or sets the provider surface such as CLI, web, or desktop app.
public Nullable<Int64> InputTokens { get; set; } #Gets or sets the input token count.
public Nullable<Int64> CachedInputTokens { get; set; } #Gets or sets the cached input token count.
public Nullable<Int64> OutputTokens { get; set; } #Gets or sets the output token count.
public Nullable<Int64> ReasoningTokens { get; set; } #Gets or sets the reasoning token count when exposed by the provider.
public Nullable<Int64> TotalTokens { get; set; } #Gets or sets the total token count.
public Nullable<Int64> DurationMs { get; set; } #Gets or sets the elapsed duration in milliseconds.
public Nullable<Decimal> CostUsd { get; set; } #Gets or sets the cost in USD when known.
public UsageTruthLevel TruthLevel { get; set; } #Gets or sets the confidence level for this event's quantitative values.
public String RawHash { get; set; } #Gets or sets the raw artifact hash used as the weakest dedupe fallback.