スキル一覧に戻る
asimihsan

loglens

by asimihsan

Dot files for my machines

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: loglens description: Query signals pipeline OTLP logs via the loglens Athena-backed CLI. Use when you need to search or inspect signals logs, run opinionated filters (logs/top-errors/schema), or execute raw SQL against the compacted or flat log tables in dev/stage/prod. Triggers include requests mentioning loglens, signals logs, OTLP logs, telemetry alerts, push-server logs, or Athena log queries.

Loglens

Quick start

  • Ensure AWS credentials for the target environment. If you are using AWS_PROFILE/SSO credentials directly, add --no-assume-role.
  • Run from repo: go run ./cmd/loglens ... (or use build/loglens if already built).
  • Confirm environments: loglens envs.
  • Run a bounded query (required): --day/--hour or --since/--until.

Example:

AWS_PROFILE=platform-dev AWS_REGION=us-west-2 \
  go run ./cmd/loglens --no-assume-role --env dev logs \
  --day 2026-01-06 --service push-server --severity error --limit 20 --output json

Core workflows

1) Opinionated log search (default compacted)

  • loglens logs targets the compacted + deduped table by default.
  • Always include a time filter to avoid full scans.
  • Use --service, --severity, --contains, and repeatable --filter for column/JSON predicates.
  • Add --columns or --include-attributes to inspect specific fields.
  • Use --table flat for freshest (non-deduped) data in the raw table.

Examples:

# Compacted (deduped) logs
loglens logs --env dev --day 2026-01-06 --service push-server --severity error --limit 50

# Fresh logs from the flat table
loglens logs --env dev --table flat --day 2026-01-06 --hour 23 --contains "error"

# JSON attribute filter
loglens logs --env dev --day 2026-01-06 --service push-server \
  --filter "attributes.app_id IS NOT NULL"

2) Raw SQL

Use loglens query for schema inspection or complex SQL. Prefer explicit databases if needed.

loglens query --env dev \
  --sql "SELECT event_ts, service_name, severity, body FROM telemetry_alerts_dev.int_otlp_logs_compacted_daily WHERE day=DATE '2026-01-06' AND hour=23 LIMIT 20" \
  --output json

3) Top errors

loglens top-errors --env stage --day 2026-01-06 --limit 20 --trace-samples 2 --output json

4) Schema discovery

loglens schema --env dev --table compacted
loglens schema --env dev --table flat

Data sources and Athena alternative

  • Loglens queries AWS Glue tables via Athena.
  • Tables:
    • telemetry-parser-db.telemetry_otlp_logs_flat (fresh, not deduped)
    • telemetry_alerts_{env}.int_otlp_logs_compacted_daily (compacted + deduped)
  • If you need direct Athena access or Glue catalog exploration, use the $athena-queries skill as an alternative.
  • Prod is expected to work the same way, but as of 2026-01-12 there is no data in prod.

References

See references/loglens_reference.md for configuration details, environment mappings, and additional examples.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です