Exemplo n.º 1
0
    def __init__(self, data, skip_renormalization=False, **kwargs):
        is_renormalized = isinstance(data, EventDict) or (
            isinstance(data, NodeData) and isinstance(data.data, EventDict)
        )

        if not skip_renormalization and not is_renormalized:
            normalizer = StoreNormalizer(is_renormalize=True, enable_trimming=False)
            data = normalizer.normalize_event(dict(data))

        CanonicalKeyDict.__init__(self, data, **kwargs)
Exemplo n.º 2
0
    def __init__(self, data, **kwargs):
        rust_renormalized = _should_skip_to_python(data.get('event_id'))
        if rust_renormalized:
            normalizer = StoreNormalizer(is_renormalize=True)
            data = normalizer.normalize_event(dict(data))

        metrics.incr('rust.renormalized', tags={'value': rust_renormalized})

        with configure_scope() as scope:
            scope.set_tag("rust.renormalized", rust_renormalized)

        CanonicalKeyDict.__init__(self, data, **kwargs)
Exemplo n.º 3
0
    def __init__(self, data, skip_renormalization=False, **kwargs):
        is_renormalized = (isinstance(data, EventDict)
                           or (isinstance(data, NodeData)
                               and isinstance(data.data, EventDict)))

        with configure_scope() as scope:
            scope.set_tag("rust.is_renormalized", is_renormalized)
            scope.set_tag("rust.skip_renormalization", skip_renormalization)
            scope.set_tag("rust.renormalized", "null")

        if not skip_renormalization and not is_renormalized:
            rust_renormalized = _should_skip_to_python(data.get('event_id'))
            if rust_renormalized:
                normalizer = StoreNormalizer(is_renormalize=True)
                data = normalizer.normalize_event(dict(data))

            metrics.incr('rust.renormalized',
                         tags={'value': rust_renormalized})

            with configure_scope() as scope:
                scope.set_tag("rust.renormalized", rust_renormalized)

        CanonicalKeyDict.__init__(self, data, **kwargs)
Exemplo n.º 4
0
    def __init__(self, data, skip_renormalization=False, **kwargs):
        is_renormalized = (
            isinstance(data, EventDict) or
            (isinstance(data, NodeData) and isinstance(data.data, EventDict))
        )

        with configure_scope() as scope:
            scope.set_tag("rust.is_renormalized", is_renormalized)
            scope.set_tag("rust.skip_renormalization", skip_renormalization)
            scope.set_tag("rust.renormalized", "null")

        if not skip_renormalization and not is_renormalized:
            rust_renormalized = _should_skip_to_python(data.get('event_id'))
            if rust_renormalized:
                normalizer = StoreNormalizer(is_renormalize=True)
                data = normalizer.normalize_event(dict(data))

            metrics.incr('rust.renormalized',
                         tags={'value': rust_renormalized})

            with configure_scope() as scope:
                scope.set_tag("rust.renormalized", rust_renormalized)

        CanonicalKeyDict.__init__(self, data, **kwargs)