Skip to content

Introduce a SENTRY_CONFIG parameter to extend and ultimately replace individual Sentry config parameters #20380

@jeremystretch

Description

@jeremystretch

NetBox version

v4.4.1

Feature type

Change to existing functionality

Proposed functionality

Introduce a new config parameter named SENTRY_CONFIG. This will define a dictionary of arguments to pass to sentry_sdk.init() when the application is initialized.

Eventually, this parameter is expected to replace the following existing parameters; however, backward compatibility will be retained for now.

  • SENTRY_DSN
  • SENTRY_SAMPLE_RATE
  • SENTRY_SEND_DEFAULT_PII
  • SENTRY_TRACES_SAMPLE_RATE

Example usage:

SENTRY_CONFIG = {
    "dsn": "https://[email protected]/0",
    "send_default_pii": True,
    "before_send_transaction": strip_sensitive_data,
}

Use case

This approach enables NetBox administrators to pass additional Sentry initialization arguments for which a NetBox configuration parameter does not exist.

Database changes

N/A

External dependencies

N/A

Metadata

Metadata

Assignees

Labels

complexity: lowRequires minimal effort to implementstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions