Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Feb 14, 2022

No description provided.

@ghost ghost requested a review from fcelda February 14, 2022 13:26
@ghost ghost linked an issue Feb 14, 2022 that may be closed by this pull request
@ghost ghost merged commit bddd3ef into develop Feb 16, 2022
@ghost ghost deleted the feature/dns-filter-for-dnstap branch February 16, 2022 14:16
_f_dnstap_types.set(type_pair.second);
_f_enabled.set(Filters::DnstapMsgType);
} catch (const std::exception &e) {
throw ConfigException(fmt::format("dnstap_msg_type error {}", e.what()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's go ahead and dump the keys in _dnstap_map_types in this message so the user knows which they can set

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

new_event(stamp);
// process in the "live" bucket. this will parse the resources if we are deep sampling
if (filtered) {
live_bucket()->process_filtered();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this have a return after it, or the process_dnstap below be in an else { } ? i'm confused why the unit test passes if so.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've called livebucket here that only performs

void DnsMetricsBucket::process_filtered()
{
    std::unique_lock lock(_mutex);
    ++_counters.filtered;
}

should I change the logic here to call metricsManager process_filtered and return?

Copy link
Contributor

@weyrick weyrick Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right calling process_filtered is good, but then it goes on to call process_dnstap with the payload, which means it would actually count all those metrics and not really filter it right?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dns filter for DNSTAP input

1 participant