Gets B3 distributed tracing information, if available.
     This is returned as a list, ready to be formatted into Spring Cloud Sleuth compatible format.
191237
def _tracing_information():
    

    # We'll collate trace information if the B3 headers have been collected:
    values = b3.values()
    if values[b3.b3_trace_id]:
        # Trace information would normally be sent to Zipkin if either of sampled or debug ("flags") is set to 1
        # However we're not currently using Zipkin, so it's always false
        # exported = "true" if values[b3.b3_sampled] == '1' or values[b3.b3_flags] == '1' else "false"

        return [
            current_app.name if current_app.name else " - ",
            values[b3.b3_trace_id],
            values[b3.b3_span_id],
            "false",
        ]
87468
public static List<ServerDetector> lookupDetectors() {
        List<ServerDetector> detectors =
                ServiceObjectFactory.createServiceObjects("META-INF/detectors-default", "META-INF/detectors");
        // An detector at the end of the chain in order to get a default handle
        detectors.add(new FallbackServerDetector());
        return detectors;
    }
1092936
def get_trace(self, frame, tb):
        """"""
        import linecache
        frames = []
        stack, _ = self.get_stack(frame, tb)
        current = 0

        for i, (stack_frame, lno) in enumerate(stack):
            code = stack_frame.f_code
            filename = code.co_filename or '<unspecified>'
            line = None
            if filename[0] == '<' and filename[-1] == '>':
                line = get_source_from_byte_code(code)
                fn = filename
            else:
                fn = os.path.abspath(filename)
            if not line:
                linecache.checkcache(filename)
                line = linecache.getline(filename, lno, stack_frame.f_globals)
                if not line:
                    line = self.compile_cache.get(id(code), '')
                line = to_unicode_string(line, filename)
                line = line and line.strip()
            startlnos = dis.findlinestarts(code)
            lastlineno = list(startlnos)[-1][1]
            if frame == stack_frame:
                current = i
            frames.append({
                'file': fn,
                'function': code.co_name,
                'flno': code.co_firstlineno,
                'llno': lastlineno,
                'lno': lno,
                'code': line,
                'level': i,
                'current': frame == stack_frame
            })

        # While in exception always put the context to the top
        return stack, frames, current
12171
public LinkedList<ProbeIdEntry> getCombinedIdentifierList() {
    LinkedList<ProbeIdEntry> combinedList = new LinkedList<ProbeIdEntry>();

    for (String id : this.getProbeWrapper().getServiceContractIDs()) {
      combinedList.add(new ProbeIdEntry("scid", id));
    }
    for (String id : this.getProbeWrapper().getServiceInstanceIDs()) {
      combinedList.add(new ProbeIdEntry("siid", id));
    }
    return combinedList;
  }
273902
def get_all_accounts(self):
        """"""
        for address_hash, rlpdata in self.secure_trie.trie.iter_branch():
            if rlpdata != trie.BLANK_NODE:
                yield rlp.decode(rlpdata, Account, db=self.db, addr=address_hash)
370169
def get_tracks(self):
        """"""

        return _extract_tracks(
            self._request(self.ws_prefix + ".getInfo", cacheable=True), self.network
        )
43326
def get_details(self):
        
        data = []
        if isinstance(self.model, vCenterCloneVMFromVMResourceModel):
            data.append(VmDetailsProperty(key='Cloned VM Name', value=self.model.vcenter_vm))

        if isinstance(self.model, VCenterDeployVMFromLinkedCloneResourceModel):
            template = self.model.vcenter_vm
            snapshot = self.model.vcenter_vm_snapshot
            data.append(VmDetailsProperty(key='Cloned VM Name',value= '{0} (snapshot: {1})'.format(template, snapshot)))

        if isinstance(self.model, vCenterVMFromImageResourceModel):
            data.append(VmDetailsProperty(key='Base Image Name', value=self.model.vcenter_image.split('/')[-1]))

        if isinstance(self.model, vCenterVMFromTemplateResourceModel):
            data.append(VmDetailsProperty(key='Template Name', value=self.model.vcenter_template))

        return data
446487
def getTraceIdsByServiceName(self, service_name, end_ts, limit, order):
    
    self.send_getTraceIdsByServiceName(service_name, end_ts, limit, order)
    return self.recv_getTraceIdsByServiceName()
1212858
public java.util.List<AggregatedSourceStatus> getAggregatedSourceStatusList() {
        if (aggregatedSourceStatusList == null) {
            aggregatedSourceStatusList = new com.amazonaws.internal.SdkInternalList<AggregatedSourceStatus>();
        }
        return aggregatedSourceStatusList;
    }
205297
def get_trace_name(object):
    

    global TRACE_NAMES_CACHE
    global TRACE_WALKER_CACHE

    trace_name = TRACE_NAMES_CACHE.get(object)
    if trace_name is None:

        TRACE_NAMES_CACHE[object] = trace_name = get_object_name(object)

        if type(object) is property:
            object = object.fget

        module = inspect.getmodule(object)
        if module is None:
            return

        members = TRACE_WALKER_CACHE.get(module)
        if members is None:
            TRACE_WALKER_CACHE[module] = members = tuple(trace_walker(module))

        for (cls, member) in members:
            if object in (cls, untracer(member)):
                TRACE_NAMES_CACHE[object] = trace_name = \
                    ".".join(map(get_object_name, filter(lambda x: x is not None, (module, cls, member))))
                break

    return trace_name
