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
2 changes: 1 addition & 1 deletion .agents/skills/create-adapter/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Add a build entry in `packages/evlog/tsdown.config.ts` alongside the existing ad
'adapters/{name}': 'src/adapters/{name}.ts',
```

Place it after the last adapter entry (currently `sentry` at line 22).
Place it after the last adapter entry (currently `hyperdx` in `tsdown.config.ts`).

## Step 3: Package Exports

Expand Down
5 changes: 5 additions & 0 deletions .changeset/add-hyperdx-drain-adapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"evlog": minor
---

Add HyperDX drain adapter (`evlog/hyperdx`) for OTLP/HTTP ingest, with defaults aligned to [HyperDX OpenTelemetry documentation](https://hyperdx.io/docs/install/opentelemetry) (`https://in-otel.hyperdx.io`, `authorization` header). Includes docs site and `review-logging-patterns` skill updates.
16 changes: 15 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ evlog/
│ │ ├── vite/ # Vite plugin (evlog/vite)
│ │ ├── shared/ # Toolkit: building blocks for custom framework integrations (evlog/toolkit)
│ │ ├── ai/ # AI SDK integration (evlog/ai)
│ │ ├── adapters/ # Log drain adapters (Axiom, OTLP, PostHog, Sentry, Better Stack)
│ │ ├── adapters/ # Log drain adapters (Axiom, OTLP, HyperDX, PostHog, Sentry, Better Stack)
│ │ ├── enrichers/ # Built-in enrichers (UserAgent, Geo, RequestSize, TraceContext)
│ │ └── runtime/ # Runtime code (client/, server/, utils/)
│ └── test/ # Tests
Expand Down Expand Up @@ -321,6 +321,7 @@ evlog provides built-in adapters for popular observability platforms. Use the `e
|---------|--------|-------------|
| Axiom | `evlog/axiom` | Send logs to Axiom for querying and dashboards |
| OTLP | `evlog/otlp` | OpenTelemetry Protocol for Grafana, Datadog, Honeycomb, etc. |
| HyperDX | `evlog/hyperdx` | Send logs to HyperDX via OTLP/HTTP ([documented](https://hyperdx.io/docs/install/opentelemetry) endpoint and `authorization` header) |
| PostHog | `evlog/posthog` | Send logs to PostHog Logs via OTLP for structured logging and observability |
| Sentry | `evlog/sentry` | Send logs to Sentry Logs for structured logging and debugging |
| Better Stack | `evlog/better-stack` | Send logs to Better Stack for log management and alerting |
Expand Down Expand Up @@ -351,6 +352,19 @@ export default defineNitroPlugin((nitroApp) => {

Set environment variable: `NUXT_OTLP_ENDPOINT`.

**Using HyperDX Adapter:**

```typescript
// server/plugins/evlog-drain.ts
import { createHyperDXDrain } from 'evlog/hyperdx'

export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('evlog:drain', createHyperDXDrain())
})
```

Set environment variable: `NUXT_HYPERDX_API_KEY` or `HYPERDX_API_KEY` (see [HyperDX OpenTelemetry](https://hyperdx.io/docs/install/opentelemetry)).

**Using PostHog Adapter:**

```typescript
Expand Down
4 changes: 4 additions & 0 deletions apps/docs/app/assets/icons/hyperdx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/docs/app/components/app/AppHeaderCenter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ const landingItems = [
description: 'Export via OTLP protocol',
to: '/adapters/otlp'
},
{
label: 'HyperDX',
icon: 'i-custom-hyperdx',
description: 'Send logs to HyperDX via OTLP',
to: '/adapters/hyperdx'
},
{
label: 'PostHog',
icon: 'i-simple-icons-posthog',
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/app/components/features/FeatureAdapters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,12 @@ function setupCanvas() {
</div>
</div>

<div class="relative z-10 mt-3 flex items-center gap-3">
<div class="relative z-10 mt-3 flex flex-wrap items-center justify-center gap-x-3 gap-y-1">
<span class="font-mono text-[9px] text-zinc-600">+ File System</span>
<span class="font-mono text-[9px] text-zinc-700">·</span>
<span class="font-mono text-[9px] text-zinc-600">Custom drains</span>
<span class="font-mono text-[9px] text-zinc-700">·</span>
<span class="font-mono text-[9px] text-zinc-500">and more</span>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/2.frameworks/11.react-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ navigation:

The `evlog/react-router` middleware auto-creates a request-scoped logger accessible via `context.get(loggerContext)` or `useLogger()` and emits a wide event when the response completes.

::callout{icon="i-lucide-info" color="info"}
React Router has three [modes](https://reactrouter.com/start/modes): **Framework**, **Data**, and **Declarative**. The `evlog/react-router` middleware requires the middleware API, which is available in **Framework** and **Data** modes only. Declarative mode does not support middleware — use [`evlog/browser`](/core-concepts/client-logging) for client-side logging instead.
::callout{color="info" icon="i-lucide-info"}
React Router has three [modes](https://reactrouter.com/start/modes): **Framework**, **Data**, and **Declarative**. The `evlog/react-router` middleware requires the middleware API, which is available in **Framework** and **Data** modes only. Declarative mode does not support middleware — use `evlog/browser` for client-side logging instead.
::

::code-collapse
Expand Down Expand Up @@ -102,7 +102,7 @@ export async function loader({ context }: Route.LoaderArgs) {
```

::callout{color="info" icon="i-custom-vite"}
**Using Vite?** The [`evlog/vite`](/core-concepts/vite-plugin) [plugin](/core-concepts/vite-plugin) replaces the `initLogger()` call with compile-time auto-initialization, strips `log.debug()` from production builds, and injects source locations.
**Using Vite?** The `evlog/vite` [plugin](/core-concepts/vite-plugin) replaces the `initLogger()` call with compile-time auto-initialization, strips `log.debug()` from production builds, and injects source locations.
::

The `loggerContext` provides typed access to the evlog logger in any loader or action via `context.get(loggerContext)`.
Expand Down
17 changes: 17 additions & 0 deletions apps/docs/content/4.adapters/1.overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ links:
to: /adapters/otlp
color: neutral
variant: subtle
- label: HyperDX
icon: i-custom-hyperdx
to: /adapters/hyperdx
color: neutral
variant: subtle
- label: PostHog
icon: i-simple-icons-posthog
to: /adapters/posthog
Expand Down Expand Up @@ -111,6 +116,15 @@ initLogger({ drain: createAxiomDrain() })
OpenTelemetry Protocol for Grafana, Datadog, Honeycomb, and more.
:::

:::card
---
icon: i-custom-hyperdx
title: HyperDX
to: /adapters/hyperdx
---
Send logs to HyperDX via OTLP/HTTP using their documented ingest endpoint and API key.
:::

:::card
---
icon: i-simple-icons-posthog
Expand Down Expand Up @@ -279,6 +293,9 @@ AXIOM_DATASET=my-logs
# OTLP (NUXT_OTLP_* or OTEL_*)
OTLP_ENDPOINT=https://otlp.example.com

# HyperDX (NUXT_HYPERDX_* or HYPERDX_*)
HYPERDX_API_KEY=<YOUR_HYPERDX_API_KEY_HERE>

# PostHog (NUXT_POSTHOG_* or POSTHOG_*)
POSTHOG_API_KEY=phc_xxx

Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/4.adapters/3.otlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The OTLP (OpenTelemetry Protocol) adapter sends logs in the standard OpenTelemet
- **Splunk**
- **New Relic**
- **Self-hosted OpenTelemetry Collector**
- **HyperDX**

::code-collapse

Expand Down
Loading
Loading