/// <summary>
        /// Returns <see cref="Configuration"/> object from environmental variables.
        /// </summary>
        public static Configuration FromEnv(ILoggerFactory loggerFactory)
        {
            ILogger logger = loggerFactory.CreateLogger <Configuration>();

            return(new Configuration(GetProperty(JaegerServiceName), loggerFactory)
                   .WithTracerTags(TracerTagsFromEnv(logger))
                   .WithReporter(ReporterConfiguration.FromEnv(loggerFactory))
                   .WithSampler(SamplerConfiguration.FromEnv(loggerFactory))
                   .WithCodec(CodecConfiguration.FromEnv(loggerFactory)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns <see cref="Configuration"/> object from environmental variables.
        /// </summary>
        public static Configuration FromEnv(ILoggerFactory loggerFactory)
        {
            ILogger logger = loggerFactory.CreateLogger <Configuration>();

            return(new Configuration(GetProperty(JaegerServiceName), loggerFactory)
                   .WithTracerTags(TracerTagsFromEnv(logger))
                   .WithTraceId128Bit(GetPropertyAsBool(JaegerTraceId128Bit, logger).GetValueOrDefault(false))
                   .WithReporter(ReporterConfiguration.FromEnv(loggerFactory))
                   .WithSampler(SamplerConfiguration.FromEnv(loggerFactory))
                   .WithCodec(CodecConfiguration.FromEnv(loggerFactory)));
        }