Logs & Traces & Metrics
Rierino microservices include configurable logging and monitoring capabilities.
Last updated
Rierino microservices include configurable logging and monitoring capabilities.
Last updated
API gateway and microservice layers include Logback logging capabilities out of box. Alternative logging libraries can also be used, by replacing logback dependency in build.gradle files (or ConfigMap entries), if preferred.
The default deployment includes DEBUG level logging to Console with the following pattern:
The log level can be defined when deploying new services either through the Deployment UI or helm chart parameters.
The logging pattern and the destination (such as rotating files or SIEM platforms) can easily be configured by editing the logback.xml file (or ConfigMap entry) for the required microservices.
Rierino uses OpenTelemetry to facilitate monitoring of availability and performance across all platform components. OTLP feeds for Logs, Traces and Metrics can be enabled and configured easily and selectively for each component.
Rierino OpenTelemetry instrumentation combines zero-code Java agent with OpenTelemetry APIs for a mix of automated and manual spans and metrics. This approach provides access to official instrumentations of external system libraries (such as ) as well as Rierino specific attributes and event details (such as runner or handler specific details).
Recommended approach for configuring the instrumentation depends on the model used for deploying Rierino:
Official OpenTelemetry helm charts and operators can be used for deploying components required for instrumentation on Rierino kubernetes clusters. Typical installation includes following main activities:
Installation of a deployment with collector helm chart to collect cluster metrics and kubernetes events
Installation of a daemonset with collector helm chart to collect host & service specific feed
Installation of the operator helm chart to manage collectors and auto-instrumentation
Creation of "Instrumentation" kind resources with exporter configurations
Details of these activities along with sample chart values can be found below:
OpenTelemetry resources allow auto-instrumentation of services through simple annotations. These annotations are already included as a parameter in gateway & runner helm charts, which is enabled with the "useOTLP" parameter, set to false as default. Setting this parameter value to "true" during deployment automatically configures OTLP instrumentation using OpenTelemetry annotation as follows:
Official OpenTelemetry Java Agent can be used for instrumentation of non-kubernetes deployments, such as containerized sandboxes. Typical instrumentation of Rierino Sandbox includes the following main activities:
Copy this jar file to /extra folder inside admin_controller, admin_runner and ops_runner directories on the sandbox VM(s)
Set the following environment variable to activate Java agent (either in .env file for all services or in compose.yaml / compose calls for specific microservices):
Additional Java Agent instrumentation details can be found below:
OpenTelemetry instrumentation supports regular configurations allowed by the Java Agent using environment variables defined on ConfigMaps or .env files based on the deployment model:
In standard deployments, iInstrumentation is disabled by default and can be enabled with the following environment variable:
OTel configuration requires a target APM platform to export logs, traces and metrics to. For development and testing purposes, this could be "logging". For production systems, this should be an OTLP compatible system.
As an example open-source on-premise option, SigNoz can be used to receive these OTLP feeds. Rierino Ansible playbooks include an example for deploying SigNoz using its official helm charts.
As an example cloud based option. Grafana Cloud can be used to receive these OTLP feeds (e.g. using Alloy inside the cluster or direct feed to Grafana gateway).
Grafana Cloud feeds can be configured using OTel exporter endoint URL configuration (e.g. https://otlp-gateway-prod-[zone].grafana.net/otlp) with authorization header generated using user ID and API key from Grafana account management.
Easiest way to enable logging with OpenTelemetry is through configuration of a logback appender, by passing "logback.otlp.enabled=true" in JVM arguments, which enables the following section in logback.xml files:
In addition to logs displayed on console, OpenTelemetry logging provides better traceability, as event logs registered under span context are automatically correlated with related trace and span identifiers.
OTLP logs are disabled by default and can be enabled with the following environment variable configuration on ConfigMaps or .env files based on the deployment model:
All main building blocks of API gateway and backend microservices provide traces for configuration and processing activities. Created spans include key attributes of each event, such as name of the action performed or the ID of the API request. They also include the following linkage for correlation:
Spans within the same microservice have parent-child relations (i.e. steps in a saga flow are linked with a parent span context)
Spans triggered by an API gateway call have a (non parent-child) link to the original API gateway span (since microservices can be executing in parallel or in asynch manner as well)
Front-end systems can send trace and span identifiers to 'define' the originating span, if the API gateway is configured (telemetry.trace.input=true) to accept external span identifiers
Traces are disabled by default and can be enabled with the following environment variable configuration on ConfigMaps or .env files based on the deployment model:
All main building blocks of API gateway and backend microservices provide counter and histogram metrics for all event and role processing actions. Created metrics include key attributes, such as action performed or the result status.
Metrics are disabled by default and can be enabled with the following environment variable configuration on ConfigMaps or .env files based on the deployment model:
Download from OpenTelemetry repository.