GZCTF integrates with various external services to provide enterprise-grade observability, storage, and communication capabilities. This guide covers all supported integrations and their configuration.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GZTimeWalker/GZCTF/llms.txt
Use this file to discover all available pages before exploring further.
OpenTelemetry Observability
GZCTF uses OpenTelemetry for distributed tracing, metrics collection, and logging.Configuration
Enable telemetry inappsettings.json:
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:26-29
Metrics Collection
GZCTF exports the following metric types:ASP.NET Core Metrics
ASP.NET Core Metrics
Exported Metrics:Reference:
http.server.request.duration- Request latency histogramhttp.server.active_requests- Current active requestshttp.server.request.body.size- Request body sizehttp.server.response.body.size- Response body size
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:40HTTP Client Metrics
HTTP Client Metrics
Exported Metrics:Reference:
http.client.request.duration- Outbound request latencyhttp.client.request.body.size- Outbound request sizehttp.client.response.body.size- Inbound response size
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:41Runtime Metrics
Runtime Metrics
Exported Metrics:Reference:
process.runtime.dotnet.gc.collections.count- GC collectionsprocess.runtime.dotnet.gc.heap.size- Heap sizeprocess.runtime.dotnet.gc.duration- GC pause timeprocess.runtime.dotnet.thread.count- Thread countprocess.runtime.dotnet.exception.count- Exception rate
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:42Database Metrics
Database Metrics
PostgreSQL Metrics:Reference:
npgsql.db.command.duration- Query execution timenpgsql.db.connection.count- Connection pool statsnpgsql.db.command.error.count- Query errors
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:44AWS SDK Metrics
AWS SDK Metrics
Tracks S3 operations when using S3 storage backend.Reference:
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:45Health Check Metrics
Health Check Metrics
Exported Metrics:Reference:
health_check_status- Health check results (0=unhealthy, 1=healthy)health_check_duration- Health check execution time
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:46Distributed Tracing
Tracing captures request flows across services:Trace Instrumentation
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:59-71
Prometheus Exporter
Expose metrics for Prometheus scraping:docker-compose.yml
prometheus.yml
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:95-102
OTLP Exporters
Send telemetry to OpenTelemetry collectors:/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:73-90
Storage Backends
GZCTF supports multiple storage backends for challenges, writeups, and traffic captures.Local File Storage
Local storage is suitable for development and small competitions. For production, use S3 or Azure Blob.
Amazon S3 / MinIO
S3-compatible object storage for scalable file hosting:/src/GZCTF/Storage/S3BlobStorage.cs:1-385
Storage Features
All storage backends implementIBlobStorage:
Storage Operations
- S3: Uses
PutObjectfor atomic writes - Local: Uses
FileStreamwithFileMode.Create
- Thread-safe via async I/O
- No file locking issues
- Safe for multi-instance deployments
Email Configuration (SMTP)
GZCTF uses SMTP for account verification, password resets, and email changes.Basic Configuration
Provider Examples
Mail Sender Architecture
Mail Queue:- Async background worker processes emails
- Prevents blocking API requests
- Automatic retry on transient failures
- Connection pooling for efficiency
/src/GZCTF/Services/Mail/MailSender.cs:151-186
Email Templates
GZCTF uses customizable HTML email templates:Mail Types
/src/GZCTF/Services/Mail/MailSender.cs:84-97
Certificate Validation
SSL Certificate Handling
/src/GZCTF/Services/Mail/MailSender.cs:52-53
TLS Configuration
For legacy SMTP servers with weak ciphers:Cipher Suite Policy
/src/GZCTF/Services/Mail/MailSender.cs:40-50
Monitoring Stack Example
Docker Compose Setup
docker-compose.yml
OpenTelemetry Collector Config
otel-collector-config.yaml
Grafana Dashboards
Example Metrics Queries:Health Checks
GZCTF implements comprehensive health checks:Health Check Registration
/src/GZCTF/Extensions/Startup/TelemetryExtension.cs:20-24
Next Steps
Customization
Customize themes, branding, and localization
Container Providers
Configure Docker or Kubernetes orchestration