1.0.1 • Published 6 months ago

@matrexsoftwares/dynatrace-injector v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Dynatrace Injector

A lightweight CLI utility built by Matrex Softwares to automatically inject your Dynatrace RUM (Real User Monitoring) JavaScript snippet into your index.html file as part of your build pipeline.


✨ Features

  • 💡 Automatically injects Dynatrace script before </head>
  • 🔒 Supports secure injection using environment variables
  • 🛠️ Easy integration into CI/CD or post-build steps
  • 🔧 Clean, CLI-first design

🚀 Usage

You can run the injector as part of your build step or as a post-build hook.

1. Set Required Environment Variables

Before running the CLI, make sure the following environment variables or CLI flags are set:

npx dynatrace-injector \
  --env-id <your-env-id> \                # e.g., bos01241
  --api-token <your-api-token> \          # e.g., dt0c01.xxxxx
  --entity-id <your-application-entity-id> \  # e.g., APPLICATION-A1C2C8560A8B3044
  --index-path <path-to-index.html>       # e.g., ./dist/index.html