@@ -87,10 +87,10 @@ This package ships a **dual build**: ESM and CommonJS. Node.js picks the right f
8787
8888``` js
8989// ✅ ESM project (type:module or .mjs)
90- import { ArgusAgent } from ' argus' ;
90+ import { ArgusAgent } from ' argus-apm ' ;
9191
9292// ✅ CommonJS project — require() works directly
93- const { ArgusAgent } = require (' argus' );
93+ const { ArgusAgent } = require (' argus-apm ' );
9494
9595// ✅ CommonJS project — dynamic import also works
9696const { ArgusAgent } = await import (' argus' );
@@ -103,13 +103,13 @@ const { ArgusAgent } = await import('argus');
103103### Using the compiled package in your project (Node ≥ 14.18)
104104
105105``` bash
106- npm install argus
106+ npm install argus-apm
107107```
108108
109109Then import from the compiled entry point:
110110
111111``` typescript
112- import { ArgusAgent } from ' argus' ;
112+ import { ArgusAgent } from ' argus-apm ' ;
113113```
114114
115115### Building from source (Node ≥ 22.6, contributors only)
@@ -152,7 +152,7 @@ dist/
152152
153153``` typescript
154154// Compiled npm package
155- import { ArgusAgent } from ' argus' ;
155+ import { ArgusAgent } from ' argus-apm ' ;
156156
157157// Or if running source directly (Node 22.6+)
158158// import { ArgusAgent } from './packages/agent/src/index.ts';
@@ -274,7 +274,7 @@ const result = ArgusAgent.detectAppTypes('./my-service');
274274For maximum control, compose the agent manually using the fluent builder:
275275
276276``` typescript
277- import { ArgusAgent } from ' argus' ;
277+ import { ArgusAgent } from ' argus-apm ' ;
278278import fs from ' node:fs' ;
279279
280280const agent = await ArgusAgent .create ()
@@ -446,7 +446,7 @@ Connect-compatible middleware that reads the incoming `traceparent` W3C header a
446446### Manual context (background jobs / queue workers)
447447
448448``` typescript
449- import { runWithContext } from ' argus' ;
449+ import { runWithContext } from ' argus-apm ' ;
450450
451451const ctx = agent .createContext (' JOB' , ' /process-order' );
452452runWithContext (ctx , async () => {
@@ -736,16 +736,16 @@ Every subsystem is individually exported — TypeScript autocomplete surfaces th
736736
737737``` typescript
738738// Scrub a string manually
739- import { EntropyChecker } from ' argus' ;
739+ import { EntropyChecker } from ' argus-apm ' ;
740740const sanitized = new EntropyChecker ().scrub (' Bearer eyJhbGc...' );
741741// → 'Bearer [REDACTED]'
742742
743743// Detect connection-pool circuit-break conditions without the full agent
744- import { CircuitBreakerDetector } from ' argus' ;
744+ import { CircuitBreakerDetector } from ' argus-apm ' ;
745745const suggestions = new CircuitBreakerDetector ().analyze (recentQueryEvents );
746746
747747// Ship metrics to Honeycomb / New Relic / Datadog without mTLS
748- import { OTLPCompatibleExporter } from ' argus' ;
748+ import { OTLPCompatibleExporter } from ' argus-apm ' ;
749749const exporter = new OTLPCompatibleExporter ({
750750 endpointUrl: ' https://api.honeycomb.io/v1/metrics' ,
751751 apiKey: process .env .HONEYCOMB_API_KEY ,
@@ -754,7 +754,7 @@ const exporter = new OTLPCompatibleExporter({
754754await exporter .export (aggregatorEvents );
755755
756756// Manual async-context propagation (background jobs, queue workers)
757- import { runWithContext } from ' argus' ;
757+ import { runWithContext } from ' argus-apm ' ;
758758runWithContext (agent .createContext (' WORKER' , ' /process-job' ), async () => {
759759 // all traced queries here carry the same traceId
760760 await processJob ();
0 commit comments