environment-info
Service icon

Environment Info

Stable version 1.3.0 (Compatible with OutSystems 11)
Uploaded
 on 11 Jun (14 hours ago)
 by 
5.0
 (6 ratings)
environment-info

Environment Info

Documentation
1.3.0

Environment Info

Runtime introspection & diagnostics for OutSystems applications.

v1.3.0 

Environment Info is a utility extension for OutSystems that exposes server-side environment and runtime details to your application logic. It surfaces information the built-in System module doesn't readily provide — server mode, environment name/key, DNS hostname, Front-End identity, originating client IP, and a full server runtime snapshot — by interfacing directly with the OutSystems.HubEdition.RuntimePlatform and .NET runtime APIs.

Typical uses: environment-aware feature flags, richer diagnostic logging, request auditing, and support tooling.


Features

  • Environment detection — Identify whether code is running in Production or a non-Production environment with a single boolean check.
  • Dynamic mode listing — Retrieve the complete list of server modes supported by the platform, generated at runtime so it stays accurate across platform versions.
  • Hostname resolution — Read the configured default DNS name for the environment, even from background contexts.
  • Environment information — Obtain the environment's display name and unique key identifier.
  • Front-End identification — Determine which Front-End server is handling the current request.
  • Client IP detection — Capture the originating client IP of a request, correctly resolved behind load balancers and reverse proxies.
  • Runtime diagnostics — Inspect the server's .NET framework, operating system, machine name, and hardware details.

Server Actions

Quick reference — every action returns its data through output parameters only:

ActionReturnsPurpose
IsProductionEnvironmentBooleanIs the environment in Production mode?
GetEnvironmentServerModeServerModeCurrent server mode (Id + Name).
GetEnvironmentServerModesList<ServerMode>All server modes supported by the platform.
GetEnvironmentHostnameTextDefault DNS hostname of the environment.
GetFrontEndNameTextNetwork name of the Front-End handling the request.
GetEnvironmentKeyTextUnique key (GUID) of the environment.
GetEnvironmentNameTextDisplay name of the environment.
GetClientIPAddressTextOriginating client IP of the current request.
GetRuntimeInfoRuntimeInfoServer runtime snapshot (framework, OS, hardware).


IsProductionEnvironment

Inputs: none · Returns: IsProductionEnvironment (Boolean)

Performs a quick boolean check to determine whether the current environment is running in Production mode. Ideal for use directly in If widgets and conditional logic — guarding test-data seeding, verbose logging, or non-Production-only behavior. Returns True only for Production; False for every other mode.


GetEnvironmentServerMode

Inputs: none · Returns: ServerMode (ServerMode structure)

Returns the current environment's server mode as a record containing its numeric Id and human-readable Name, read from the active AppInfo.


GetEnvironmentServerModes

Inputs: none · Returns: ServerModes (List of ServerMode)

Returns the complete set of server modes supported by the platform. The list is generated by iterating the platform's internal ServerModes enumeration, so it stays accurate as the platform evolves. Useful for populating dropdowns or mapping a mode Id to its name.


GetEnvironmentHostname

Inputs: none · Returns: Hostname (Text)

Returns the environment's configured default DNS hostname — for example env-dev.outsystemsenterprise.com — via EspaceProperties.DefaultDnsName. Resolves consistently even in non-HTTP contexts such as Timers and BPT processes, and returns an empty string when no DNS name is configured.


GetFrontEndName

Inputs: none · Returns: FrontEndName (Text)

Returns the network name of the specific Front-End server processing the current request. Primarily used for diagnostics, technical logging, and auditing — it lets you pinpoint exactly which Front-End handled a request in multi-server, load-balanced environments.


GetEnvironmentKey

Inputs: none · Returns: EnvironmentKey (Text)

Returns the unique key (GUID) that identifies the current running environment.


GetEnvironmentName

Inputs: none · Returns: EnvironmentName (Text)

Returns the display name of the current running environment.


GetClientIPAddress

Inputs: none · Returns: IPAddress (Text)

Returns the IP address of the client that issued the current request. The action inspects the X-Forwarded-For header first — recovering the true client IP when traffic passes through a load balancer or reverse proxy — and falls back to the direct connection address otherwise. Returns an empty string outside of an HTTP request (Timers, BPT, async logic).

Security note: The X-Forwarded-For header is supplied by the client and can be spoofed. Use this value for diagnostics, logging, and auditing — not as the sole basis for security decisions such as IP allow-listing or authentication.

GetRuntimeInfo

Inputs: none · Returns: RuntimeInfo (RuntimeInfo structure)

Returns a snapshot of the server runtime in a single structure — framework version, operating system, machine name, logical processor count, and process/OS bitness. Designed for support and environment diagnostics, letting you capture the full runtime profile in one call.



Structures


ServerMode

AttributeTypeDescription
IdIntegerNumeric identifier of the server mode.
NameTextName of the server mode (e.g. Production, Development, NonProduction, DisasterRecovery).


RuntimeInfo

AttributeTypeDescription
CLRVersionTextThe .NET framework description reported by the runtime, e.g. .NET Framework 4.8.4250.0.
OSVersionTextOperating system platform and version string.
MachineNameTextOS-level host / machine name of the server.
ProcessorCountIntegerNumber of logical processors available to the process.
Is64BitOSBooleanTrue if the operating system is 64-bit.
Is64BitProcessBooleanTrue if the running worker process is 64-bit.


Technical Dependencies

The extension relies only on platform and standard .NET assemblies — there are no third-party packages to manage.

AssemblyUsed for
OutSystems.HubEdition.RuntimePlatformAppInfo (environment, server mode, Front-End data), the ServerModes enum, and EspaceProperties for the DNS hostname.
System.WebHttpContext — resolving the current client request and its IP address.
System.Runtime.InteropServices.RuntimeInformationFrameworkDescription — the precise .NET framework version reported by GetRuntimeInfo.



1.2.0
Environment Info
Environment Info is a utility extension for OutSystems that provides runtime introspection capabilities. It allows applications to retrieve critical environment details, such as server modes (e.g., Development vs. Production) and DNS hostnames, by interfacing directly with the OutSystems.HubEdition.RuntimePlatform APIs.

Features
  • Environment Detection: Identify if the code is running in a Production or a non Production environment.
  • Dynamic Mode Listing: Retrieve a complete list of valid server modes supported by the platform.
  • Hostname Resolution: Access the configured default DNS name for the environment.
  • Environment Information: Know the name and the key identifier of the environment.

Server Actions
IsProductionEnvironment
Performs a quick boolean check to determine if the current environment is Production.

Returns true for Production; false for all other modes (Development, Non-Production, Management, etc.).
GetEnvironmentServerMode
Retrieves the specific configuration of the currently running environment.

Accesses the active AppInfo to return the current environment's mode ID and Name.
GetEnvironmentServerModes
Retrieves a complete list of all server modes supported by the OutSystems platform.

Iterates through the internal ServerModes enum to generate a dynamic list of valid modes. This ensures the list is always up-to-date with the platform version.
GetEnvironmentHostname
Retrieves the default DNS hostname configured for the environment.

Uses EspaceProperties to fetch the DefaultDnsName. This is effective even in background contexts (Timers, BPT) where an HTTP context might not be available.
GetEnvironmentKey
Retrieves the key of the current running environment.
GetEnvironmentName
Retrieves the name of the current running environment.

Technical Dependencies
OutSystems.HubEdition.RuntimePlatform
Provides AppInfo for current runtime data and ServerModes enum for mode definitions.

1.1.0
Environment Info is a utility extension for OutSystems that provides runtime introspection capabilities. It allows applications to retrieve critical environment details, such as server modes (e.g., Development vs. Production) and DNS hostnames, by interfacing directly with the OutSystems.HubEdition.RuntimePlatform APIs.


Features
  • Environment Detection: Identify if the code is running in a Production or a non Production environment.
  • Dynamic Mode Listing: Retrieve a complete list of valid server modes supported by the platform.
  • Hostname Resolution: Access the configured default DNS name for the environment.
  • Environment Information: Know the name and the key identifier of the environment.

Server Actions


IsProductionEnvironment
Performs a quick boolean check to determine if the current environment is Production.

Returns true for Production; false for all other modes (Development, Non-Production, Management, etc.).


GetEnvironmentServerMode
Retrieves the specific configuration of the currently running environment.

Accesses the active AppInfo to return the current environment's mode ID and Name.


GetEnvironmentServerModes
Retrieves a complete list of all server modes supported by the OutSystems platform.

Iterates through the internal ServerModes enum to generate a dynamic list of valid modes. This ensures the list is always up-to-date with the platform version.


GetEnvironmentHostname
Retrieves the default DNS hostname configured for the environment.

Uses EspaceProperties to fetch the DefaultDnsName. This is effective even in background contexts (Timers, BPT) where an HTTP context might not be available.


GetEnvironmentKey
Retrieves the key of the current running environment.


GetEnvironmentName
Retrieves the name of the current running environment.


Technical Dependencies


OutSystems.HubEdition.RuntimePlatform
Provides AppInfo for current runtime data and ServerModes enum for mode definitions.

1.0.0
Environment Info is a utility extension for OutSystems that provides runtime introspection capabilities. It allows applications to retrieve critical environment details, such as server modes (e.g., Development vs. Production) and DNS hostnames, by interfacing directly with the OutSystems.HubEdition.RuntimePlatform APIs.


Features
  • Environment Detection: Identify if the code is running in a Production or a non Production environment.
  • Dynamic Mode Listing: Retrieve a complete list of valid server modes supported by the platform.
  • Hostname Resolution: Access the configured default DNS name for the environment.

Server Actions


IsProductionEnvironment
Performs a quick boolean check to determine if the current environment is Production.

Returns true for Production; false for all other modes (Development, Non-Production, Management, etc.).


GetEnvironmentServerMode
Retrieves the specific configuration of the currently running environment.

Accesses the active AppInfo to return the current environment's mode ID and Name.


GetEnvironmentServerModes
Retrieves a complete list of all server modes supported by the OutSystems platform.

Iterates through the internal ServerModes enum to generate a dynamic list of valid modes. This ensures the list is always up-to-date with the platform version.


GetEnvironmentHostname
Retrieves the default DNS hostname configured for the environment.

Uses EspaceProperties to fetch the DefaultDnsName. This is effective even in background contexts (Timers, BPT) where an HTTP context might not be available.


Technical Dependencies


OutSystems.HubEdition.RuntimePlatform
Provides AppInfo for current runtime data and ServerModes enum for mode definitions.