For the complete documentation index, see llms.txt. This page is also available as Markdown.

Hybrid runner reference

There are additional settings that can be configured through the use of these additional docker container run environment variables.

Environment variable
Value

BODY_LIMIT

Define the maximum request body size. The default value is 30mb.

CUSTOM_API_ROUTE

Define additional path location to the resources in hybrid runner. Example: If this value is set to mypath/torun then the call to v3/execute would change from http://localhost:3000/mytenant/api/v3/execute to http://localhost:3000/mypath/torun/mytenant/api/v3/execute.

PORT

Set the service listening port. The default value is 3000.

UPLOAD_ENABLE

Allow Wasms to be uploaded to the Hybrid Runner directly using the /upload endpoint. This is not recommended to be used for production. The default value is false.

Manage access to filesystem

By default, the runner requires read-write permissions to the following paths.

Directory and path
Description

Tenant resolver /project/src/app/src/tenant_resolver

Purpose: Stores dynamically generated tenant-specific resolver JavaScript files.

Write pattern: Created once per tenant on the first request, rarely modified thereafter.

Example: externalResolver_<tenant_name>.js

Service map cache /project/src/app/src/services/servicemap

From nodegen-server 1.50.1 and onwards

/project/src/app/src/servicemap

Purpose: Caches service metadata (servicemap.json) to resolve models. This avoids repeated directory scanning.

Write pattern: Generated on application startup in offline mode. Recreated when model location changes.

Files created: servicemap.json

Temporary file storage /tmp

Purpose: Store and caches Wasm. This is used by Node.js as the tmp library working directory.

Write pattern: Frequent writes during model downloads, cleaned up by graceful cleanup handlers.

Cleanup: Periodic cleanup of files older than 7 days.

In nodegen-server versions >=1.50.2, the locations of these paths can be customized using environment variables. If the account does not have read-write permissions to the locations above, this can be used to adjust the default paths.

Environment variable
Value

CACHE_DIR

Cache write directory for Tenant resolver and Service map cache.

Default value are the paths noted above.

  • To set an absolute path, start the path using /, e.g. /var/runner_cache.

  • To set a relative path within the working directory, start the path using an eligible folder character, e.g. runner_cache would be set to ./runner_cache.

TEMP_DIR

Temporary file storage directory.

Default value is the path noted above.

  • To set an absolute path, start the path using /, e.g. /tmp.

  • To set a relative path within the working directory, start the path using an eligible folder character, e.g. tmp would be set to ./tmp.

Control log output

In nodegen-server versions >=1.50.2, more variables are available to manage log output.

Environment variable
Value

LOG_PATH

Default: Logs are recorded to stdout only.

When defined, logs are saved to the defined location.

  • To set an absolute path, start the path using /, e.g. /var/runner_logs.

  • To set a relative path within the working directory, start the path using an eligible folder character, e.g. runner_logs would be set to ./runner_logs.

LOG_ROTATION_ENABLED

Default: true

This removes files that exceed the maximum log storage criteria.

LOG_MAX_SIZE

Default: 10M

Maximum file size before rotation:

  • K for kilobytes.

  • M for megabytes.

  • G for gigabytes.

LOG_ROTATION_INTERVAL

Default: 1d

Time-based rotation interval:

  • h for hours.

  • d for days.

  • M for months.

LOG_MAX_FILES

Default: 14

Maximum number of rotated log files to keep.

LOG_COMPRESSION

Default: false

Whether gzip compression is used on the log files.

Configure OpenTelemetry

Starting from nodegen-server versions >=1.46.0, the image implements support for OpenTelemetry. OpenTelemetry is an observability framework and toolkit to facilitate the generation, export, collection of telemetry data. The package conducts auto-instrumentation using @opentelemetry/auto-instrumentations-node. The data collected includes:

Traces
Metrics
Attributes
  • HTTP request/response details

  • Route information

  • Request duration

  • Error details

  • Correlation IDs

  • Tenant information

  • Request counts

  • Error rates

  • Request duration

  • Memory usage (heap, RSS)

  • Service name and version

  • Environment

  • HTTP method and route

  • Status codes

  • Request IDs

Below are links to documentation on integrating OpenTelemetry with popular Application Performance Monitoring (APM) applications:

The configuration of OpenTelemetry in the hybrid runner is managed through environment variables defined in the Docker container. Information on the relevant environment variables can be found in:

Key configuration variables include:

Environment variable
Value

OTEL_SDK_DISABLED

Disable the SDK for all signals.

OTEL_SERVICE_NAME

Sets the value of the service.name resource attribute.

OTEL_RESOURCE_ATTRIBUTES

Key-value pairs to be used as resource attributes.

OTEL_EXPORTER_OTLP_ENDPOINT

If using the OpenTelemetry Protocol Exporter:

Target to which the exporter is going to send spans, metrics, or logs.

OTEL_EXPORTER_OTLP_HEADERS

If using the OpenTelemetry Protocol Exporter:

Key-value pairs to be used as headers associated with gRPC or HTTP requests.

Last updated