public void WriteCommonItems(IDiagnosticsProbe probe)
 {
     AddHostValues(probe);
     AddOperatingSystemValues(probe);
     AddProcessValues(probe);
     AddRunningInFullTrustValue(probe);
 }
Beispiel #2
0
        public static void WriteIntrospectionToFile(this IServiceBus bus, string fileName)
        {
            IDiagnosticsProbe probe = bus.Probe();
            var fs = new DotNetFileSystem();

            fs.DeleteFile(fileName);
            fs.Write(fileName, probe.ToString());
        }
Beispiel #3
0
 public void Inspect(IDiagnosticsProbe probe)
 {
     probe.Add("mt.service_count", _catalog.NumberOfServices);
     _catalog.Services
     .Where(svc => svc.Implements <IDiagnosticsSource>())
     .Cast <IDiagnosticsSource>()
     .Each(src => src.Inspect(probe));
 }
Beispiel #4
0
 /// <summary>
 /// Creates a new performance counter
 /// </summary>
 public DiagnosticsProbe(IDiagnosticsProbe counter)
 {
     this.Key         = counter.Uuid;
     this.Description = counter.Description;
     this.Name        = counter.Name;
     this.ReadingType = counter.Type.AssemblyQualifiedName;
     this.Components  = (counter as ICompositeDiagnosticsProbe)?.Value.Select(o => new DiagnosticsProbe(o)).ToList();
     this.Unit        = counter.Unit;
 }
Beispiel #5
0
 /// <summary>
 /// Add the specified probe
 /// </summary>
 public void Add(IDiagnosticsProbe probe)
 {
     lock (m_lockObject)
     {
         if (!this.m_probes.Any(p => p.Uuid == probe.Uuid))
         {
             this.m_probes.Add(probe);
         }
     }
 }
Beispiel #6
0
 public void Inspect(IDiagnosticsProbe probe)
 {
     probe.Add("mt.default_serializer", _defaults.Serializer.GetType().ToShortTypeName());
     _transportFactories.Each(
         (scheme, factory) =>
     {
         probe.Add("mt.transport",
                   string.Format("[{0}] {1}", scheme, factory.GetType().ToShortTypeName()));
     });
 }
        public void Consume(IConsumeContext <IGetBusStatus> context)
        {
            IDiagnosticsProbe probe = _bus.Probe();

            context.Respond(new BusStatus
            {
                Entries = probe.Entries
                          .Select(x => (IBusStatusEntry) new BusStatusEntry(x.Context, x.Key, x.Value))
                          .ToArray(),
            });
        }
 /// <summary>
 /// Creates a new performance counter
 /// </summary>
 public DiagnosticsProbeReading(IDiagnosticsProbe counter)
 {
     this.ReadingDate = DateTime.Now;
     this.ProbeKey    = counter.Uuid;
     if (counter is ICompositeDiagnosticsProbe)
     {
         this.Value = (counter as ICompositeDiagnosticsProbe).Value.Select(o => new DiagnosticsProbeReading(o)).ToArray();
     }
     else
     {
         this.Value = counter.Value;
     }
 }
Beispiel #9
0
        public void Inspect(IDiagnosticsProbe probe)
        {
            new StandardDiagnosticsInfo().WriteCommonItems(probe);

            probe.Add("mt.version", typeof(IServiceBus).Assembly.GetName().Version);
            probe.Add("mt.receive_from", Endpoint.Address);
            probe.Add("mt.control_bus", ControlBus.Endpoint.Address);
            probe.Add("mt.max_consumer_threads", MaximumConsumerThreads);
            probe.Add("mt.concurrent_receive_threads", ConcurrentReceiveThreads);
            probe.Add("mt.receive_timeout", ReceiveTimeout);

            EndpointCache.Inspect(probe);
            _serviceContainer.Inspect(probe);

            OutboundPipeline.View(pipe => probe.Add("zz.mt.outbound_pipeline", pipe));
            InboundPipeline.View(pipe => probe.Add("zz.mt.inbound_pipeline", pipe));
        }
 static void AddOperatingSystemValues(IDiagnosticsProbe probe)
 {
     probe.Add("os.version", Environment.OSVersion);
     probe.Add("os.bits", Environment.Is64BitOperatingSystem ? "x64" : "x32");
 }
Beispiel #11
0
 public void Inspect(IDiagnosticsProbe probe)
 {
     _endpointCache.Inspect(probe);
 }
 public void Inspect(IDiagnosticsProbe probe)
 {
     _endpointFactory.Inspect(probe);
 }
Beispiel #13
0
        public static void WriteIntrospectionToConsole(this IServiceBus bus)
        {
            IDiagnosticsProbe probe = bus.Probe();

            Console.Write(probe);
        }
Beispiel #14
0
 public void Inspect(IDiagnosticsProbe probe)
 {
     probe.Add("health_client", "on");
     probe.Add("health_client.interval", _heartbeatIntervalInSeconds);
 }
 static void AddProcessValues(IDiagnosticsProbe probe)
 {
     probe.Add("process.id", Process.GetCurrentProcess().Id);
     probe.Add("process.bits", Environment.Is64BitProcess ? "x64" : "x32");
 }
 static void AddHostValues(IDiagnosticsProbe probe)
 {
     probe.Add("host.machine_name", Environment.MachineName);
     probe.Add("net.version", Environment.Version);
 }
Beispiel #17
0
 public void Inspect(IDiagnosticsProbe probe)
 {
     _bus.Inspect(probe);
 }
 public void Inspect(IDiagnosticsProbe probe)
 {
     probe.Add("mt.network", _network);
 }
 static void AddRunningInFullTrustValue(IDiagnosticsProbe probe)
 {
     probe.Add("process.fulltrust", IsRunningInFullTrust());
 }