🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

dynatrace-ionic-instrumentation

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynatrace-ionic-instrumentation

This package provides scripts which are able to automatically instrument your Ionic project with Dynatrace during the build.

Source
npmnpm
Version
0.1.6
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Dynatrace Ionic Instrumentation

This packages contains scripts which are automatically instrumenting an Ionic application. If you want to test this instrumentation you can use our demo application which we published on GitHub.

Installation / Instrumentation

The instrumention is fast and easy and supports both Ionic 1 and Ionic 2. Make sure that you started the application at least one time (as described above), to be sure that the application is working on your computer. Following steps will automatically instrument the Ionic application:

  • Execute the command npm install dynatrace-ionic-instrumentation in your project folder.
  • The instrument.properties file will now appear in your root project folder after the installation of the instrumentation tool has finished.
  • Fill in the configuration in the instrument.properties with the information of your own dynatrace environment.
  • Add different source directories in the instrument.properties if you have other similar frameworks like electron.

The property file (instrument.properties) looks like this:

## Instrumentation Properties - Please define in order to download the JS Agent ##
SOURCE_DIRECTORY = ["src"]

# General Settings - 'DYNATRACE SAAS' 'DYNATRACE MANAGED' OR 'DYNATRACE APPMON'
TYPE = "DYNATRACE SAAS"

# (ONLINE / Include agent or OFFLINE / Download agent on the fly)
AGENT_LOCATION = "OFFLINE"

# DYNATRACE SaaS/Managed API Access 
ENVIRONMENT_ID = "fdq95078" 
CLUSTER_URL = "fdq95078.dev.dynatracelabs.com"
APPLICATION_ID = "203B8CC2009EE62F"
API_TOKEN = "H0yp6L_QSFyi3iaphSBJX"

# APPMON API Access
APPMON_URL = ""
APPLICATION_NAME = "easyTravel portal"
PROFILE = "easyTravel"
API_USER = ""
API_PASSWORD = ""

This is the download and default version of the properties. Following points have to be configured:

  • SOURCE_DIRECTORIES: The source directory at the beginning is the source directoy of your Ionic project. For most Ionic 2 projects this directory is called "src". In Ionic 1 this directory can also be called "www". As you already noticed this value is an array. So you can add several folders and all of them get instrumented. This is especially important if you have got different index.html file because of different frameworks.
  • TYPE: Dynatrace Saas is configured as default type. Other type options might be Dynatrace Managed or Dynatrace AppMon.
  • AGENT_LOCATION: You can choose wether you want to download the whole agent (OFFLINE) and include the agent in the build or if you want to add only a tag (ONLINE) in the HTML which is downloading the agent on the fly (when the application is starting).
  • Beneath the other options you can find the API configuration for Dynatrace Saas/Managed and Dynatrace AppMon. Depending on which TYPE you use, make sure that you fill in the configuration.

You are done! After those two simple and short steps your project will be instrumented automatically by our scripts when you build the application. Be aware that the used agent is only working when you make a native build (Android, iOS) [e.g. ionic build android]. The command ionic serve --lab will therefore sadly not work. If you use ionic serve --lab the application would still be instrumented and will start as usual, but the agent can not communicate with the server (Because of CORS, as described above).

Keywords

Hybrid

FAQs

Package last updated on 21 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts