Skip to content

Conversation

@oleiade
Copy link
Contributor

@oleiade oleiade commented Sep 23, 2025

What?

This pull request adds comprehensive documentation for the new k6/x/dns extension module, which enables DNS resolution testing in k6. The documentation introduces the module, details its API, provides usage examples, explains error handling, and describes the metrics generated. The changes are organized into three new documentation pages: an overview, and detailed pages for the resolve and lookup functions.

New documentation for the DNS extension:

Overview and Introduction

  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/_index.md with an overview of the k6/x/dns module, its key features, use cases, API summary, available metrics, and practical code examples for DNS testing scenarios.

API Reference and Usage Details

  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/resolve.md with detailed documentation for the dns.resolve() function, including parameters, return values, usage examples (A and AAAA record resolution, multiple DNS servers, performance comparison), error handling, metrics, and important notes on usage.
  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/lookup.md with detailed documentation for the dns.lookup() function, including parameters, return values, usage examples (basic lookup, comparison with custom DNS, load testing, configuration validation), error handling, metrics, and usage notes.

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

💻 Deploy preview deleted (docs: add comprehensive k6/x/dns extension documentation).

@oleiade oleiade force-pushed the document-k6-x-dns branch 2 times, most recently from 8083bb5 to a096157 Compare October 20, 2025 13:16
@oleiade oleiade self-assigned this Oct 20, 2025
@oleiade oleiade marked this pull request as ready for review October 20, 2025 13:18
@oleiade oleiade requested review from a team and heitortsergent as code owners October 20, 2025 13:18
@oleiade oleiade requested review from ankur22, codebien and joanlopez and removed request for a team and ankur22 October 20, 2025 13:18
Copy link
Collaborator

@heitortsergent heitortsergent left a comment

Choose a reason for hiding this comment

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

Thanks for creating these docs @oleiade 🙇 .

A lot of my comments are just removing the code shortcode, we only need them for tabbed code samples.

You can also replace some of the <!-- md-k6:skip --> statements and just add a <!-- md-k6:skipall --> at the top of the page. I'm happy to make that change if you want to, just let me know. 🙇

AGENTS.md Outdated
@@ -0,0 +1,30 @@
# Repository Guidelines
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is really helpful @oleiade! I just added the AGENTS.md file with the instructions we have for general technical writing guidance in a previous PR, but maybe we can merge them together?

}
```

{{< /code >}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{{< /code >}}

@heitortsergent heitortsergent self-assigned this Oct 27, 2025
@heitortsergent heitortsergent added the Area:extensions Issues about the extension ecosystem label Oct 27, 2025
- Add complete documentation for k6/x/dns module with _index.md overview
- Create resolve.md documenting dns.resolve() function with parameters, examples, and error handling
- Create lookup.md documenting dns.lookup() function for system DNS resolution
- Include installation instructions, API reference, and metrics documentation
- Add comprehensive examples for IPv4/IPv6 resolution, performance testing, and validation
- Use IPv6 DNS server (2606:4700:4700::1111) in IPv6 examples for consistency
- Replace check() usage with k6-jslib-testing expect() assertions throughout examples
- Follow k6 documentation conventions matching existing API documentation structure
@oleiade
Copy link
Contributor Author

oleiade commented Nov 10, 2025

Thanks @heitortsergent! Addressed all your comments 🙇🏻

oleiade and others added 5 commits November 10, 2025 08:43
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
@oleiade oleiade merged commit 0ef876e into main Nov 10, 2025
9 checks passed
@oleiade oleiade deleted the document-k6-x-dns branch November 10, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area:extensions Issues about the extension ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants