Skip to content

Commit 6792651

Browse files
chore: Improve agent skills with the new version of skill-creator (#169)
1 parent 5483213 commit 6792651

4 files changed

Lines changed: 49 additions & 26 deletions

File tree

.syncpackrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ export default {
5454
// Ignore this expected mismatch.
5555
"packages": ["@all-platforms/*"],
5656
"dependencies": ["@workleap/telemetry", "@workleap/common-room"],
57+
"dependencyTypes": ["prod"],
5758
"isIgnored": true
5859
},
5960
{
6061
// Sample apps use "workspace:*" (pinned) while packages use "workspace:^" (range).
6162
// Ignore this expected mismatch.
6263
"packages": ["@honeycomb-api-key/*", "@honeycomb-proxy/*"],
6364
"dependencies": ["@workleap/honeycomb"],
65+
"dependencyTypes": ["prod"],
6466
"isIgnored": true
6567
},
6668
{
Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,59 @@
11
---
22
name: workleap-telemetry
33
description: |
4-
Guide for @workleap/telemetry, Workleap's unified telemetry connecting Honeycomb, LogRocket, and Mixpanel with automatic correlation IDs.
5-
6-
Use this skill when:
7-
(1) Initializing wl-telemetry in a frontend application
8-
(2) Correlation values (Telemetry Id, Device Id) and cross-tool data correlation
9-
(3) Honeycomb tracing, OpenTelemetry spans, and performance monitoring
10-
(4) LogRocket session replay, user identification, and privacy controls
11-
(5) Mixpanel analytics, event tracking, and cross-product tracking
12-
(6) Configuring wl-telemetry diagnostic loggers (LogRocketLogger)
13-
(7) Storybook/test setup with Noop telemetry clients
14-
(8) Reviewing or troubleshooting telemetry instrumentation
4+
Guide for @workleap/telemetry — Workleap's unified telemetry package connecting Honeycomb (tracing), LogRocket (session replay), and Mixpanel (analytics) with automatic correlation IDs.
5+
6+
Use when initializing @workleap/telemetry, instrumenting Honeycomb traces/spans, configuring LogRocket replay or privacy, tracking Mixpanel events, setting up Noop clients for Storybook/tests, or troubleshooting telemetry correlation. Also activate when someone mentions observability, session replay, or analytics in a Workleap frontend context.
157
metadata:
16-
version: 3.2
8+
version: 3.3
179
---
1810

1911
# Workleap Telemetry (wl-telemetry)
2012

2113
`@workleap/telemetry` is an umbrella package that integrates Honeycomb, LogRocket, and Mixpanel with consistent correlation IDs for unified debugging and analysis.
2214

15+
## Platform Roles
16+
17+
- **Honeycomb**: Distributed tracing and performance monitoring (LCP, CLS, INP)
18+
- **LogRocket**: Session replay and frontend debugging
19+
- **Mixpanel**: Product analytics and event tracking
20+
21+
## Quick Start
22+
23+
```typescript
24+
import { initializeTelemetry, TelemetryProvider } from "@workleap/telemetry/react";
25+
26+
const telemetryClient = initializeTelemetry("wlp", {
27+
logRocket: { appId: "your-app-id" },
28+
honeycomb: {
29+
namespace: "your-namespace",
30+
serviceName: "your-service",
31+
apiServiceUrls: [/.+/g],
32+
options: { proxy: "https://your-otel-proxy" }
33+
},
34+
mixpanel: {
35+
envOrTrackingApiBaseUrl: "production"
36+
}
37+
});
38+
39+
<TelemetryProvider client={telemetryClient}>
40+
<App />
41+
</TelemetryProvider>
42+
```
43+
2344
## Critical Rules
2445

25-
1. **Use umbrella package**Always use `@workleap/telemetry`, not standalone packages
26-
2. **Do not invent APIs** — Only use documented APIs from references
27-
3. **Correlation is automatic** — Never manually set Telemetry Id or Device Id; never create your own `TelemetryContext` instances
28-
4. **Noop for non-production** — Use `NoopTelemetryClient` in Storybook/tests
29-
5. **Privacy matters** — Never log PII to LogRocket; use `data-public`/`data-private` attributes
30-
6. **productFamily is required**`initializeTelemetry` requires `"wlp"` or `"sg"` as the first argument
46+
1. **Use the umbrella package**Import from `@workleap/telemetry`, not standalone packages like `@workleap/honeycomb` directly. Standalone packages bypass the automatic correlation ID propagation that ties all three platforms together.
47+
2. **Do not invent APIs** — Only use APIs documented in the references. The model may hallucinate plausible-looking methods that don't exist.
48+
3. **Let correlation happen automatically** — Never manually set Telemetry Id or Device Id, and never create your own `TelemetryContext` instances. The SDK manages the lifecycle and cross-tool propagation; manual overrides break the correlation chain.
49+
4. **Use Noop clients outside production** — Use `NoopTelemetryClient` in Storybook and tests to avoid sending real telemetry data and to prevent initialization errors in non-browser environments.
50+
5. **Protect user privacy** — Never log PII to LogRocket. Session replays are shared across teams and may be reviewed broadly; use `data-public`/`data-private` HTML attributes to control what gets recorded.
51+
6. **productFamily is required**`initializeTelemetry` requires `"wlp"` (Workleap Platform) or `"sg"` (ShareGate) as the first argument. This determines platform-specific defaults and routing.
3152

3253
## Reference Guide
3354

34-
For detailed documentation beyond the rules above, consult:
55+
Consult these references based on what you need:
3556

36-
- **`references/api.md`**Initialization options, TelemetryClient properties, Honeycomb/LogRocket/Mixpanel client APIs, React hooks, Noop clients, LogRocketLogger
37-
- **`references/integrations.md`** — Platform-specific configuration, Honeycomb tracing patterns, LogRocket privacy and user identification, Mixpanel event tracking, cross-platform correlation workflows
38-
- **`references/examples.md`**Full application setup, Storybook/test configuration, user identification, custom Honeycomb traces, Mixpanel tracking patterns, logging configuration, troubleshooting
57+
- **`references/api.md`**Function signatures, type definitions, and complete API surface for all clients and hooks. Start here when you need to know exactly what parameters a method accepts.
58+
- **`references/integrations.md`** — Platform-specific configuration patterns, custom Honeycomb traces, LogRocket privacy controls, Mixpanel event tracking, and cross-platform correlation workflows. Start here for "how do I configure X" questions.
59+
- **`references/examples.md`**Copy-paste starter code for common scenarios: full app setup, Storybook decorators, test utilities, user identification, and troubleshooting. Start here for "show me how to do X" questions.

agent-skills/workleap-telemetry/references/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ const telemetryClient = initializeTelemetry(productFamily, {
4242
spanProcessors?: SpanProcessor[];
4343
fetchInstrumentation?: false | ((defaults) => FetchInstrumentationOptions);
4444
documentLoadInstrumentation?: false | ((defaults) => DocumentLoadInstrumentationOptions);
45-
xmlHttpRequestInstrumentation?: true | ((defaults) => XHRInstrumentationOptions); // Disabled by default
46-
userInteractionInstrumentation?: true | ((defaults) => UserInteractionOptions); // Disabled by default
45+
xmlHttpRequestInstrumentation?: false | ((defaults) => XHRInstrumentationOptions); // Disabled by default; provide a function to enable and customize
46+
userInteractionInstrumentation?: false | ((defaults) => UserInteractionOptions); // Disabled by default; provide a function to enable and customize
4747
transformers?: HoneycombSdkOptionsTransformer[];
4848
}
4949
},

agent-skills/workleap-telemetry/references/integrations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ honeycomb: {
4646
fetchInstrumentation: (config) => config, // Customize fetch instrumentation
4747
documentLoadInstrumentation: (config) => config, // Customize document load instrumentation
4848

49-
// Disabled by default. Use `true` to enable with defaults, or a function to enable and customize.
50-
xmlHttpRequestInstrumentation: true, // Enable XHR instrumentation
49+
// Disabled by default. Provide a function to enable and customize.
50+
xmlHttpRequestInstrumentation: (config) => config, // Enable and customize XHR instrumentation
5151
userInteractionInstrumentation: (config) => config, // Enable and customize user interactions
5252

5353
transformers: [] // SDK-level configuration transformers

0 commit comments

Comments
 (0)