PostHog / PostHog/posthog-ruby

Add core SDK structured Logs public API

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement team/logs
Dominant language
Ruby
Stars
36
Forks
34
Avg merge
1d 13h
Merged PRs (30d)
18

Description

Summary

Add core SDK structured Logs public API to posthog-ruby.

Spec

  • sdk-specs/openspec/specs/logs/spec.md

Current evidence

Rails-only logs support exists, but the core SDK audit found no capture_log / logger public API in PostHog::Client or the public API snapshot.

Expected behavior

Implement logs support at the core SDK level, including:

  • Public log capture API / logger helper.
  • Severity mapping.
  • OTLP log record/envelope encoding.
  • Batching/flush behavior for logs.
  • Transport to {host}/i/v1/logs?token={projectApiKey}.
  • Tests for core spec scenarios independent of Rails.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sdk-specs/openspec/specs/logs/spec.md, then inspect PostHog::Client and the public API snapshot where the audit found no core logs API. Use the core spec scenarios as the test target; done means public capture/logger support, severity mapping, OTLP encoding, batching and flushing, and transport to the specified logs endpoint work independently of Rails.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.