Logging events in the application (trace)
The system table as_trace stores data on the operation of the application.
The code field determines which type of event:
- DBLREQ - we fix the fact of multiple identical requests from the page in a short period of time (for example, if the form is placed in each row of the table)
- EXCEPTION - исключение (ошибка) при работе программы
- HUGE - a request with a large number of output lines (such requests can create a load on the processor)
- NOTFOUND - passing to a non-existent page
- PRINT - viewing the state of variables in stored procedures through execute as_print @str
- PV - page visit. Fixing the user's visit to the page
- REG - the fact of registration on the site (through as_trace_warn)
- SEARCH - realization site search through the element at the top of each page
- SF - safe form. Saving some form on the site
- SLOW - fixing a slow Ajax request
- SYNC - fixing the operation of periodic events (management in /syscp)
- TG - events (errors) telegram
You can create your own event codes and write them in stored procedures through exec as_trace_warn
Request for statistics on trace elements (it is in the Diagnostics /diag):
select
upper(isnull(code, '')) code,
count(*) totalCount,
isnull((select count(*) from as_trace t3 where t3.code=t1.code and cast(created as date) > cast(dateadd(month, -1, getdate()) as date) ), 0) [month],
isnull((select count(*) from as_trace t3 where t3.code=t1.code and cast(created as date) > cast(dateadd(week, -1, getdate()) as date) ), 0) [week],
isnull((select count(*) from as_trace t3 where t3.code=t1.code and cast(created as date) = cast(dateadd(day, -1, getdate()) as date) ), 0) yesterday,
isnull((select count(*) from as_trace t2 where t2.code=t1.code and cast(created as date) = cast(getdate() as date) ), 0) today,
isnull((select count(*) from as_trace t2 where t2.code=t1.code and created > dateadd(hour, -1, getdate()) ), 0) lastHour,
isnull((select count(*) from as_trace t2 where t2.code=t1.code and created > dateadd(minute, -5, getdate()) ), 0) last5Min
from as_trace t1
group by code
order by code
The as_trace table can be cleaned periodically. There is no need to save critical business data in it.
Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started
- Management
- Falcon Space Foundation
- Basic components
- Falcon Space Features
- Коммуникация с пользователем
- Дизайн, стилизация
- Integrations
- Каталоги
- Навигация
- Документы
- Additional component
- Продвижение, SEO
- Системные моменты Migrating components between Databases HOWTO. How can I quickly transfer a solution (tables, forms, pages) to another database? HOWTO. Where can I edit the search procedure, the Layout common elements procedure, the periodic launch procedure, and so on? HOWTO. How to do lazy loading for separate image HOWTO. Tracking changes to stored procedures and pages (logChanges) How to organize the periodic sending of an error report to the mail Feedback form for errors, suggestions How to differentiate rights at the level of the business logic of stored procedures Secure data processing and access verification in stored procedures How to enable the system log in the Core version of the platform To increase the size of downloads Using standard markup in the form of snippets for solving various tasks Working with the code editor Logging changes to objects using stored procedures as an example How to log clicks on certain elements in the system Processing old browsers (message about an outdated browser) How to track and limit a large number of similar queries on a site How to change the timeout of DB requests Safety. How to hide some headers (http headers) in requests Logging events in the application (trace) How to improve the performance of IIS (Internet Information Services web server) Windows Server, IIS, How to make the site work from a certain account Displaying a message about offline (No network) Developer's workplace via the terminal FAQ для системного администратора сервера Системный анализ работы сайта на Falcon Space. Профилактика, диагностика работы сайта Обновляемые метки времени в сообщениях на сайте Подсказка по интерфейсам хранимых процедур компонентов Защита от CSRF атак через дополнительный токен в формах Дополнительные параметры в @parameters (во многих хранимых процедурах) Массовая оптимизация картинок в менеджерах ресурсов Как логировать события в Falcon в другую базу (чтобы ограничить рост основной базы данных)
- HOWTO
- HOWTO Tables
- HOWTO Forms
- Working with SQL
- HOWTO JS
- HOWTO Layout
- Solve problems
Falcon Space Platform
This is a reduction in the cost of ownership
at the expense of fewer people to support
This is a quick change
while using the program
This is a modern interface
full adaptation for mobile devices
Note
- Falcon Space Video
- Platform features demo will allow you to understand how this or that component looks and works
- Have a question? Write to the chat at the bottom right