733782
def get_connected_devices():
        
        all_daplinks = []
        all_interfaces = _get_interfaces()
        for interface in all_interfaces:
            try:
                new_daplink = DAPAccessCMSISDAP(None, interface=interface)
                all_daplinks.append(new_daplink)
            except DAPAccessIntf.TransferError:
                logger = logging.getLogger(__name__)
                logger.error('Failed to get unique id', exc_info=session.Session.get_current().log_tracebacks)
        return all_daplinks
184178
@Bean Tracing tracing(
      @Lazy Reporter<Span> reporter, @Value("${zipkin.self-tracing.sample-rate:1.0}") float rate) {
    return Tracing.newBuilder()
        .localServiceName("zipkin-server")
        .sampler(rate < 0.01 ? BoundarySampler.create(rate) : Sampler.create(rate))
        .currentTraceContext(currentTraceContext())
        .spanReporter(reporter)
        .build();
  }
44448
def _list_distributions(
    conn,
    name=None,
    region=None,
    key=None,
    keyid=None,
    profile=None,
):
    '''
    
    '''
    for dl_ in conn.get_paginator('list_distributions').paginate():
        distribution_list = dl_['DistributionList']
        if 'Items' not in distribution_list:
            # If there are no items, AWS omits the `Items` key for some reason
            continue
        for partial_dist in distribution_list['Items']:
            tags = conn.list_tags_for_resource(Resource=partial_dist['ARN'])
            tags = dict(
                (kv['Key'], kv['Value']) for kv in tags['Tags']['Items']
            )

            id_ = partial_dist['Id']
            if 'Name' not in tags:
                log.warning('CloudFront distribution %s has no Name tag.', id_)
                continue
            distribution_name = tags.pop('Name', None)
            if name is not None and distribution_name != name:
                continue

            # NOTE: list_distributions() returns a DistributionList,
            # which nominally contains a list of Distribution objects.
            # However, they are mangled in that they are missing values
            # (`Logging`, `ActiveTrustedSigners`, and `ETag` keys)
            # and moreover flatten the normally nested DistributionConfig
            # attributes to the top level.
            # Hence, we must call get_distribution() to get the full object,
            # and we cache these objects to help lessen API calls.
            distribution = _cache_id(
                'cloudfront',
                sub_resource=distribution_name,
                region=region,
                key=key,
                keyid=keyid,
                profile=profile,
            )
            if distribution:
                yield (distribution_name, distribution)
                continue

            dist_with_etag = conn.get_distribution(Id=id_)
            distribution = {
                'distribution': dist_with_etag['Distribution'],
                'etag': dist_with_etag['ETag'],
                'tags': tags,
            }
            _cache_id(
                'cloudfront',
                sub_resource=distribution_name,
                resource_id=distribution,
                region=region,
                key=key,
                keyid=keyid,
                profile=profile,
            )
            yield (distribution_name, distribution)
717052
def getTraceCombosByIds(self, trace_ids, adjust):
    
    self.send_getTraceCombosByIds(trace_ids, adjust)
    return self.recv_getTraceCombosByIds()
90428
Map<String, List<String>> getBlackListedTrackers() {

    Map<String, List<String>> blackListedTrackers
        = new HashMap<String, List<String>>();

    for (Map.Entry<String,List<String>> e : trackerToFailuresMap.entrySet()) {
       if (e.getValue().size() >= maxTaskFailuresPerTracker) {
         blackListedTrackers.put(e.getKey(), e.getValue());
       }
    }
    return blackListedTrackers;
  }
633793
def describe(Name,
             region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        trails = conn.describe_trails(trailNameList=[Name])
        if trails and trails.get('trailList'):
            keys = ('Name', 'S3BucketName', 'S3KeyPrefix',
                    'SnsTopicName', 'IncludeGlobalServiceEvents',
                    'IsMultiRegionTrail',
                    'HomeRegion', 'TrailARN',
                    'LogFileValidationEnabled', 'CloudWatchLogsLogGroupArn',
                    'CloudWatchLogsRoleArn', 'KmsKeyId')
            trail = trails['trailList'].pop()
            return {'trail': dict([(k, trail.get(k)) for k in keys])}
        else:
            return {'trail': None}
    except ClientError as e:
        err = __utils__['boto3.get_error'](e)
        if e.response.get('Error', {}).get('Code') == 'TrailNotFoundException':
            return {'trail': None}
        return {'error': __utils__['boto3.get_error'](e)}
1360680
def random_tracing():
    
    new_id = _uniq_id()
    return Tracing(
        span_id=new_id,
        parent_id=0,
        trace_id=new_id,
        traceflags=0)