
E-Ticaret Performans İzleme: Uptime, Hata Takibi ve APM
E-ticaret sitesi için uptime izleme, Sentry hata takibi, New Relic/Datadog APM, gerçek kullanıcı izleme ve performans dashboard kurulumu.
E-Ticaret Performans İzleme: Uptime, Hata Takibi ve APM
Bir e-ticaret sitesinin her dakikası kesintisi gelir kaybına neden olur. Proaktif izleme ile sorunları kullanıcılardan önce tespit edin.
İzleme Katmanları
Uptime İzleme:
- Site ayakta mı?
- HTTP durum kodu 200 mu?
- SSL geçerli mi?
- Araçlar: UptimeRobot, Pingdom, Better Uptime
Hata Takibi (Error Tracking):
- PHP/JavaScript hataları
- Ödeme hataları
- API hataları
- Araçlar: Sentry, Bugsnag, Raygun
APM (Application Performance Monitoring):
- Sayfa yükleme süresi
- Veritabanı sorgu süresi
- API yanıt süresi
- Araçlar: New Relic, Datadog, Elastic APM
Gerçek Kullanıcı İzleme (RUM):
- Core Web Vitals gerçek verisi
- Kullanıcı deneyimi
- Araçlar: Google CrUX, Speedcurve
UptimeRobot Kurulumu
# API ile izleme kuralı ekle
curl -X POST "https://api.uptimerobot.com/v2/newMonitor" -H "Content-Type: application/x-www-form-urlencoded" -d "api_key=YOUR_API_KEY" -d "friendly_name=MagazaNiz Ana Sayfa" -d "url=https://magazaniz.com" -d "type=1" -d "interval=300" -d "alert_contacts=1234567_0_3" # E-posta bildirimi
# Ödeme sayfası izleme
curl -X POST "https://api.uptimerobot.com/v2/newMonitor" -d "api_key=YOUR_API_KEY" -d "friendly_name=Checkout Sayfası" -d "url=https://magazaniz.com/checkout/" -d "type=1" -d "interval=60" # 1 dakikada bir
# İzleme istatistikleri
curl -X POST "https://api.uptimerobot.com/v2/getMonitors" -d "api_key=YOUR_API_KEY" -d "response_times=1" | jq .monitors[].uptime_ratio
Sentry ile PHP/WordPress Hata Takibi
// Composer ile Sentry SDK kur
// composer require sentry/sdk
// wp-config.php
require_once __DIR__ . '/vendor/autoload.php';
Sentryinit([
'dsn' => 'https://XXXXXX@sentry.io/YYYYYY',
'environment' => WP_ENV ?? 'production',
'release' => get_bloginfo('version'),
'traces_sample_rate' => 0.1, // %10 performance tracing
'before_send' => function (SentryEvent $event): ?SentryEvent {
// Geliştirici IP'lerini hariç tut
if (in_array($_SERVER['REMOTE_ADDR'] ?? '', ['127.0.0.1', '::1'])) {
return null;
}
return $event;
},
]);
// Kullanıcı bilgisi ekle
add_action('wp_login', function($username, $user) {
SentryconfigureScope(function (SentryStateScope $scope) use ($user): void {
$scope->setUser([
'id' => $user->ID,
'email' => $user->user_email,
]);
});
}, 10, 2);
// WooCommerce ödeme hatalarını Sentry'ye gönder
add_action('woocommerce_payment_complete_order_status', function($order_id) {
$order = wc_get_order($order_id);
if ($order->get_status() === 'failed') {
SentrycaptureMessage(
'Ödeme başarısız: Sipariş #' . $order_id,
SentrySeverity::error()
);
}
});
// Manuel hata yakalama
try {
$result = process_payment($order);
} catch (Exception $e) {
SentrycaptureException($e);
SentrywithScope(function (SentryStateScope $scope) use ($order, $e): void {
$scope->setContext('order', [
'id' => $order->get_id(),
'total' => $order->get_total(),
]);
});
}
Özel Uptime/Sağlık Kontrolü Endpoint'i
// Kapsamlı sağlık kontrolü API endpoint'i
add_action('rest_api_init', function() {
register_rest_route('health/v1', '/check', [
'methods' => 'GET',
'callback' => 'health_check_endpoint',
'permission_callback' => '__return_true',
]);
});
function health_check_endpoint() {
$checks = [];
$status = 'healthy';
// 1. Veritabanı kontrolü
try {
global $wpdb;
$wpdb->get_var('SELECT 1');
$checks['database'] = ['status' => 'ok'];
} catch (Exception $e) {
$checks['database'] = ['status' => 'error', 'message' => $e->getMessage()];
$status = 'unhealthy';
}
// 2. WooCommerce kontrolü
$checks['woocommerce'] = [
'status' => class_exists('WooCommerce') ? 'ok' : 'error',
];
// 3. Redis/Cache kontrolü
if (function_exists('wp_cache_get')) {
wp_cache_set('health_test', 1, '', 10);
$cached = wp_cache_get('health_test');
$checks['cache'] = ['status' => $cached === 1 ? 'ok' : 'warning'];
}
// 4. Disk alanı
$free_space = disk_free_space(ABSPATH);
$checks['disk'] = [
'status' => $free_space > 1024 * 1024 * 500 ? 'ok' : 'warning', // 500MB minimum
'free_gb' => round($free_space / (1024 ** 3), 2),
];
// 5. Son başarılı sipariş
$last_order = wc_get_orders(['limit' => 1, 'status' => 'completed', 'orderby' => 'date']);
if (!empty($last_order)) {
$age = time() - $last_order[0]->get_date_created()->getTimestamp();
$checks['last_order'] = [
'status' => $age < 3600 ? 'ok' : 'warning',
'minutes_ago' => round($age / 60),
];
}
return new WP_REST_Response([
'status' => $status,
'timestamp' => date('c'),
'checks' => $checks,
], $status === 'healthy' ? 200 : 503);
}
Prometheus + Grafana ile Dashboard
# WooCommerce metriklerini Prometheus'a gönder
# wordpress-exporter veya özel metrik scripti
# Metrik toplayan cron
cat > /usr/local/bin/woo-metrics.sh << 'EOF'
#!/bin/bash
# WooCommerce metrikleri
METRICS_FILE="/var/lib/node_exporter/textfile_collector/woocommerce.prom"
# Günlük sipariş sayısı
DAILY_ORDERS=$(wp eval 'echo count(wc_get_orders(["date_after" => date("Y-m-d"), "limit" => -1]));' --path=/var/www/magazaniz 2>/dev/null)
# Günlük gelir
DAILY_REVENUE=$(wp eval 'echo array_sum(array_map(fn($o) => $o->get_total(), wc_get_orders(["date_after" => date("Y-m-d"), "limit" => -1, "status" => "completed"])));' --path=/var/www/magazaniz 2>/dev/null)
cat > $METRICS_FILE << PROM
# HELP woocommerce_daily_orders Günlük sipariş sayısı
# TYPE woocommerce_daily_orders gauge
woocommerce_daily_orders ${DAILY_ORDERS:-0}
# HELP woocommerce_daily_revenue Günlük gelir (TL)
# TYPE woocommerce_daily_revenue gauge
woocommerce_daily_revenue ${DAILY_REVENUE:-0}
PROM
EOF
chmod +x /usr/local/bin/woo-metrics.sh
echo "*/5 * * * * /usr/local/bin/woo-metrics.sh" | crontab -
Sonuç
Kapsamlı izleme sistemi, e-ticaret sitenizdeki sorunları kullanıcılardan önce tespit etmenizi sağlar. Uptime izleme, hata takibi ve APM araçlarıyla gelir kaybına neden olan kesintileri minimize edin. Buyukweb'in 7/24 izlenen ve garantili uptime sağlayan altyapısı ile e-ticaret operasyonlarınızı güvence altına alın.
Ilgili Buyukweb Hizmetleri:
- Yuksek trafik icin dedicated sunucu
- Guvenli hosting ile online magaza kurun
- Tum hosting ve sunucu paketlerimiz
E-Ticaret Altyapi Rehberi
Platform Secimi
WooCommerce: Esnek, genis eklenti. Kucuk-orta isletmeler.
PrestaShop: Guclü stok, coklu dil.
OpenCart: Hafif, kolay kurulum.
Shopify: Hosted, teknik bilgi gerektirmez.
Odeme
iyzico, PayTR, Param sanal pos. 3D Secure zorunlu. Kapida odeme onemli. Taksit seceenekleri donusumu arttirir.
Marketplace Entegrasyonu
Amazon, Trendyol, Hepsiburada, N11 icin entegrator yazilimi. Stok senkronizasyonu kritik. Coklu kanal strateji.
Performans
4 GB RAM, 2 vCPU, NVMe SSD minimum. CDN ile gorsel hizi. Yuksek trafik donemlerinde kaynak artirin.
Guvenlik
PCI DSS uyumu. Odeme bilgisi saklamayin. SSL, WAF, KVKK uyumlulugu zorunlu.
SEO
Product schema ekleyin. Gorsel optimize edin. Meta bilgilerini ozellestirin. Google Shopping entegrasyonu.
Sik Sorulan Sorular
Hosting mi VDS mi?
500 altinda ziyaretci hosting yeterli. 1000+ veya marketplace entegrasyonu icin VDS oneriyoruz.
Marketplace entegrasyonu icin ne gerekir?
Sabit IP VDS, entegrator yazilimi, API erisimleri. Buyukweb E-Ticaret VDS bu icin tasarlanmistir.
Sonuc
Basarili e-ticaret guclü altyapi, dogru platform ve etkili pazarlama birlesimdir. VDS ile isletmenizi olceklendirin.
E-Ticaret Baslangic Kontrol Listesi
Yasal
- Sirket/sahis kurulumu
- Vergi levhasi
- Mesafeli satis sozlesmesi
- KVKK aydinlatma metni
- Cerez politikasi
- Iade kosullari
Teknik
- Hosting/VDS secimi
- SSL sertifikasi
- E-ticaret platformu
- Sanal pos (3D Secure)
- Kargo entegrasyonu
- E-fatura entegrasyonu
- Google Analytics + Search Console
Pazarlama
- Google Business Profile
- Sosyal medya hesaplari
- Google Shopping
- Facebook/Instagram Shop
- E-posta pazarlama
E-Ticaret VDS vs Ev Interneti
| Ozellik | Ev Interneti | E-Ticaret VDS |
|---|---|---|
| IP | Dinamik | Sabit |
| Temizlik | Bilinmiyor | Temiz |
| Kesinti | Elektrik/internet | %99.8 uptime |
| Hiz | Degisken | 1 Gbps |
| Guvenlik | Dusuk | DDoS korumali |
Marketplace islemleri icin sabit ve temiz IP kritik. Ban riski en aza iner.
Hosting ve Sunucu Terimleri Sozlugu
| Terim | Aciklama |
|---|---|
| VDS | Virtual Dedicated Server - Sanal ozel sunucu |
| NVMe SSD | Non-Volatile Memory Express - En hizli disk teknolojisi |
| LiteSpeed | Yuksek performansli web sunucu yazilimi |
| CloudLinux | Paylasimli hosting icin kaynak izolasyon isletim sistemi |
| cPanel | Populer web hosting kontrol paneli |
| Plesk | Web hosting ve sunucu yonetim paneli |
| KVM | Kernel-based Virtual Machine - Tam sanallastirma teknolojisi |
| DDoS | Distributed Denial of Service - Dagitik hizmet engelleme saldirisi |
| SSL/TLS | Veri iletisimini sifreleyen guvenlik protokolu |
| TTFB | Time to First Byte - Sunucu yanit suresi |
| CDN | Content Delivery Network - Icerik dagitim agi |
| WAF | Web Application Firewall - Web uygulama guvenligi duvari |
| IOPS | Input/Output Operations Per Second - Disk performans olcusu |
| Uptime | Sunucunun kesintisiz calisma suresi yuzdesi |
| Bandwidth | Veri transfer kapasitesi |
Bu terimleri anlamak, hosting ve sunucu hizmetlerini daha bilinçli secmenize yardimci olur. Detayli bilgi icin Buyukweb blog yazilarini takip edin veya teknik destek ekibimize danisIn.
Etiketler:
