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

chore: url validation & README to prevent gRPC footguns. #2130

Merged
merged 15 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
I hate prettier --fix
  • Loading branch information
lizthegrey committed Apr 30, 2021
commit 066b2834596acd5f0c5a11c11c2dbfa5de83d6a6
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function send<ExportItem, ServiceRequest>(
}

export function fixUrl(url: string): string {
lizthegrey marked this conversation as resolved.
Show resolved Hide resolved
const target = URL(url);
const target = new URL(url);
if (target.pathname !== '/') {
diag.warn('URL path should not be set when using grpc, ignoring.');
lizthegrey marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const testCollectorMetricExporter = (params: TestParams) =>
setTimeout(() => {
assert.ok(
typeof exportedData !== 'undefined',
'resource' + ' doesn't exist'
'resource' + " doesn't exist"
);
let resource;
if (exportedData) {
Expand All @@ -226,7 +226,7 @@ const testCollectorMetricExporter = (params: TestParams) =>
);
assert.ok(
typeof resource !== 'undefined',
'resource doesn't exist'
"resource doesn't exist"
);
if (resource) {
ensureResourceIsCorrect(resource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const testCollectorExporter = (params: TestParams) =>
setTimeout(() => {
assert.ok(
typeof exportedData !== 'undefined',
'resource' + ' doesn't exist'
'resource' + " doesn't exist"
);
let spans;
let resource;
Expand All @@ -188,7 +188,7 @@ const testCollectorExporter = (params: TestParams) =>

assert.ok(
typeof resource !== 'undefined',
'resource doesn't exist'
"resource doesn't exist"
);
if (resource) {
ensureResourceIsCorrect(resource);
Expand Down