Skip to content

Adjust to Better Stack convention#1

Merged
paweljw merged 6 commits into
mainfrom
pawel/betterstack-rebrand
Jul 9, 2026
Merged

Adjust to Better Stack convention#1
paweljw merged 6 commits into
mainfrom
pawel/betterstack-rebrand

Conversation

@paweljw

@paweljw paweljw commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Brings the fork in line with Better Stack instead of the old Logtail branding, and updates where logs are sent.

  • Branding/docs — README points at Better Stack (HTTP source docs + dashboard), and the badge/clone URLs point at this repo. Renamed the internal forwarder (logtailLogForwarderbetterStackLogForwarder) so the code reads consistently.
  • Ingestion endpoint — default is now in.logs.betterstack.com (was in.logtail.com).
  • Config — set SOURCE_TOKEN / INGESTING_HOST, matching the names we use across Better Stack. The old LOGTAIL_TOKEN / LOGTAIL_HTTP_API_URL still work as fallbacks, so existing layers don't break.

Docs on betterstack.com are being updated separately.

paweljw added 2 commits July 9, 2026 12:04
- README: point badge and clone URL at the logtail org, link the
  Better Stack HTTP source docs and dashboard instead of Logtail
- package.json: add a description
- Rename the forwarder logtailLogForwarder -> betterStackLogForwarder
  (src/forwarders/logtail.ts -> betterStack.ts) and its test file
Update the ingestion endpoint from in.logtail.com to in.logs.betterstack.com
and introduce Better Stack-named env vars while keeping the legacy ones as
fallbacks (non-breaking for existing deployments):

- env.ts: prefer SOURCE_TOKEN / INGESTING_HOST, fall back to LOGTAIL_TOKEN /
  LOGTAIL_HTTP_API_URL; default host in.logs.betterstack.com; resolve to
  sourceToken / ingestionUrl
- extension.ts: consume the resolved sourceToken / ingestionUrl
- README: document the new variables, defaults, and legacy fallbacks
- tests: cover precedence, legacy fallback, default host, and missing token
@paweljw paweljw requested a review from PetrHeinz July 9, 2026 10:38
Per-source ingesting hosts live under betterstackdata.com (e.g.
s123456.lu-trq-1.betterstackdata.com), not betterstack.com. Fix the env.ts
comment, tell the README to set INGESTING_HOST from the source settings, and
use a made-up cluster host in the env tests. No logic change — INGESTING_HOST
stays an opaque host, so nothing to validate.
@paweljw paweljw force-pushed the pawel/betterstack-rebrand branch from e7c664c to 8d5b134 Compare July 9, 2026 10:46

@PetrHeinz PetrHeinz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙌 - just two 💄 around the rebranding, and one pending comment to compatibility with newer runtimes.

Comment thread README.md Outdated
| ---------------------------------------- | ------------------------------------------------------- | ------------------------------------ |
| LOGTAIL_TOKEN | Logtail source bearer token | **required** |
| LOGTAIL_HTTP_API_URL | Logtail HTTP source ingestion API URL | `https://in.logtail.com/` |
| SOURCE_TOKEN | Better Stack source bearer token | **required** |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't call it source bearer token, just source token:

Suggested change
| SOURCE_TOKEN | Better Stack source bearer token | **required** |
| SOURCE_TOKEN | Better Stack source token | **required** |

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right - technically that's jargon/artifact of it being a HTTP connection. thanks!

Comment thread README.md Outdated
Once deployed set the `LOGTAIL_TOKEN` environment variable on your Lambda to your HTTP API source from Logtail, and [add the layer](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html) to your Lambda function.
On next invocation your Lambda logs should start appearing in your Logtail console.
Once deployed set the `SOURCE_TOKEN` environment variable on your Lambda to your Better Stack source token, and [add the layer](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html) to your Lambda function.
On next invocation your Lambda logs should start appearing in [Better Stack](https://telemetry.betterstack.com/).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be more specific:

Suggested change
On next invocation your Lambda logs should start appearing in [Better Stack](https://telemetry.betterstack.com/).
On next invocation your Lambda logs should start appearing in **Telemetry** -> [Live tail](https://telemetry.betterstack.com/team/0/tail).

Comment thread README.md Outdated
@@ -19,15 +19,15 @@ $ aws lambda publish-layer-version \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodejs20.x is already deprecated, we should aim at 22 / 24

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:O time flies, thank you!

paweljw added 3 commits July 9, 2026 12:59
- "source bearer token" -> "source token" (Better Stack's term)
- point the success step at Telemetry -> Live tail
nodejs20.x reached end-of-life on 2026-04-30; move to the current runtimes.

- README: advertise nodejs22.x and nodejs24.x as compatible runtimes
- build: esbuild target node22
- CI: build and test on node 22
- pull_request: validate PRs (including from forks) against the merge result
- push: main only, so post-merge/badge CI runs without double-firing on
  same-repo feature-branch PRs
- keep workflow_dispatch for manual runs

Takes effect once this workflow is on main; GitHub evaluates pull_request
triggers from the base branch's copy of the workflow.
@paweljw paweljw changed the title Rebrand to Better Stack + update ingestion endpoint Adjust to Better Stack convention Jul 9, 2026
@paweljw paweljw merged commit 6280638 into main Jul 9, 2026
1 check passed
@paweljw paweljw deleted the pawel/betterstack-rebrand branch July 9, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants