Skip to content

internal_log_rate_limit should be ON by default #22410

@pront

Description

@pront

Warning

This issue is of medium complexity. The first attempt to do this exposed a bug in how the flood detector handles tags. So to tackle this issue effectively, one must first understand the implementation in lib/tracing-limit/src/lib.rs.

The internal_log_rate_limit tag determines if traces will be throttled or not. Currently, we have to specify this tag to each and every call that we want to throttle e.g.

fn emit(self) {
        error!(
            message = "Service poll ready failed.",
            error = ?self.error,
            error_type = error_type::REQUEST_FAILED,
            stage = error_stage::SENDING,
            internal_log_rate_limit = true,
        );

This is opens up the possibility of forgetting to add this tag. Instead, we should just opt-in when we want to output every single event with internal_log_rate_limit = false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions