Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,61 @@ version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
target-branch: "dev"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
time: "08:00"
timezone: "America/Caracas"
open-pull-requests-limit: 2
rebase-strategy: "disabled"
commit-message:
prefix: "chore(deps)"
labels:
- "dependencies"
- "automated"
- "dependabot"
reviewers:
- "zuccadev"
allow:
- dependency-type: "direct"
groups:
kotlin:
kotlin-stack:
patterns:
- "org.jetbrains.kotlin*"
- "org.jetbrains.kotlinx*"
ktor:
- "app.cash.sqldelight*"
ktor-stack:
patterns:
- "io.ktor*"
testing:
testing-stack:
patterns:
- "org.junit*"
- "io.mockk*"
- "app.cash.turbine*"
other-gradle-updates:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
target-branch: "dev"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
time: "08:30"
timezone: "America/Caracas"
open-pull-requests-limit: 1
rebase-strategy: "disabled"
commit-message:
prefix: "chore(ci)"
labels:
- "ci"
- "automated"
- "dependabot"
reviewers:
- "zuccadev"
groups:
github-actions-all:
patterns:
- "*"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and
- **`AppLoggerLifecycleObserver`** — automatic flush when app backgrounds.
- **`AppLoggerConfig.Builder`** — typed configuration builder with adaptive defaults per platform.
- **`AppLoggerSDK`** — public entry singleton (Android), idempotent initialization.
- **`AppLoggerIos`** — public entry singleton (iOS), exported to Swift via KMP framework.
- **`AppLoggerIos`** — public iOS entry singleton for Kotlin Multiplatform (`iosMain`).
- **`logger-test` module** — testing utilities: `NoOpTestLogger`, `InMemoryLogger`, `FakeTransport`.
- **Privacy by design**: no PII captured, ephemeral `session_id`, optional `user_id` with consent.
- **Crash handler chaining**: SDK chains the previous handler, never replaces it.
Expand Down
62 changes: 16 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ appLoggers/
- **Kotlin Multiplatform** — un codebase para Android, iOS y JVM
- **Trait-based architecture** — interfaces intercambiables, Clean Code, SOLID
- **Fire-and-forget** — no bloquea el hilo llamador
- **Adaptativo** — detecta Mobile vs TV y ajusta automáticamente
- **Adaptativo** — detecta Mobile vs TV/WearOS y ajusta automáticamente batch, flush y stack traces
- **Privacidad por diseño** — GDPR, LGPD, CCPA compliant
- **gRPC y WebSocket** — interceptores para flujos de alta velocidad
- **Offline-first** — SQLite circular FIFO cuando no hay red
- **Batería inteligente** — adapta flush según tipo de red y nivel de batería
- **Offline-first** — buffer FIFO en memoria con reintentos automáticos (backoff exponencial con jitter)
- **Transporte intercambiable** — backend Supabase incluido; cualquier backend vía `LogTransport` custom

---

Expand Down Expand Up @@ -205,18 +204,19 @@ dependencies {
}
```

### iOS (Swift Package Manager)
### iOS (KMP puro)

`logger-core` genera un XCFramework (`AppLogger.framework`) distribuible vía GitHub Releases o repositorio SPM.
`logger-core` genera el artefacto iOS desde `iosMain` usando Kotlin Multiplatform.

```swift
import AppLogger
En este proyecto, la ruta oficial para iOS es KMP end-to-end: inicialización y uso en Kotlin (`commonMain`/`iosMain`).

```kotlin
// iosMain
AppLoggerIos.shared.initialize(
config: AppLoggerConfig.Builder()
.endpoint(endpoint: "https://tu-proyecto.supabase.co")
.apiKey(key: "tu_anon_key")
.debugMode(debug: false)
config = AppLoggerConfig.Builder()
.endpoint("https://tu-proyecto.supabase.co")
.apiKey("tu_anon_key")
.debugMode(false)
.build()
)
```
Expand Down Expand Up @@ -271,41 +271,11 @@ AppLoggerSDK.metric("screen_load_time", 1234.0, "ms", tags = mapOf("screen" to "
AppLoggerSDK.debug("TAG", "Solo visible en debug")
```

### iOS (Swift)

```swift
import AppLogger

AppLoggerIos.shared.initialize(config: ...)

AppLoggerIos.shared.error(tag: "PLAYER", message: "Playback failed")
AppLoggerIos.shared.metric(name: "buffer_time", value: 420.0, unit: "ms")
```

### gRPC — Interceptor automático
### iOS (Kotlin `iosMain`)

```kotlin
val channel = ManagedChannelBuilder
.forAddress("api.tuapp.com", 443)
.useTransportSecurity()
.intercept(
GrpcLoggingInterceptor(
logger = AppLoggerSDK,
latencyThresholdMs = 500
)
)
.build()
```

### WebSocket — Listener wrapper

```kotlin
val loggingListener = LoggingWebSocketListener(
delegate = tuWebSocketListener,
logger = AppLoggerSDK,
tag = "WS_STREAM"
)
okHttpClient.newWebSocket(request, loggingListener)
AppLoggerIos.shared.error("PLAYER", "Playback failed", throwable = null)
AppLoggerIos.shared.metric("buffer_time", 420.0, "ms")
```

---
Expand Down Expand Up @@ -488,7 +458,7 @@ Cuando el SDK esté estable, se publicará a Maven Central para distribución si
|---|---|---|---|
| Android Mobile | API 23 (6.0) | `androidMain` | ✅ |
| Android TV | API 23 (6.0) | `androidMain` | ✅ |
| iOS | iOS 15+ | `iosMain` → XCFramework | ✅ |
| iOS | iOS 14+ | `iosMain` → XCFramework | ✅ |
| JVM | JDK 11+ | `jvmMain` | ✅ |

---
Expand Down
23 changes: 23 additions & 0 deletions docs/ES/agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Agents — Skills de Integración AppLogger

Este directorio contiene **skills** (guías de dominio) para agentes de IA y desarrolladores que necesitan integrar AppLogger en proyectos externos.

Incluye un archivo estándar `SKILL.md` compatible con la especificación de Agent Skills.

| Skill | Plataforma | Archivo |
|---|---|---|
| Skill principal compatible Agent Skills | Android + iOS (KMP) | [SKILL.md](SKILL.md) |
| Integrar AppLogger en app Android (Kotlin) | Android Mobile + TV | [android-integration.md](android-integration.md) |
| Integrar AppLogger en iOS (KMP puro) | iOS 14+ | [ios-integration.md](ios-integration.md) |

---

## Cómo usar estos skills

Cada skill contiene:
1. **Checklist de prerrequisitos** — lo que la app destino necesita antes de empezar.
2. **Pasos de integración** — código exacto, verificado contra el source del SDK.
3. **Patrones de uso** — ejemplos reales de logging por nivel.
4. **Errores comunes** — problemas conocidos y cómo resolverlos.

Los ejemplos de código están verificados contra el SDK versión `0.1.0-alpha.1`.
53 changes: 53 additions & 0 deletions docs/ES/agents/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: applogger-kmp-integration
description: Use this skill when integrating AppLogger in Android or iOS using Kotlin Multiplatform, validating configuration, initialization, health checks, and troubleshooting.
---

# AppLogger KMP Integration Skill

## When to use this skill

Use this skill when the user needs to:

1. Integrate AppLogger in Android or iOS from Kotlin code.
2. Configure AppLogger safely with environment variables.
3. Validate initialization and health status.
4. Troubleshoot telemetry delivery or buffer behavior.

Do not use this skill for:

1. Integración host nativa externa (deprecada en este proyecto).
2. Non-KMP setup guides.
3. Backend schema design outside AppLogger docs.

## Mandatory constraints

1. Prefer Kotlin Multiplatform flow (`commonMain` + `iosMain`).
2. Do not recommend host package-manager flows for new implementations.
3. Never suggest hardcoding secrets.
4. Verify API usage against current SDK code before giving examples.

## Execution workflow

1. Identify target platform: Android, iOS, or both.
2. Validate prerequisites and dependencies.
3. Provide initialization code with `AppLoggerConfig.Builder()`.
4. Provide usage examples for `debug/info/warn/error/critical/metric`.
5. Provide `AppLoggerHealth.snapshot()` checks.
6. Provide troubleshooting checklist.

## Canonical references in this repository

1. Android integration: `docs/ES/agents/android-integration.md`
2. iOS KMP integration: `docs/ES/agents/ios-integration.md`
3. Full integration guide: `docs/ES/desarrollo/integration-guide.md`
4. Compatibility matrix: `docs/ES/desarrollo/api-compatibility.md`
5. Architecture details: `docs/ES/paquete/architecture.md`

## Output quality standard

1. Explain steps in simple language.
2. Keep examples executable and minimal.
3. Separate required steps from optional optimizations.
4. Include common errors and exact fixes.
5. State assumptions explicitly when information is missing.
Loading
Loading