Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getlimina.ai/llms.txt

Use this file to discover all available pages before exploring further.

Reporting Integration

The Limina container can be configured to send reporting metrics to a logstash server. To enable this feature, the following environment variables can be added to the docker run command:
Variable NameDescription
PAI_ENABLE_REPORTINGEnables Reporting to a Logstash Server
LOGSTASH_HOSTThe Logstash server’s host info
LOGSTASH_PORTThe port of the Logstash server
LOGSTASH_MONITORING_PORTThe monitoring API port of the Logstash server.
LOGSTASH_TTLSets the time to live value (in seconds) of the data queued for logstash. Data will be lost if the queued data is not sent successfully before the ttl value.
PAI_REPORT_ENTITY_COUNTEnables entity counts (per piece of text deidentified) to be added to reporting
To run a container with these settings, the following command can be used:
Docker Command
docker run --rm -p 8080:8080 --mount type=bind,src=$PWD/tests/fixtures/licenses/license.json,dst=/app/license/license.json -e PAI_ENABLE_REPORTING=true -e LOGSTASH_HOST=http://hostname.org -e LOGSTASH_PORT=50000 -e PAI_REPORT_ENTITY_COUNTS=true -it deid:image-name
The Logstash pipeline that the data is being sent to must be configured to able to accept JSON objects. A sample pipeline configuration that allows this would be:
Pipline Config
input {
	tcp {
		port => 50000
		codec => json_lines {}
	}
}
output {
	elasticsearch {
		hosts => "elasticsearch:9200"
		user => "${LOGSTASH_USER}"
		password => "${LOGSTASH_PASSWORD}"
	}
}

What is Being Sent?

When PAI_ENABLE_REPORTING is enabled in the container metering records will be sent to Logstash in batches, at 5 minute intervals. All records include the following fields:
Field NameDescription
privateai.SessionIdA unique id that relates all metering information sent in the interval
privateai.AccuracyThe accuracy used in the requests
privateai.ProjectIdThe project id of the request (the default value is main)
privateai.SyntheticBoolean value indicating if synthetic data was used
The following meters are currently being used (one record per meter, per project ID):
Field NameDescription
privateai.api_callsThe amount of api calls sent in the interval
privateai.api_charsThe amount of characters processed in the interval
privateai.api_wordsThe amount of words processed in the interval
If PAI_ENABLE_PII_COUNT_METERING is enabled in the container, meters for each entity found will also be sent. These meters contain the following fields:
Field NameDescription
privateai.pii-countThe amount of times the entity was found to be the best label in the interval
If PAI_REPORT_ENTITY_COUNTS is enabled in the container, a record of the entities found and their counts for each unit of text processed will be sent. e.g.
Metering Records
privateai.NAME: 2
privateai.OCCUPATION: 1
would indicate that in a unit of text processed, the entity NAME was the best label two times, and OCCUPATION was the best label once.
Example dashboard

Reading Output

The following sections describe the typical field lists used when logs are forwarded to the Logstash server within the environment. These examples are provided as a reference for log analysis and field mapping configuration. It contains Limina internal debug information.
Field Nameprivateai FieldExampleDescription
@version1Logstash internal version # 1
messageSending data to logstashLog description. Limina set this.
typepython-logstashName of logging handler
levelINFOLog level
host471d716d6192Host (container) to send logs
pid25Uvicorn process pid
program/opt/venv/lib/python3.10/site-packages/uvicorn/main.pyUvicorn location
@timestamp2026-03-31T10:44:22.291ZLog time stamp
logsource471d716d6192Log source (equivalent to Host)
privateaiLimina specisic section
api-calls3Number of Api call
api-chars1234Number of characters processed
api-words25Number of words processed
logger_namelogstashName of logger
RelextfalseRelation extraction(beta) used?
line208Report function location
logstash_async_version3.0.0logstash async handler version
ProjectIdmytest_prj1Project Id name provided by user
thread_nameThreadPoolExecutor-1_2Thread name of processing
RecordTypemeter or entitieslogstash record type
Accuracyhigh_multilingualLimina model name used
path/app/base_metering.pyUsage report file name
interpreter_version3.10.20Limina container’s python version
SyntheticfalseSynthetic data used?
AppVersion4.3.0-cpuLimina container version
func_namereportFunction name of usage reporting
interpreter/opt/venv/bin/pythonPython path inside container
process_nameMainProcessProcess name for the pid
SessionId440c5885-f5dd-40ee-abce-5d6a98772f99Session Id of sending logs
CoreffalseCoreference used?
LicenseId412Limina license file Id
ApiRouteprocess_files_uriLimina Api name called
TotalEntities2Number of redacted entity types
@TimeOfRequest2026-04-02T17:18:29.662365Time stamp of TotalEntities logged
[Name of Entity]2Count of specific entity
pii-count1Count of specific entity (When TotalEntities not selected)