(self, service_name)
return ["%s:%s" % (name, value) for name, value in iteritems(match.groupdict())]
Use a named regexp on the current service_name to create extra tags
        Example HAProxy service name: be_edge_http_sre-prod_elk
        Example named regexp: be_edge_http_(?P<team>[a-z]+)\\-(?P<env>[a-z]+)_(?P<app>.*)
        Resulting tags: ['team:sre','env:prod','app:elk']
Use a named regexp on the current service_name to create extra tags
        Example HAProxy service name: be_edge_http_sre-prod_elk
        Example named regexp: be_edge_http_(?P<team>[a-z]+)\\-(?P<env>[a-z]+)_(?P<app>.*)
        Resulting tags: ['team:sre','env:prod','app:elk']
Use a named regexp on the current service_name to create extra tags Example HAProxy service name : be_edge_http_sre - prod_elk Example named regexp : be_edge_http_ ( ?P<team > [ a - z ] + ) \\ - ( ?P<env > [ a - z ] + ) _ ( ?P<app > . * ) Resulting tags : [ team : sre env : prod app : elk ]
def _tag_from_regex(self, service_name):
        """
        Use a named regexp on the current service_name to create extra tags
        Example HAProxy service name: be_edge_http_sre-prod_elk
        Example named regexp: be_edge_http_(?P<team>[a-z]+)\\-(?P<env>[a-z]+)_(?P<app>.*)
        Resulting tags: ['team:sre','env:prod','app:elk']
        """
        if not self.tags_regex or not service_name:
            return []

        match = re.compile(self.tags_regex).match(service_name)

        if not match:
            return []

        # match.groupdict() returns tags dictionary in the form of {'name': 'value'}
        # convert it to Datadog tag LIST: ['name:value']
        return ["%s:%s" % (name, value) for name, value in iteritems(match.groupdict())]
def _tag_from_regex ( self , service_name ) : if not self . tags_regex or not service_name : return [ ] match = re . compile ( self . tags_regex ) . match ( service_name ) if not match : return [ ] # match.groupdict() returns tags dictionary in the form of {'name': 'value'} # convert it to Datadog tag LIST: ['name:value'] return [ "%s:%s" % ( name , value ) for name , value in iteritems ( match . groupdict ( ) ) ]