Initialize Jaeger Tracer based on the passed `jaeger_client.Config`.
        Save it to `opentracing.tracer` global variable.
        Only the first call to this method has any effect.
170185
def initialize_tracer(self, io_loop=None):
        

        with Config._initialized_lock:
            if Config._initialized:
                logger.warn('Jaeger tracer already initialized, skipping')
                return
            Config._initialized = True

        tracer = self.new_tracer(io_loop)

        self._initialize_global_tracer(tracer=tracer)
        return tracer
574114
synchronized void sendInitialMessage(Node node) {
    io.opencensus.proto.trace.v1.TraceConfig currentTraceConfigProto =
        TraceProtoUtils.getCurrentTraceConfig(traceConfig);
    // First config must have Node set.
    CurrentLibraryConfig firstConfig =
        CurrentLibraryConfig.newBuilder().setNode(node).setConfig(currentTraceConfigProto).build();
    sendCurrentConfig(firstConfig);
  }
718987
public static synchronized void init(LogProviderConfig config) {
        if (config == null)
            throw new NullPointerException("LogProviderConfig must not be null");

        if (loggingConfig.compareAndSet(null, config)) {
            // Only initialize FFDC once -- all subsequent changes go through update
            // The synchronization of this method is gratuitous (just makes us feel better), 
            // it is called while the system is single threaded at startup. 

            // config.getTrDelegate() must not return null -- it should either
            // return a dummy/disabled delegate, or throw an exception so that startup
            // does not proceed.
            delegate = config.getFfdcDelegate();
            if (delegate == null)
                throw new NullPointerException("LogProviderConfig must provide a FFDCFilterService delegate");

            delegate.init(config);
        }
    }
1144343
@Singleton
    @Primary
    @Requires(classes = JaegerTracer.Builder.class)
    JaegerTracer.Builder jaegerTracerBuilder(Configuration configuration) {
        JaegerTracer.Builder tracerBuilder = resolveBuilder(configuration);
        if (this.configuration.isExpandExceptionLogs()) {
            tracerBuilder.withExpandExceptionLogs();
        }
        if (this.configuration.isZipkinSharedRpcSpan()) {
            tracerBuilder.withZipkinSharedRpcSpan();
        }
        if (reporter != null) {
            tracerBuilder.withReporter(reporter);
        }
        if (sampler != null) {
            tracerBuilder.withSampler(sampler);
        }
        return tracerBuilder;
    }
216880
def Init():
  """"""
  global INIT_RAN
  if INIT_RAN:
    return

  # Set up a temporary syslog handler so we have somewhere to log problems
  # with ConfigInit() which needs to happen before we can start our create our
  # proper logging setup.
  syslog_logger = logging.getLogger("TempLogger")
  if os.path.exists("/dev/log"):
    handler = logging.handlers.SysLogHandler(address="/dev/log")
  else:
    handler = logging.handlers.SysLogHandler()
  syslog_logger.addHandler(handler)

  try:
    config_lib.SetPlatformArchContext()
    config_lib.ParseConfigCommandLine()
  except config_lib.Error:
    syslog_logger.exception("Died during config initialization")
    raise

  metric_metadata = server_metrics.GetMetadata()
  metric_metadata.extend(communicator.GetMetricMetadata())

  stats_collector = prometheus_stats_collector.PrometheusStatsCollector(
      metric_metadata, registry=prometheus_client.REGISTRY)
  stats_collector_instance.Set(stats_collector)

  server_logging.ServerLoggingStartupInit()

  bs_registry_init.RegisterBlobStores()
  all_decoders.Register()
  all_parsers.Register()
  registry.Init()

  # Exempt config updater from this check because it is the one responsible for
  # setting the variable.
  if not config.CONFIG.ContextApplied("ConfigUpdater Context"):
    if not config.CONFIG.Get("Server.initialized"):
      raise RuntimeError("Config not initialized, run \"grr_config_updater"
                         " initialize\". If the server is already configured,"
                         " add \"Server.initialized: True\" to your config.")

  INIT_RAN = True
1103340
def initialize(self, app: Flask, app_config):
        
        debug = app_config["debug"]
        port = app_config["http.port"]
        if debug:
            self.started_on_port = port
            app.run(host="0.0.0.0", debug=True, port=port)
        else:
            for port in range(port, port + 50):
                self.http_server = WSGIServer(('0.0.0.0', port), app)
                try:
                    self.http_server.start()
                except OSError:
                    # try next port
                    continue
                self.started_on_port = port
                break
258530
@PostConstruct
    public void init() {
        log.debug("Registering JVM gauges");
        metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet());
        metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet());
        metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet());
        metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge());
        metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(getPlatformMBeanServer()));
        metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet());
        metricRegistry.register(PROP_METRIC_REG_OS, new OperatingSystemGaugeSet(getOperatingSystemMXBean()));

        if (jhipsterProperties.getMetrics().getJmx().isEnabled()) {
            log.debug("Initializing Metrics JMX reporting");
            JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build();
            jmxReporter.start();
        }
        if (jhipsterProperties.getMetrics().getLogs().isEnabled()) {
            log.info("Initializing Metrics Log reporting");
            Marker metricsMarker = MarkerFactory.getMarker("metrics");
            final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry)
                .outputTo(LoggerFactory.getLogger("metrics"))
                .markWith(metricsMarker)
                .convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS)
                .build();
            reporter.start(jhipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS);
        }
    }
310038
public void init(SecorConfig config, OffsetTracker offsetTracker, FileRegistry fileRegistry,
                     UploadManager uploadManager, MessageReader messageReader,
                     ZookeeperConnector zookeeperConnector, MetricCollector metricCollector,
                     DeterministicUploadPolicyTracker deterministicUploadPolicyTracker) {
        mConfig = config;
        mOffsetTracker = offsetTracker;
        mFileRegistry = fileRegistry;
        mUploadManager = uploadManager;
        mMessageReader = messageReader;
        mZookeeperConnector = zookeeperConnector;
        mTopicFilter = mConfig.getKafkaTopicUploadAtMinuteMarkFilter();
        mMetricCollector = metricCollector;
        mDeterministicUploadPolicyTracker = deterministicUploadPolicyTracker;
        if (mConfig.getOffsetsStorage().equals(SecorConstants.KAFKA_OFFSETS_STORAGE_KAFKA)) {
            isOffsetsStorageKafka = true;
        }
    }
1346589
public static synchronized void initialise() throws SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "initialise");
        if (!initialised)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "not previously initialised");

            //   new com.ibm.ws.sib.jfapchannel.impl.ClientConnectionManagerImpl();
            Class clientImpl = instance.getClass();
            Method initialiseMethod;
            try
            {
                initialiseMethod = clientImpl.getMethod("initialise", new Class[] {});
                initialiseMethod.invoke(clientImpl, new Object[] {});
                initialised = true; // D223632
            } catch (Exception e)
            {
                FFDCFilter.processException
                                (e, "com.ibm.ws.sib.jfapchannel.ClientConnectionManager.initialise",
                                 JFapChannelConstants.CLNTCONNMGR_INITIALISE_01);

                SibTr.error(tc, "EXCP_DURING_INIT_SICJ0002", new Object[] { "initialise", JFapChannelConstants.CLIENT_MANAGER_CLASS, e });
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    SibTr.exception(tc, e);
                throw new SIResourceException(e);
            }

        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "initialise");
    }
187028
@Singleton
    @Primary
    @Requires(classes = JaegerTracer.Builder.class)
    Tracer jaegerTracer(JaegerTracer.Builder tracerBuilder) {
        Tracer tracer = tracerBuilder.build();
        if (!GlobalTracer.isRegistered()) {
            GlobalTracer.register(tracer);
        }
        return tracer;
    }
599269
def _initialize_honeybadger(self, config):
        
        if config.get('DEBUG', False):
            honeybadger.configure(environment='development')

        honeybadger_config = {}
        for key, value in iteritems(config):
            if key.startswith(self.CONFIG_PREFIX):
                honeybadger_config[key[len(self.CONFIG_PREFIX):].lower()] = value

        honeybadger.configure(**honeybadger_config)
        honeybadger.config.set_12factor_config()
118253
def _init_config(self):
        
        options = self.parser.parse_args()
        if options.config is None and options.input is None:
            self.parser.print_help()
            sys.exit(2)

        if options.config is not None:
            configFactory = ConfigFactory()
            config = configFactory.load_from_file(options.config)
        else:
            config = ConfigObject()

        if options.input is not None:
            config["input"]["locations"] = [str(x) for x in options.input]
        if options.arguments is not None:
            config["input"]["arguments"] = dict((x.partition("=")[0], x.partition("=")[2]) for x in options.arguments)

        if options.output is not None:
            config["output"]["location"] = options.output

        if options.no_validate is not None:
            config["input"]["validate"] = not options.no_validate

        if options.dry_run is not None:
            self.dry_run = options.dry_run
        if options.watch is not None:
            self.watch = options.watch
        if options.traceback is not None:
            self.traceback = options.traceback

        if options.quiet is not None:
            self.logger.setLevel(logging.WARNING)
        if options.silence is not None:
            logging.disable(logging.CRITICAL)

        configService = ConfigService()
        configService.validate(config)
        self.config = config
1144464
def initialize(self, all_options):
    
    if self.run_info:
      raise AssertionError('RunTracker.initialize must not be called multiple times.')

    # Initialize the run.

    # Select a globally unique ID for the run, that sorts by time.
    millis = int((self._run_timestamp * 1000) % 1000)
    # run_uuid is used as a part of run_id and also as a trace_id for Zipkin tracing
    run_uuid = uuid.uuid4().hex
    run_id = 'pants_run_{}_{}_{}'.format(
      time.strftime('%Y_%m_%d_%H_%M_%S', time.localtime(self._run_timestamp)),
      millis,
      run_uuid
    )

    info_dir = os.path.join(self.get_options().pants_workdir, self.options_scope)
    self.run_info_dir = os.path.join(info_dir, run_id)
    self.run_info = RunInfo(os.path.join(self.run_info_dir, 'info'))
    self.run_info.add_basic_info(run_id, self._run_timestamp)
    self.run_info.add_info('cmd_line', self._cmd_line)

    # Create a 'latest' symlink, after we add_infos, so we're guaranteed that the file exists.
    link_to_latest = os.path.join(os.path.dirname(self.run_info_dir), 'latest')

    relative_symlink(self.run_info_dir, link_to_latest)

    # Time spent in a workunit, including its children.
    self.cumulative_timings = AggregatedTimings(os.path.join(self.run_info_dir,
                                                             'cumulative_timings'))

    # Time spent in a workunit, not including its children.
    self.self_timings = AggregatedTimings(os.path.join(self.run_info_dir, 'self_timings'))

    # Hit/miss stats for the artifact cache.
    self.artifact_cache_stats = ArtifactCacheStats(os.path.join(self.run_info_dir,
                                                                'artifact_cache_stats'))

    # Daemon stats.
    self.pantsd_stats = PantsDaemonStats()

    self._all_options = all_options

    return (run_id, run_uuid)
316822
def init_app(self, app, entry_point_group='invenio_oauth2server.scopes',
                 **kwargs):
        
        self.init_config(app)

        state = _OAuth2ServerState(app, entry_point_group=entry_point_group)

        app.extensions['invenio-oauth2server'] = state
        return state
548391
def init_logger(name=None):
    """"""
    global g_logger
 
    if g_logger is None:
        g_logger = logging.getLogger(name=name)
    else:
        logging.shutdown()
        g_logger.handlers = []
 
    g_logger.setLevel(logging.DEBUG)
1217192
public void initialize(@Observes @Initialized(ApplicationScoped.class) Object ignore) {
        log.debugf("Initializing [%s]", this.getClass().getName());
        try {
            feedSessionListenerProducer = new BiFunction<String, Session, WsSessionListener>() {
                @Override
                public WsSessionListener apply(String key, Session session) {
                    // In the future, if we need other queues/topics that need to be listened to, we add them here.
                    final Endpoint endpoint = Constants.FEED_COMMAND_QUEUE;
                    BasicMessageListener<BasicMessage> busEndpointListener = new FeedBusEndpointListener(session, key,
                            endpoint);
                    return new BusWsSessionListener(Constants.HEADER_FEEDID, key, endpoint, busEndpointListener);
                }
            };
            wsEndpoints.getFeedSessions().addWsSessionListenerProducer(feedSessionListenerProducer);

            uiClientSessionListenerProducer = new BiFunction<String, Session, WsSessionListener>() {
                @Override
                public WsSessionListener apply(String key, Session session) {
                    // In the future, if we need other queues/topics that need to be listened to, we add them here.
                    final Endpoint endpoint = Constants.UI_COMMAND_QUEUE;
                    BasicMessageListener<BasicMessage> busEndpointListener = new UiClientBusEndpointListener(
                            commandContextFactory, busCommands, endpoint);
                    return new BusWsSessionListener(Constants.HEADER_UICLIENTID, key, endpoint, busEndpointListener);
                }
            };
            wsEndpoints.getUiClientSessions().addWsSessionListenerProducer(uiClientSessionListenerProducer);
        } catch (Exception e) {
            log.errorCouldNotInitialize(e, this.getClass().getName());
        }

    }
252750
@Default
  @Produces
  @Singleton
  public Tracer produceTracer() {
    // TCK casts to MockTracer so we cannot use GlobalTracer as a bean!
    Tracer tracer = TracerResolver.resolveTracer();
    if (tracer == null) {
      tracer = GlobalTracer.get();
    }
    logger.info(String.format("Registering %s to GlobalTracer and providing it as CDI bean.", tracer));
    GlobalTracer.register(tracer);
    return tracer;
  }