# LogTide — Full Content > The Official LogTide Platform. A privacy-first, open-source alternative to Datadog and Splunk. GDPR-compliant log management with native Sigma rules and threat detection. Self-host or use our EU-based cloud. Source: https://logtide.dev/ # Integrations --- # Angular Application Logging Integration > Add structured logging to Angular applications with ErrorHandler, HttpInterceptor, and standalone or NgModule providers. *Source: https://logtide.dev/integrations/angular/* --- LogTide's Angular SDK provides a custom ErrorHandler for automatic error capture, an HttpInterceptor for distributed tracing, and providers for both standalone and NgModule-based applications. ## Why use LogTide with Angular? - **Automatic error capture**: Custom ErrorHandler catches all uncaught errors - **HTTP tracing**: HttpInterceptor adds traceparent headers to outgoing requests - **Component context**: Errors include component name and lifecycle hook - **Single setup**: `provideLogtide()` registers everything in one call - **Both styles**: Supports standalone and NgModule-based apps ## Prerequisites - Angular 17+ (standalone) or Angular 14+ (NgModule) - LogTide instance with a DSN ## Installation ```bash npm install @logtide/angular ``` ## Standalone Setup (Angular 17+) ```typescript // main.ts import { bootstrapApplication } from '@angular/platform-browser'; import { provideLogtide } from '@logtide/angular'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, { providers: [ provideLogtide({ dsn: 'https://lp_abc123@api.logtide.dev', service: 'angular-app', environment: 'production', release: '1.0.0', }), ], }); ``` ## NgModule Setup ```typescript // app.module.ts import { NgModule } from '@angular/core'; import { getLogtideProviders } from '@logtide/angular'; @NgModule({ providers: [ ...getLogtideProviders({ dsn: 'https://lp_abc123@api.logtide.dev', service: 'angular-app', environment: 'production', }), ], bootstrap: [AppComponent], }) export class AppModule {} ``` ## Automatic Error Capture Uncaught errors in components, services, and templates are captured automatically with context: ```typescript @Component({ selector: 'app-dashboard', template: '...' }) export class DashboardComponent implements OnInit { ngOnInit() { // If this throws, LogTide captures it with: // - component: 'DashboardComponent' // - hook: 'ngOnInit' // - route information this.loadData(); } } ``` ## HTTP Interceptor Outgoing HttpClient requests automatically include tracing: ```typescript @Injectable() export class UserService { constructor(private http: HttpClient) {} getUser(id: string) { // traceparent header added automatically // Failed requests captured as errors return this.http.get(`/api/users/${id}`); } } ``` ## Manual Logging in Components ```typescript import { hub } from '@logtide/core'; @Component({ selector: 'app-checkout', template: '...' }) export class CheckoutComponent { purchase() { hub.addBreadcrumb({ type: 'ui', category: 'ui', message: 'Purchase button clicked', timestamp: Date.now(), }); try { // process purchase... hub.captureLog('info', 'Purchase completed', { orderId: '123' }); } catch (error) { hub.captureError(error, { tags: { module: 'checkout' }, }); } } } ``` ## Next Steps - [JavaScript SDK](/docs/sdks/nodejs/) - Core SDK reference - [Angular SDK Reference](/docs/sdks/angular/) - Full API documentation - [Docker Integration](/integrations/docker/) - Container deployments --- # Apache HTTP Server Log Integration > Send Apache httpd access logs, error logs, and mod_security audit events to LogTide with structured JSON parsing. *Source: https://logtide.dev/integrations/apache-httpd/* --- Apache HTTP Server (httpd) is one of the most widely deployed web servers on the internet. This guide shows you how to send Apache access logs, error logs, and mod_security audit events to LogTide with full structured parsing for powerful queries, alerting, and compliance reporting. ## Why use LogTide with Apache? - **Unified visibility**: Combine access logs, error logs, and security audit trails in one place - **Structured analysis**: Parse Apache logs into queryable fields for fast investigation - **Security monitoring**: Detect web attacks, brute-force attempts, and suspicious activity in real time - **Compliance audit trail**: Meet GDPR, PCI-DSS, and SOC 2 requirements with centralized, tamper-evident logging - **Virtual host tracking**: Monitor traffic and errors across multiple virtual hosts from a single dashboard - **Performance insights**: Track response times, request sizes, and status code distribution ## Prerequisites - Apache HTTP Server 2.4+ (any platform) - LogTide instance with API key - Fluent Bit or Vector for log forwarding - `mod_log_json` (optional, for native JSON logging) ## Quick Start (5 minutes) ### Step 1: Configure Apache JSON Log Format The simplest approach uses Apache's built-in `CustomLog` directive with a JSON format string. Edit your Apache configuration (`/etc/apache2/apache2.conf` or `/etc/httpd/conf/httpd.conf`): ```apache # JSON access log format LogFormat "{\"time\":\"%{%Y-%m-%dT%H:%M:%S%z}t\",\"remote_addr\":\"%a\",\"remote_user\":\"%u\",\"request_method\":\"%m\",\"request_uri\":\"%U%q\",\"protocol\":\"%H\",\"status\":%>s,\"body_bytes_sent\":%B,\"request_time_us\":%D,\"http_referer\":\"%{Referer}i\",\"http_user_agent\":\"%{User-Agent}i\",\"http_x_forwarded_for\":\"%{X-Forwarded-For}i\",\"vhost\":\"%v\",\"server_port\":%{local}p,\"request_id\":\"%{unique_id}e\"}" json_combined # Use the JSON format for access logs CustomLog /var/log/apache2/access.json json_combined # Error log (use default format; parsed by Fluent Bit) ErrorLog /var/log/apache2/error.log LogLevel warn ``` Enable `mod_unique_id` for request correlation: ```bash # Debian/Ubuntu sudo a2enmod unique_id # RHEL/CentOS # Add to httpd.conf: # LoadModule unique_id_module modules/mod_unique_id.so ``` Reload Apache: ```bash sudo apachectl configtest && sudo systemctl reload apache2 ``` ### Step 2: Set Up Fluent Bit Create `/etc/fluent-bit/fluent-bit.conf`: ```ini [SERVICE] Flush 5 Log_Level info Parsers_File parsers.conf [INPUT] Name tail Path /var/log/apache2/access.json Tag apache.access Refresh_Interval 5 [INPUT] Name tail Path /var/log/apache2/error.log Parser apache_error Tag apache.error Refresh_Interval 5 [FILTER] Name parser Match apache.access Key_Name log Parser json Reserve_Data On [FILTER] Name modify Match apache.* Add service apache [FILTER] Name modify Match apache.access Add log_type access [FILTER] Name modify Match apache.error Add log_type error Add level error [FILTER] Name lua Match apache.access script /etc/fluent-bit/apache_message.lua call create_message [OUTPUT] Name http Match apache.* Host YOUR_LOGTIDE_HOST Port 443 URI /api/v1/ingest/single Format json Header X-API-Key YOUR_API_KEY Header Content-Type application/json tls On tls.verify On ``` Create `/etc/fluent-bit/apache_message.lua`: ```lua function create_message(tag, timestamp, record) local method = record["request_method"] or "GET" local uri = record["request_uri"] or "/" local status = record["status"] or 0 record["message"] = string.format("%s %s %d", method, uri, status) -- Convert microseconds to milliseconds local us = tonumber(record["request_time_us"]) or 0 record["request_time_ms"] = us / 1000 -- Set level based on status code local s = tonumber(status) or 0 if s >= 500 then record["level"] = "error" elseif s >= 400 then record["level"] = "warn" else record["level"] = "info" end return 1, timestamp, record end ``` Create `/etc/fluent-bit/parsers.conf`: ```ini [PARSER] Name json Format json Time_Key time Time_Format %Y-%m-%dT%H:%M:%S%z [PARSER] Name apache_error Format regex Regex ^\[(?