/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/cli/otel_basic/node_http_request.ts
11 строк
310 B
Yoshiya Hinosawa
feat(unstable/otel): add otel tracing to node:http.request (#28463)
13 мар 2025, 11:43
Не верифицирован
13 мар 2025, 11:43
c9930c5
Код
Авторство
О чём код?
import http from "node:http"; import { text } from "node:stream/consumers"; function request(url: string) { return new Promise((resolve) => { http.request(url, (res) => resolve(text(res))).end(); }); } await request("http://localhost:4545/echo.ts"); await request("http://localhost:4545/not-found");