public void CreateConsumer_ErrorConsumer() { var eventTarget = EventTarget.ForErrorReporting(_projectId, _errorClient); var options = ErrorReportingOptions.Create(eventTarget); var consumer = options.CreateConsumer(); Assert.IsType <GrpcErrorEventConsumer>(consumer); }
public void ErrorReportingOptions_EventTarget() { var eventTarget = EventTarget.ForErrorReporting(_projectId, _errorClient); var bufferOptions = BufferOptions.SizedBuffer(); var options = ErrorReportingOptions.Create(eventTarget, bufferOptions); Assert.Equal(eventTarget, options.EventTarget); Assert.Equal(bufferOptions, options.BufferOptions); }
public void ErrorReporting() { var eventTarget = EventTarget.ForErrorReporting(_errorClient); Assert.Equal(EventTargetKind.ErrorReporting, eventTarget.Kind); Assert.Equal(_errorClient, eventTarget.ErrorReportingClient); Assert.Null(eventTarget.LoggingClient); Assert.Null(eventTarget.LogTarget); Assert.Null(eventTarget.LogName); Assert.Null(eventTarget.MonitoredResource); }
public override ErrorReportingOptions GetOptions() => ErrorReportingOptions.Create(EventTarget.ForErrorReporting());