InvergeDocs
.NETAPI reference

Events

Events in the .NET SDK.

EventsResource

class
class Inverge.Nexus.Resources.EventsResource

Product analytics — events correlated to a person and a session.

Track is buffered by default and shipped on a background loop, so it costs microseconds inside a request handler and never fails it. Call FlushAsync (or the client's) before a short-lived process exits.

ConstantDescription
const int MaxBatchSize = 1000The most events the ingest endpoint accepts in one request.

BatchAsync()

method
Task<int> BatchAsync(IEnumerable<NexusEvent> events, NexusTelemetryContext? context = null, CancellationToken cancellationToken = default)

Sends many events that share one identity immediately, bypassing the buffer.

Parameters

Prop

Type

Returns Task<int> — How many events the server wrote.

FlushAsync()

method
Task FlushAsync(CancellationToken cancellationToken = default)

Ships every buffered event right now.

Parameters

Prop

Type

Track()

method
void Track(string name, object? properties = null, DateTimeOffset? timestamp = null, NexusTelemetryContext? context = null)

Captures one event. Returns as soon as it is buffered.

nexus.Events.Track("order_placed", new { total = 42, currency = "USD" });

Parameters

Prop

Type

On this page