@okode/ngx-dynatrace
v1.1.2
Published
Angular library to setup and configure Sentry projects easily on your applications.
Readme
Dynatrace for Angular
Angular library to setup and configure Sentry projects easily on your applications.
Install
npm i @okode/ngx-dynatraceUsage
Configure the Dynatrace Provider
import { provideDynatrace } from '@okode/ngx-dynatrace';
export const appConfig: ApplicationConfig = {
providers: [
...
provideDynatrace({
enabled: !isDevMode(), // Control monitoring
jsAgentUrl: '[YOUR_JS_AGENT_SCRIPT_URL]', // <- Go to your Dynatrace project and get the JSAgentUrl
}),
],
...
};API
TOKENS
DYNATRACE_CONFIG
InjectionToken<DynatraceConfig>('DYNATRACE_CONFIG');DynatraceInstrumentService
init()
DynatraceInstrumentService.init() => voidInitializes Dynatrace Agent.
Provider Functions
provideDynatrace(...)
provideDynatrace(config: DynatraceConfigProvider) => EnvironmentsProvidersProvides and initializes a Dynatrace agent.
| Param | Type | | :----: | :----------------------------------------------------------: | | config | DynatraceConfig | ((injector: Injector) => DynatraceConfig) |
Models
DynatraceConfig
| Param | Type | Description | | :--------: | :-----: | :------------------------: | | enabled | boolean | Habilita la instrumentación. Recomendamos desactivar la instrumentación en consntrucciones de desarrollo para no polucionar los informes de Dynatrace. | | jsAgentUrl | string | URL del agente JS de Dynatrace. Se usará para inyectar el script del agente de Dynatrace en el index.html de la aplicación. |
