Ejemplo n.º 1
0
        public void HasChangesWhenNewIntegrationGeneratedSpan()
        {
            var collector = new IntegrationTelemetryCollector();

            collector.RecordTracerSettings(new ImmutableTracerSettings(new TracerSettings()));

            collector.GetData();
            collector.HasChanges().Should().BeFalse();

            collector.IntegrationGeneratedSpan(IntegrationId);
            collector.HasChanges().Should().BeTrue();
        }
Ejemplo n.º 2
0
        public void HasChangesWhenNewIntegrationDisabled()
        {
            var collector = new IntegrationTelemetryCollector();

            collector.RecordTracerSettings(new ImmutableTracerSettings(new TracerSettings()));

            collector.GetData();
            collector.HasChanges().Should().BeFalse();

            collector.IntegrationDisabledDueToError(IntegrationId, "Testing!");
            collector.HasChanges().Should().BeTrue();
        }
Ejemplo n.º 3
0
        public void DoesNotHaveChangesWhenSameIntegrationRunning()
        {
            var collector = new IntegrationTelemetryCollector();

            collector.RecordTracerSettings(new ImmutableTracerSettings(new TracerSettings()));

            collector.GetData();
            collector.HasChanges().Should().BeFalse();

            collector.IntegrationRunning(IntegrationId);
            collector.HasChanges().Should().BeTrue();
            collector.GetData();

            collector.IntegrationRunning(IntegrationId);
            collector.HasChanges().Should().BeFalse();
        }