Beispiel #1
0
        static async Task Main(string[] args)
        {
            // setup
            var zipkinServer = args[0];

            ZipkinHelper.StartZipkin(zipkinServer);

            // message fetch
            var message = await FetchAMessage();

            if (message != null)
            {
                await ProcessMessage(message);

                Console.WriteLine($"Message '{message.Text}' was processed!");
            }
            else
            {
                Console.WriteLine($"No messages available!");
            }

            // teardown
            ZipkinHelper.StopZipkin();
            Console.ReadKey();
        }
Beispiel #2
0
        static async Task Main(string[] args)
        {
            // setup
            var zipkinServer = args[0];

            ZipkinHelper.StartZipkin(zipkinServer);

            // message sending
            var text = Guid.NewGuid().ToString();

            // need to create current trace before using ProducerTrace
            Trace.Current = Trace.Create();
            await TracedProduceMessage(text);

            Console.WriteLine($"Message '{text}' sent to message center!");

            // teardown
            ZipkinHelper.StopZipkin();
            Console.ReadKey();
        }