core-sre-replace-env
v1.0.15
Published
Use this package together with `core-sre-otel-web`, this script will replace the otlp endpoint and service name placeholders on the core-sre-otel-web library with OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT from the env variables.
Downloads
113
Readme
core-sre-replace-env
Use this package together with core-sre-otel-web
, this script will replace the otlp endpoint and service name placeholders on the core-sre-otel-web library with OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT from the env variables.
Installation
npm install core-sre-replace-env
Usage
Option 1 - via ENV
add REPLACE_FILE, the target file path(glob) to your javascript file where the core-sre-otel-web
is bundled with.
export REPLACE_FILE = app/main.*.js
package.json
{
"scripts": {
"start": "replace && node index.js"
}
}
Option 2 - via args
{
"scripts": {
"start": "replace app/main.*.js && node index.js"
}
}