Setting up APM (Application Performance Monitoring) for 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Setting Up APM (Application Performance Monitoring) for 1C-Bitrix

APM is continuous monitoring of application performance in real time: response time, error count, slow queries, performance degradation under load. Unlike profilers (Xdebug, Blackfire), which run manually, APM works continuously and alerts before clients start complaining.

What APM for Bitrix Consists Of

For 1C-Bitrix, two stacks are commonly used in practice: Elastic APM (open-source, self-hosted) and New Relic / Datadog (SaaS). The principle is the same — a PHP agent intercepts request execution and sends metrics to a central storage.

Elastic APM — architecture:

PHP-agent (elastic-apm-php) → APM Server → Elasticsearch → Kibana (APM UI)

PHP Agent Installation:

# Debian/Ubuntu
curl -L -O https://github.com/elastic/apm-agent-php/releases/download/v1.x.x/apm-agent-php_Linux_x86-64.deb
dpkg -i apm-agent-php_Linux_x86-64.deb

In php.ini:

extension=elastic_apm.so
elastic_apm.server_url=http://apm-server:8200
elastic_apm.service_name=bitrix-site
elastic_apm.environment=production
elastic_apm.transaction_sample_rate=0.1

transaction_sample_rate=0.1 — profiles 10% of requests. On heavily loaded sites, 100% causes noticeable overhead.

What APM Monitors in Bitrix

The agent automatically intercepts:

  • Incoming HTTP requests — response time, status, URL, method.
  • SQL queries — to b_iblock_element, b_sale_order, b_crm_deal and all other tables. Visible: query time, body, execution plan.
  • External HTTP callscurl_exec, file_get_contents. Requests to 1C, payment systems, external APIs.
  • Exceptions\Bitrix\Main\SystemException, unhandled errors.

For custom operations (long import script, heavy aggregation), create a span manually:

use Elastic\Apm\ElasticApm;

$transaction = ElasticApm::getCurrentTransaction();
$span = $transaction->beginCurrentContextSpan('import.products', 'custom');
// ... import logic ...
$span->end();

Key Metrics and Alerts

After setup, Kibana APM UI provides:

  • Response time — average and 95th percentile response time by URL.
  • Throughput — requests per minute.
  • Error rate — percentage of requests with errors.
  • Apdex — satisfaction index: ratio of fast (< T), tolerable (< 4T), and slow requests.

Alerts are configured in Kibana Alerting: if p95 response time exceeds 3 seconds for more than 5 minutes — notification to Slack or email.

Setup Timeline

Stage Duration
APM Server + Elasticsearch installation 1 day
PHP agent setup, first data 2–4 hours
Dashboard and alert configuration 1 day
Fine-tuning (sampling, custom spans) 1–2 days

APM does not replace profiling — it shows what degrades and when. A profiler explains why.