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
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
permissions:
contents: write
id-token: write
packages: write

steps:
- name: Checkout
Expand Down Expand Up @@ -163,31 +162,29 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: https://npm.pkg.github.com
registry-url: https://registry.npmjs.org

- name: Build package
if: steps.should_release.outputs.needed == 'true'
run: npm run build

- name: Publish to GitHub Packages
- name: Publish to npm
if: steps.should_release.outputs.needed == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NPM_TAG="latest"
if [ "${{ steps.prerelease.outputs.value }}" = "true" ]; then
NPM_TAG="next"
fi

npm publish --ignore-scripts --tag "$NPM_TAG"
npm publish --provenance --ignore-scripts --tag "$NPM_TAG"

- name: Summary
if: steps.should_release.outputs.needed == 'true'
run: |
echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Version**: ${{ steps.pkg_version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
echo "- **Prerelease**: ${{ steps.prerelease.outputs.value }}" >> $GITHUB_STEP_SUMMARY
echo "- **GitHub Packages tag**: ${{ steps.prerelease.outputs.value == 'true' && 'next' || 'latest' }}" >> $GITHUB_STEP_SUMMARY
echo "- **npm tag**: ${{ steps.prerelease.outputs.value == 'true' && 'next' || 'latest' }}" >> $GITHUB_STEP_SUMMARY

- name: No release needed
if: steps.should_release.outputs.needed != 'true'
Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# @scope3data/observability-js
# @scope3/observability-js

Unified observability for Node.js services. A single `init()` call wires up [Sentry](https://sentry.io) (error monitoring, tracing, and profiling), [Pyroscope](https://pyroscope.io) (continuous CPU and heap profiling), and optionally the [OpenTelemetry](https://opentelemetry.io) SDK with OTLP trace export.

## Installation

This package is published to [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry). Ensure your project has a `.npmrc` with the `@scope3data` scope configured:

```
@scope3data:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${PACKAGES_ACCESS_TOKEN}
```

Then install:

```sh
npm install @scope3data/observability-js
npm install @scope3/observability-js
```

Requires Node.js >= 24.
Expand All @@ -29,7 +20,7 @@ Without this, `instrument.js` (which calls `init()`) and `server.js` (which uses

```js
const EXTERNAL_PACKAGES = [
'@scope3data/observability-js',
'@scope3/observability-js',
// ...
]
```
Expand All @@ -41,7 +32,7 @@ This is not required when running with a dev server (e.g. `tsx`) since Node's mo
Call `init()` once at process startup, before anything else runs:

```ts
import { init } from '@scope3data/observability-js'
import { init } from '@scope3/observability-js'

init({
serviceName: 'my-service',
Expand Down Expand Up @@ -260,7 +251,7 @@ All span helpers are safe to call without `init()` having been called first. Whe
In your library, pass your library name as the `tracerName` argument to any span helper. Do not call `init()` — that is the responsibility of the consuming application.

```ts
import { startSpan, setSpanAttributes } from '@scope3data/observability-js'
import { startSpan, setSpanAttributes } from '@scope3/observability-js'

async function executeToolCall(toolName: string, agentId: string, params: unknown) {
return startSpan(
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@scope3data/observability-js",
"name": "@scope3/observability-js",
"version": "2.1.0",
"description": "Unified observability (Sentry, OpenTelemetry, Pyroscope) for Node.js services",
"keywords": [
Expand Down Expand Up @@ -73,7 +73,6 @@
"node": ">= 20"
},
"publishConfig": {
"@scope3data:registry": "https://npm.pkg.github.com",
"registry": "https://npm.pkg.github.com"
"access": "public"
}
}
Loading