client.js 879 B

12345678910111213141516171819202122232425262728293031
  1. import { ServerRuntimeClient, applySdkMetadata } from '@sentry/core';
  2. /**
  3. * The Sentry Vercel Edge Runtime SDK Client.
  4. *
  5. * @see VercelEdgeClientOptions for documentation on configuration options.
  6. * @see ServerRuntimeClient for usage documentation.
  7. */
  8. class VercelEdgeClient extends ServerRuntimeClient {
  9. /**
  10. * Creates a new Vercel Edge Runtime SDK instance.
  11. * @param options Configuration options for this SDK.
  12. */
  13. constructor(options) {
  14. applySdkMetadata(options, 'vercel-edge');
  15. options._metadata = options._metadata || {};
  16. const clientOptions = {
  17. ...options,
  18. platform: 'javascript',
  19. // TODO: Grab version information
  20. runtime: { name: 'vercel-edge' },
  21. serverName: options.serverName || process.env.SENTRY_NAME,
  22. };
  23. super(clientOptions);
  24. }
  25. }
  26. export { VercelEdgeClient };
  27. //# sourceMappingURL=client.js.map