private static Scope CreateScope(object multiplexer, object message)
        {
            var config      = StackExchangeRedisHelper.GetConfiguration(multiplexer);
            var hostAndPort = StackExchangeRedisHelper.GetHostAndPort(config);
            var rawCommand  = StackExchangeRedisHelper.GetRawCommand(multiplexer, message);

            return(Integrations.RedisHelper.CreateScope(hostAndPort.Item1, hostAndPort.Item2, rawCommand));
        }
Esempio n. 2
0
        private static Scope CreateScope(object batch, object message)
        {
            var multiplexerData = batch.As <BatchData>().Multiplexer;
            var hostAndPort     = StackExchangeRedisHelper.GetHostAndPort(multiplexerData.Configuration);
            var rawCommand      = message.As <MessageData>().CommandAndKey ?? "COMMAND";

            return(RedisHelper.CreateScope(Tracer.Instance, IntegrationName, hostAndPort.Host, hostAndPort.Port, rawCommand));
        }
Esempio n. 3
0
        private static Scope CreateScope(object batch, object message)
        {
            var multiplexer = StackExchangeRedisHelper.GetMultiplexer(batch);
            var config      = StackExchangeRedisHelper.GetConfiguration(multiplexer);
            var hostAndPort = StackExchangeRedisHelper.GetHostAndPort(config);
            var cmd         = StackExchangeRedisHelper.GetRawCommand(batch, message);

            return(RedisHelper.CreateScope(Tracer.Instance, IntegrationName, RedisAssembly, hostAndPort.Item1, hostAndPort.Item2, cmd));
        }
Esempio n. 4
0
        private static Scope CreateScope(object multiplexer, object message)
        {
            if (multiplexer.TryDuckCast <MultiplexerData>(out var multiplexerData))
            {
                var hostAndPort = StackExchangeRedisHelper.GetHostAndPort(multiplexerData.Configuration);
                if (message.TryDuckCast <MessageData>(out var messageData))
                {
                    var rawCommand = messageData.CommandAndKey ?? "COMMAND";
                    return(RedisHelper.CreateScope(Tracer.Instance, IntegrationId, hostAndPort.Host, hostAndPort.Port, rawCommand));
                }
            }

            return(null);
        }