@breadstone/archipel-platform-analytics
Classes
| Class | Description |
|---|---|
| AnalyticsClientPort | Abstract port for analytics and error tracking clients. Each provider (Sentry, Application Insights, Datadog) must implement this contract so that the consuming application can switch providers without changing business logic. |
| AnalyticsHealthIndicator | Health indicator for the analytics infrastructure. Calls AnalyticsClientPort.ping to verify provider readiness. |
| AnalyticsModule | NestJS module providing generic analytics and error tracking infrastructure. The specific analytics provider (Sentry, Application Insights, Datadog) is selected via the options. |
| AppInsightsAnalyticsClient | Azure Application Insights implementation of the AnalyticsClientPort. Uses the applicationinsights SDK for error tracking and analytics. |
| DatadogAnalyticsClient | Datadog implementation of the AnalyticsClientPort. Uses the dd-trace SDK for error tracking and analytics. |
| NoopAnalyticsClient | No-op implementation of the AnalyticsClientPort. Suitable for development, testing, or environments where analytics is disabled. |
| SentryAnalyticsClient | Sentry implementation of the AnalyticsClientPort. Uses the official @sentry/node SDK for error tracking and analytics. |
Interfaces
| Interface | Description |
|---|---|
| IAnalyticsBreadcrumb | Represents a breadcrumb entry for analytics trail. |
| IAnalyticsModuleOptions | Configuration options for the AnalyticsModule. |
| IAnalyticsUser | Represents user context for analytics tracking. |
Type Aliases
| Type Alias | Description |
|---|---|
| AnalyticsLevel | Severity level for analytics messages. |
Variables
| Variable | Description |
|---|---|
| APPINSIGHTS_CONFIG_ENTRIES | Configuration entries required by the Application Insights analytics provider. |
| APPLICATIONINSIGHTS_CONNECTION_STRING | Application Insights connection string. |
| DATADOG_CONFIG_ENTRIES | Configuration entries required by the Datadog analytics provider. |
| DD_ENV | Datadog environment identifier (e.g. production, staging). |
| DD_SERVICE | Datadog service name. |
| SENTRY_CONFIG_ENTRIES | Configuration entries required by the Sentry analytics provider. |
| SENTRY_DSN | Sentry DSN for error tracking. |
| SENTRY_ENVIRONMENT | Sentry environment identifier (e.g. production, staging). |