getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
8.01k stars 1.58k forks source link

[v9] Give type hints to `scope.setSDKProcessingMetadata()` #14341

Open lforst opened 4 days ago

lforst commented 4 days ago

Description

Right now the argument passed to scope.setSDKProcessingMetadata() is typed as { [key: string]: unknown; }. We would like to be a bit more strict for certain fields on the metadata and type it as

interface MetadataOrWhatever {
  request?: RequestEventData;
  [key: string]: unknown;
}