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

Extend metrics for HTTP Request node #3223

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Apr 29, 2022

 PASS  test/TelemetryHelpers.test.ts
  getDomainBase should return protocol plus domain
    ✓ in valid URLs (4 ms)
    ✓ in malformed URLs (3 ms)
  getDomainPath should return pathname plus query string
    anonymizing numeric IDs
      ✓ in valid URLs (4 ms)
      ✓ in malformed URLs (3 ms)
    anonymizing UUIDs
      ✓ in valid URLs (12 ms)
      ✓ in malformed URLs (7 ms)
    anonymizing emails
      ✓ in valid URLs (2 ms)
      ✓ in malformed URLs (1 ms)

Test Suites: 1 passed, 1 total
Tests:       8 passed, 8 total
Snapshots:   0 total
Time:        4.355 s

@ivov ivov added feature Large self-contained feature n8n team Authored by the n8n team labels Apr 29, 2022
Comment on lines +192 to +193
nodeItem.domain_base = getDomainBase(url);
nodeItem.domain_path = getDomainPath(url);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI namings chosen by Product.

try {
const url = new URL(raw);

if (!url.hostname) throw new Error('Malformed URL');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

URL constructor may succeed and still misdetect hostname as part of pathname, e.g. when misspelling the protocol.

@ivov ivov marked this pull request as ready for review May 2, 2022 12:42
@ivov ivov changed the base branch from custom-operations to n8n-3496-discoverability-in-app-nodes-flow May 11, 2022 07:27
@ivov
Copy link
Contributor Author

ivov commented May 11, 2022

Closing in favor of #3282

@ivov ivov closed this May 11, 2022
@ivov ivov deleted the n8n-3371-extend-telemetry branch May 11, 2022 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large self-contained feature n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants