-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo setup #1
Conversation
packages/core/src/model/configuration/BacktraceConfiguration.ts
Outdated
Show resolved
Hide resolved
export type BacktraceBasicSubmissionInformation = { | ||
/** | ||
* The server address (submission URL) is required to submit exceptions from your project to your Backtrace instance. | ||
* | ||
* The Server Address must be in the following format: https://submit.backtrace.io/{subdomain}/{submission-token}/json. | ||
*/ | ||
url: string; | ||
timeout?: number; | ||
ignoreSslCertificate?: boolean; | ||
}; | ||
export type BacktraceLegacySubmitInformation = BacktraceBasicSubmissionInformation & { token: string }; | ||
export type BacktraceSubmissionInformation = BacktraceBasicSubmissionInformation | BacktraceLegacySubmitInformation; | ||
|
||
export type BacktraceMetricsSupport = { | ||
metricsSubmissionUrl?: string; | ||
enable: boolean; | ||
ignoreSslCertificate?: boolean; | ||
/** | ||
* Indicates how often crash free metrics are sent to Backtrace. | ||
* By default, session events are sent on application startup/finish, and every 30 minutes while the game is running. | ||
*/ | ||
autoSendInterval?: number; | ||
}; | ||
|
||
export type BasicBacktraceClientSettings = BacktraceBasicSubmissionInformation & { | ||
/** | ||
* Limits the number of reports the client will send per minute. If set to '0', there is no limit. | ||
* If set to a value greater than '0' and the value is reached, the client will not send any reports until the next minute. | ||
*/ | ||
rateLimit: number; | ||
/** | ||
* Attributes are additional metadata that can be attached to error and crash reports. You can use attributes to filter, | ||
* aggregate, analyze, and debug errors in the Backtrace console. | ||
*/ | ||
userAttributes?: Record<string, unknown>; | ||
/** | ||
* Attachments are additional files/data that can be send with error to Backtrace. | ||
*/ | ||
attachments?: BacktraceAttachment[]; | ||
|
||
/** | ||
* Metrics such as crash free users and crash free sessions | ||
*/ | ||
metrics?: BacktraceMetricsSupport; | ||
}; | ||
|
||
export type BacktraceConfiguration = BasicBacktraceClientSettings & BacktraceDatabaseConfiguration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we not using interface
here in these options (not the union ones)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why should we? Do we want to inherit from them? Is there any better reason to use interface than type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems more suitable to use an interface to define an object contract. I would use type
to define a type alias, like type BacktraceConfiguration = BasicBacktraceClientSettings & BacktraceDatabaseConfiguration;
, or type Key = string | number
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed adjusted code base on our conversation
packages/sdk-core/src/model/configuration/BacktraceDatabaseConfiguration.ts
Outdated
Show resolved
Hide resolved
* Monorepo setup * Package rename * Code review adjustements * Sdk core rename * Use unknown instead of any * Rename method * Added missing commands * Configuration changes * database as an option of a client * Merge client settings * Basic Backtrace configuration settings union * Optional token * Remove legacy - use direct submission url instead * Interface rename * Optional rate limit * Deduplication settings * Retry interval in ms instead of sec * Report getters * Use fields as attachments/attributes in the report object
commit 411e7f5 Merge: 68ef1d8 c366034 Author: Konrad Dysput <[email protected]> Date: Mon May 29 15:50:49 2023 +0200 Merge branch 'feature/monorepo-setup' into dev commit c366034 Author: Konrad Dysput <[email protected]> Date: Mon May 29 13:12:04 2023 +0200 Test setup (#2) commit 68ef1d8 Author: Konrad Dysput <[email protected]> Date: Mon May 29 13:11:27 2023 +0200 Monorepo setup (#1) * Monorepo setup * Package rename * Code review adjustements * Sdk core rename * Use unknown instead of any * Rename method * Added missing commands * Configuration changes * database as an option of a client * Merge client settings * Basic Backtrace configuration settings union * Optional token * Remove legacy - use direct submission url instead * Interface rename * Optional rate limit * Deduplication settings * Retry interval in ms instead of sec * Report getters * Use fields as attachments/attributes in the report object commit 13eb7aa Author: Konrad Dysput <[email protected]> Date: Mon May 29 13:08:29 2023 +0200 Use fields as attachments/attributes in the report object commit 3825fba Author: Konrad Dysput <[email protected]> Date: Mon May 29 13:01:35 2023 +0200 Report getters commit 0c7e62d Author: Konrad Dysput <[email protected]> Date: Mon May 29 13:01:16 2023 +0200 Retry interval in ms instead of sec commit 8b34c72 Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:57:49 2023 +0200 Deduplication settings commit 4328c3c Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:52:38 2023 +0200 Optional rate limit commit 889277c Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:47:55 2023 +0200 Interface rename commit 6abd107 Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:47:24 2023 +0200 Remove legacy - use direct submission url instead commit d84df8a Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:45:12 2023 +0200 Optional token commit 3eca08e Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:38:03 2023 +0200 Basic Backtrace configuration settings union commit 7506c02 Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:27:40 2023 +0200 Merge client settings commit 9309487 Author: Konrad Dysput <[email protected]> Date: Mon May 29 12:26:02 2023 +0200 database as an option of a client commit ce82a24 Author: Konrad Dysput <[email protected]> Date: Mon May 29 11:55:29 2023 +0200 Configuration changes commit 6674401 Author: Konrad Dysput <[email protected]> Date: Mon May 29 10:58:57 2023 +0200 Added missing commands commit 433f23b Author: Konrad Dysput <[email protected]> Date: Mon May 29 10:45:50 2023 +0200 Rename method
Why
This diff adds monorepo basic setup to the repository.