MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / getHostName

Function getHostName

packages/deno/src/client.ts:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import type { DenoClientOptions } from './types';
4
5function getHostName(): string | undefined {
6 // Deno.permissions.querySync is not available on Deno Deploy
7 if (!Deno.permissions.querySync) {
8 return undefined;
9 }
10
11 const result = Deno.permissions.querySync({ name: 'sys', kind: 'hostname' });
12 return result.state === 'granted' ? Deno.hostname() : undefined;
13}
14
15/**
16 * The Sentry Deno SDK Client.

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected