/// <summary> /// Initialize is initialize the telemetry client. /// </summary> public void Initialize(ILogger logger) { this.SetUpDistributedTracing(); if (CorrelationSettings.Current.EnableDistributedTracing) { this.endToEndTraceHelper = new EndToEndTraceHelper(logger, this.options.Tracing.TraceReplayEvents); this.SetUpTelemetryClient(); this.SetUpTelemetryCallbacks(); } }
private readonly OrchestrationClientAttribute attribute; // for rehydrating a Client after a webhook internal DurableOrchestrationClient( IOrchestrationServiceClient serviceClient, DurableTaskExtension config, OrchestrationClientAttribute attribute, EndToEndTraceHelper traceHelper) { this.client = new TaskHubClient(serviceClient); this.traceHelper = traceHelper; this.config = config; this.hubName = config.HubName; this.attribute = attribute; }
private readonly OrchestrationClientAttribute attribute; // for rehydrating a Client after a webhook internal DurableOrchestrationClient( IOrchestrationServiceClient serviceClient, DurableTaskExtension config, OrchestrationClientAttribute attribute) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.client = new TaskHubClient(serviceClient); this.traceHelper = config.TraceHelper; this.hubName = attribute.TaskHub ?? config.Options.HubName; this.attribute = attribute; }
internal DurableOrchestrationContext( string hubName, string functionName, string functionVersion, EndToEndTraceHelper traceHelper) { this.hubName = hubName; this.orchestrationName = functionName; this.orchestrationVersion = functionVersion; this.traceHelper = traceHelper; this.owningThreadId = Thread.CurrentThread.ManagedThreadId; }
private IDurableOrchestrationClient GetDurableClient(IOrchestrationServiceClient orchestrationServiceClientMockObject) { var storageProvider = new DurabilityProvider("test", new Mock <IOrchestrationService>().Object, orchestrationServiceClientMockObject, "test"); DurableClientOptions durableClientOptions = new DurableClientOptions { ConnectionName = "Storage", TaskHub = "TestTaskHub", }; DurableTaskOptions durableTaskOptions = new DurableTaskOptions(); DurableClientAttribute attribute = new DurableClientAttribute(durableClientOptions); MessagePayloadDataConverter messagePayloadDataConverter = new MessagePayloadDataConverter(new JsonSerializerSettings(), true); var traceHelper = new EndToEndTraceHelper(new NullLogger <EndToEndTraceHelper>(), durableTaskOptions.Tracing.TraceReplayEvents); var durableOrchestrationClient = (IDurableOrchestrationClient) new DurableClient(storageProvider, null, attribute, messagePayloadDataConverter, traceHelper, durableTaskOptions); return(durableOrchestrationClient); }
public DurableTaskScaleMonitorTests(ITestOutputHelper output) { this.output = output; this.loggerFactory = new LoggerFactory(); this.loggerProvider = new TestLoggerProvider(output); this.loggerFactory.AddProvider(this.loggerProvider); this.traceHelper = new EndToEndTraceHelper(this.loggerFactory.CreateLogger(LogCategories.CreateTriggerCategory("DurableTask")), false); this.performanceMonitor = new Mock <DisconnectedPerformanceMonitor>(MockBehavior.Strict, this.storageConnectionString, this.hubName); this.scaleMonitor = new DurableTaskScaleMonitor( this.functionId, this.functionName, this.hubName, this.storageConnectionString, this.traceHelper, this.performanceMonitor.Object); }
internal DurableOrchestrationClientMock(IOrchestrationServiceClient serviceClient, DurableTaskExtension config, OrchestrationClientAttribute attribute, EndToEndTraceHelper traceHelper) : base(serviceClient, config, attribute, traceHelper) { }