Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to allow to track the resolution of DNS requests. #721

Merged
merged 16 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions automation/DataAggregator/parquet_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
]
PQ_SCHEMAS['navigations'] = pa.schema(fields)

# callstacks
fields = [
pa.field('visit_id', pa.int64(), nullable=False),
pa.field('request_id', pa.int64(), nullable=False),
Expand All @@ -197,8 +198,22 @@
]
PQ_SCHEMAS['callstacks'] = pa.schema(fields)

# incomplete_visits
fields = [
pa.field('visit_id', pa.int64(), nullable=False),
pa.field('instance_id', pa.uint32(), nullable=False)
]
PQ_SCHEMAS['incomplete_visits'] = pa.schema(fields)

# dns_responses
fields = [
pa.field('request_id', pa.int64(), nullable=False),
pa.field('crawl_id', pa.uint32(), nullable=False),
pa.field('visit_id', pa.int64(), nullable=False),
pa.field('hostname', pa.string()),
pa.field('addresses', pa.string()),
pa.field('canonical_name', pa.string()),
pa.field('is_TRR', pa.string()),
pa.field('time_stamp', pa.string(),nullable=False)
]
PQ_SCHEMAS['dns_responses'] = pa.schema(fields)
16 changes: 16 additions & 0 deletions automation/DataAggregator/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,19 @@ CREATE TABLE IF NOT EXISTS callstacks(
CREATE TABLE IF NOT EXISTS incomplete_visits (
visit_id INTEGER NOT NULL
);

/*
# DNS Requests
*/
CREATE TABLE IF NOT EXISTS dns_responses (
id INTEGER PRIMARY KEY AUTOINCREMENT,
request_id INTEGER NOT NULL,
crawl_id INTEGER NOT NULL,
visit_id INTEGER NOT NULL,
hostname TEXT,
addresses TEXT,
used_address TEXT,
canonical_name TEXT,
is_TRR INTEGER,
time_stamp DATETIME NOT NULL
);
9 changes: 8 additions & 1 deletion automation/Extension/firefox/feature.js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import {
CookieInstrument,
JavascriptInstrument,
HttpInstrument,
NavigationInstrument
NavigationInstrument,
DnsInstrument
} from "openwpm-webext-instrumentation";

import * as loggingDB from "./loggingdb.js";
Expand Down Expand Up @@ -84,6 +85,12 @@ async function main() {
let callstackInstrument = new CallstackInstrument(loggingDB);
callstackInstrument.run(config['crawl_id']);
}

if (config['dns_instrument']) {
loggingDB.logDebug("DNS instrumentation enabled");
let dnsInstrument = new DnsInstrument(loggingDB);
dnsInstrument.run(config['crawl_id']);
}
}

main();
Expand Down
12 changes: 6 additions & 6 deletions automation/Extension/firefox/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion automation/Extension/firefox/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"storage",
"alarms",
"downloads",
"tabs"
"tabs",
"dns"
],

"experiment_apis": {
Expand Down
Loading