Repository navigation
feat(posthog): accept semanticConventions in logs mode - #975
Merged
Merged
Conversation
PostHog logs mode now forwards semanticConventions to the shared OTLP encoder, like HyperDX and Sazabi. The default stays true (the v3 OTLP default). recordShape: 'json' with semanticConventions: false keeps the 2.x record. Events mode is unchanged.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
@evlog/cli
evlog
@evlog/nuxthub
@evlog/signals
@evlog/telemetry
commit: |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes EVL-728
Summary
PostHog logs mode now accepts
semanticConventions, like HyperDX and Sazabi. The default istrue, the v3 OTLP default, so users who do not set it see no change. To keep the 2.x record, set both options. Events mode (/batch/) does not use OTLP and is unchanged.Usage
Changes
PostHogConfig.semanticConventions?: boolean, documented like the HyperDX option, listed inPOSTHOG_FIELDS, and forwarded bytoOTLPConfig.packages/evlog/test/adapters/posthog.test.ts: the default request matches the shared OTLP request;falsedrops the semantic-convention names;recordShape: 'json'withfalsegives the 2.x record; the same options work throughcreatePostHogDrain. Three of the new tests fail on the previous adapter.evlogminor.Checks
pnpm run lintandpnpm run typecheck: pass.packages/evlogvitest runon this branch: 122 files, 2370 tests, pass.test/bin.test.ts, one intest/nuxt/auto-import-types.test.ts) and a port conflict on:3000from a local docs dev server I had left running. After stopping that server, the full run passed. The three tests also pass when run alone on both the v3 base (25177b44) and this branch. I did not establish why they failed in the first full run.Rendered change (docs)
Before: production page, the "Choose a record shape" section with the existing
compactcallout (no keep-2.x paragraph yet).After: this branch, local docs build, the new keep-2.x paragraph and snippet.
The two frames are not anchored on the same text, because production has no keep-2.x paragraph to match. The change is an addition, so the after frame is the one that matters. The local frame also shows different word spacing from production, which I did not investigate.
ELI5
PostHog's adapter gets the same switch that HyperDX and Sazabi already have. By default it works the way the new version works. Someone who wants the old output can turn off one setting and keep the old output shape. The docs now show how.