Skip to content
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1] - 2026-06-20

### Fixed

- `sdkVersion` is now `1.0.1`; it was inadvertently left at `0.9.4` in the 1.0.0 release, so the User-Agent header and embedded SDK metadata reported a stale version

### Documentation

- README now documents the `integrations/logtideslog` `log/slog` handler

## [1.0.0] - 2026-06-20

### Added
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- **Retry with backoff** — exponential backoff with jitter
- **Circuit breaker** — prevents cascading failures
- **OpenTelemetry** — trace/span IDs extracted automatically; span and metric exporters included
- **log/slog handler** — route existing `slog` logging to LogTide with no code changes
- **net/http middleware** — per-request scope isolation out of the box
- **Thread-safe** — safe for concurrent use

Expand Down Expand Up @@ -263,6 +264,37 @@ them.

---

## log/slog handler

Route existing `log/slog` logging through LogTide without changing call sites.
Records honour the full client pipeline (scope merge, processors, BeforeSend,
sampling, batching). Attributes become entry metadata, slog groups become nested
metadata objects, and attribute values implementing `error` are promoted to
structured exceptions for server-side error grouping.

```go
import (
"log/slog"

"github.com/logtide-dev/logtide-sdk-go/integrations/logtideslog"
)

client, _ := logtide.NewClient(logtide.ClientOptions{
DSN: "https://lp_abc@api.logtide.dev",
Service: "my-service",
})

logger := slog.New(logtideslog.New(client, nil))
slog.SetDefault(logger)

slog.Info("user signed up", "user_id", 42) // flows to LogTide
```

Pass `&logtideslog.Options{Level: slog.LevelDebug}` to change the minimum level
(defaults to `slog.LevelInfo`).

---

## Flush & shutdown

```go
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// sdkVersion is embedded in the User-Agent header and SDK metadata.
const sdkVersion = "0.9.4"
const sdkVersion = "1.0.1"

// Client sends log entries to the LogTide ingest endpoint.
// Use NewClient for the explicit-lifecycle pattern, or Init + package-level
Expand Down
Loading