@@ -42,38 +42,10 @@ Sign up at [SkySignal](https://skysignal.app) and create a new site to get your
4242
4343### 2. Configure the Agent
4444
45- In your Meteor server startup code (e.g., ` server/main.js ` ):
46-
47- ``` javascript
48- import { Meteor } from ' meteor/meteor' ;
49- import { SkySignalAgent } from ' meteor/skysignal:agent' ;
45+ Add the package to your Meteor application:
5046
51- Meteor .startup (() => {
52- // Configure the agent
53- SkySignalAgent .configure ({
54- apiKey: process .env .SKYSIGNAL_API_KEY || ' your-api-key-here' ,
55- enabled: true ,
56- host: ' my-app-server-1' , // Optional: defaults to hostname
57- appVersion: ' 1.2.3' , // Optional: auto-detected from package.json
58-
59- // Optional: Customize collection intervals
60- systemMetricsInterval: 60000 , // 1 minute (default)
61- flushInterval: 10000 , // 10 seconds (default)
62- batchSize: 50 , // Max items per batch (default)
63-
64- // Optional: Sampling for high-traffic apps
65- traceSampleRate: 1.0 , // 100% of traces (reduce for high volume)
66-
67- // Optional: Feature toggles
68- collectTraces: true ,
69- collectMongoPool: true ,
70- collectDDPConnections: true ,
71- collectJobs: true
72- });
73-
74- // Start monitoring
75- SkySignalAgent .start ();
76- });
47+ ``` bash
48+ meteor add skysignal:agent
7749```
7850
7951### 3. Add to Settings File
@@ -86,33 +58,14 @@ For production, use Meteor settings. The agent **auto-initializes** from setting
8658 "skysignal" : {
8759 "apiKey" : " sk_your_api_key_here" ,
8860 "enabled" : true ,
89- "host" : " production-server-1" ,
9061 "appVersion" : " 1.2.3" ,
91- "traceSampleRate" : 0.5 ,
92- "collectTraces" : true ,
93- "collectMongoPool" : true ,
94- "collectDDPConnections" : true ,
95- "collectJobs" : true ,
96- "collectLogs" : true ,
97- "logLevels" : [" warn" , " error" , " fatal" ],
98- "logSampleRate" : 0.5 ,
99- "captureIndexUsage" : true ,
100- "indexUsageSampleRate" : 0.05 ,
101- "collectDnsTimings" : true ,
102- "collectOutboundHttp" : true ,
103- "collectCpuProfiles" : true ,
104- "cpuProfileThreshold" : 80 ,
105- "collectDeprecatedApis" : true ,
106- "collectPublications" : true ,
107- "collectEnvironment" : true ,
108- "collectVulnerabilities" : true
10962 },
11063 "public" : {
11164 "skysignal" : {
11265 "publicKey" : " pk_your_public_key_here" ,
11366 "rum" : {
11467 "enabled" : true ,
115- "sampleRate" : 0.5
68+ "sampleRate" : 1.0 ,
11669 },
11770 "errorTracking" : {
11871 "enabled" : true ,
@@ -125,23 +78,6 @@ For production, use Meteor settings. The agent **auto-initializes** from setting
12578
12679The agent auto-starts when it finds valid configuration in ` Meteor.settings.skysignal ` .
12780
128- ** Manual initialization (optional):**
129- ``` javascript
130- import { SkySignalAgent } from ' meteor/skysignal:agent' ;
131-
132- Meteor .startup (() => {
133- // Only needed if not using settings auto-initialization
134- const config = Meteor .settings .skysignal ;
135-
136- if (config && config .apiKey ) {
137- SkySignalAgent .configure (config);
138- SkySignalAgent .start ();
139- } else {
140- console .warn (' ⚠️ SkySignal not configured - monitoring disabled' );
141- }
142- });
143- ```
144-
14581## Configuration Options
14682
14783### API Configuration
0 commit comments