API Reference
UsageEventRecord
Canonical usage event written to the telemetry ledger.
Inheritance
- Object
- UsageEventRecord
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.