Skip to content

Commit 58b5ee9

Browse files
authored
feat(logrocket): add LogRocket integration (#6678)
* feat(logrocket): add LogRocket integration * improvement(logrocket): fail loudly on a non-numeric identify timestamp and cover releases in the catalog copy * fix(logrocket): require a highlights identity and treat pagination cursors as opaque strings * fix(logrocket): trim request fields so whitespace-only input fails validation * fix(logrocket): declare the release version in the block inputs map
1 parent c155a57 commit 58b5ee9

23 files changed

Lines changed: 1837 additions & 11 deletions

apps/docs/components/icons.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,12 +1518,12 @@ export function InputIcon(props: SVGProps<SVGSVGElement>) {
15181518
export function StartIcon(props: SVGProps<SVGSVGElement>) {
15191519
return (
15201520
<svg
1521-
{...props}
15221521
width='26'
15231522
height='16'
15241523
viewBox='0 0 26 16'
15251524
fill='none'
15261525
xmlns='http://www.w3.org/2000/svg'
1526+
{...props}
15271527
>
15281528
<path
15291529
d='M7.8 13C9.23 13 10.45 12.49 11.47 11.47C12.49 10.45 13 9.23 13 7.8C13 6.37 12.49 5.15 11.47 4.13C10.45 3.11 9.23 2.6 7.8 2.6C6.37 2.6 5.15 3.11 4.13 4.13C3.11 5.15 2.6 6.37 2.6 7.8C2.6 9.23 3.11 10.45 4.13 11.47C5.15 12.49 6.37 13 7.8 13ZM7.8 15.6C5.63 15.6 3.79 14.84 2.28 13.33C0.76 11.81 0 9.97 0 7.8C0 5.63 0.76 3.79 2.28 2.28C3.79 0.76 5.63 0 7.8 0C9.75 0 11.45 0.62 12.89 1.85C14.33 3.09 15.2 4.64 15.5 6.5H24.7C25.07 6.5 25.38 6.62 25.63 6.87C25.88 7.12 26 7.43 26 7.8C26 8.17 25.87 8.48 25.63 8.73C25.38 8.98 25.07 9.1 24.7 9.1H15.5C15.2 10.96 14.33 12.51 12.89 13.75C11.44 14.98 9.75 15.6 7.8 15.6Z'
@@ -9035,6 +9035,23 @@ export function LogfireIcon(props: SVGProps<SVGSVGElement>) {
90359035
)
90369036
}
90379037

9038+
export function LogRocketIcon(props: SVGProps<SVGSVGElement>) {
9039+
return (
9040+
<svg {...props} viewBox='0 0 19 28' fill='none' role='img' xmlns='http://www.w3.org/2000/svg'>
9041+
<path
9042+
fill='currentColor'
9043+
fillRule='evenodd'
9044+
clipRule='evenodd'
9045+
d='M6.066 3.156A10.53 10.53 0 0 1 9.122 0a10.294 10.294 0 0 1 3.016 3.094 15.59 15.59 0 0 1 2.93 9.777c.637.513 1.293 1.006 1.918 1.53a3.46 3.46 0 0 1 1.104 3.189c-.302 1.457-.592 2.918-.911 4.372a1.214 1.214 0 0 1-1.848.61c-1.027-.825-2.027-1.678-3.05-2.504a4.684 4.684 0 0 1-2.891 1.255 4.678 4.678 0 0 1-3.385-1.22c-.735.541-1.419 1.191-2.138 1.772-.315.31-.666.58-1.046.806a1.215 1.215 0 0 1-1.603-.785c-.329-1.422-.672-2.839-.99-4.263a3.453 3.453 0 0 1 1.163-3.321c.559-.45 1.125-.893 1.694-1.331.159-.08.08-.261.087-.401a15.615 15.615 0 0 1 2.9-9.42m1.007 4.402a2.395 2.395 0 0 0 .21 3.173 2.636 2.636 0 0 0 3.603.075 2.398 2.398 0 0 0 .636-2.634 2.55 2.55 0 0 0-2.14-1.59 2.6 2.6 0 0 0-2.31.974'
9046+
/>
9047+
<path
9048+
fill='currentColor'
9049+
d='M5.712 23.082a.605.605 0 0 1 .896-.485 5.778 5.778 0 0 0 5.03 0 .61.61 0 0 1 .896.45c.005.89.005 1.78 0 2.67a.602.602 0 0 1-.94.436c-.267-.226-.508-.48-.764-.719-.407.762-.789 1.534-1.199 2.294a.61.61 0 0 1-1.012.006c-.41-.761-.79-1.538-1.206-2.299-.253.24-.494.494-.761.72a.603.603 0 0 1-.94-.442c-.007-.878 0-1.756 0-2.634M9.102 10.259a1.22 1.22 0 0 0 1.248-1.192v-.008a1.221 1.221 0 0 0-1.24-1.2h-.008A1.22 1.22 0 0 0 7.855 9.05v.008a1.22 1.22 0 0 0 1.24 1.2h.007Z'
9050+
/>
9051+
</svg>
9052+
)
9053+
}
9054+
90389055
export function SmartleadIcon(props: SVGProps<SVGSVGElement>) {
90399056
return (
90409057
<svg

apps/docs/components/ui/icon-mapping.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Maps block types to their icon component references
44

55
import type { ComponentType, SVGProps } from 'react'
6-
import { Library } from '@sim/emcn/icons'
6+
import { Library, Rocket } from '@sim/emcn/icons'
77
import {
88
A2AIcon,
99
AgentMailIcon,
@@ -136,6 +136,7 @@ import {
136136
LinkupIcon,
137137
LinqIcon,
138138
LogfireIcon,
139+
LogRocketIcon,
139140
LoopsIcon,
140141
LumaIcon,
141142
MailchimpIcon,
@@ -205,7 +206,6 @@ import {
205206
ServiceNowIcon,
206207
SftpIcon,
207208
ShopifyIcon,
208-
SimDeploymentsIcon,
209209
SimilarwebIcon,
210210
SimTriggerIcon,
211211
SixtyfourIcon,
@@ -309,7 +309,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
309309
datadog: DatadogIcon,
310310
datagma: DatagmaIcon,
311311
daytona: DaytonaIcon,
312-
deployments: SimDeploymentsIcon,
312+
deployments: Rocket,
313313
devin: DevinIcon,
314314
discord: DiscordIcon,
315315
docusign: DocuSignIcon,
@@ -414,6 +414,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
414414
linkup: LinkupIcon,
415415
linq: LinqIcon,
416416
logfire: LogfireIcon,
417+
logrocket: LogRocketIcon,
417418
logs: Library,
418419
logs_v2: Library,
419420
loops: LoopsIcon,
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
title: LogRocket
3+
description: Summarize sessions, manage users, and tag releases in LogRocket
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="logrocket"
10+
color="#764ABC"
11+
/>
12+
13+
{/* MANUAL-CONTENT-START:intro */}
14+
[LogRocket](https://logrocket.com/) is a session replay and product analytics platform for frontend applications. It records what users actually did — clicks, navigation, network requests, console output, and application state — so teams can see the exact path that led to a bug, a drop-off, or a support ticket instead of asking the customer to reproduce it.
15+
16+
With LogRocket, you can:
17+
18+
- **Summarize sessions with AI**: Galileo Highlights reads a user's sessions and answers a plain-English question about them, returning a markdown summary plus per-session breakdowns.
19+
- **Identify users**: Attach names, emails, and custom traits to a user so sessions can be segmented by plan, lifecycle stage, or account value.
20+
- **Export session data**: Pull download URLs for JSON Lines session exports and load them into a warehouse.
21+
- **Audit session access**: Page through the audit log to see who viewed which sessions and when.
22+
- **Tag releases**: Register a deployed version so uploaded source maps decode its stack traces.
23+
24+
Sim's LogRocket integration lets your agents run these operations programmatically. Use it to enrich a support ticket with a session summary, turn a vague bug report into reproduction steps, keep user traits in sync with your CRM, or register a release as part of a deploy workflow.
25+
26+
Highlights requests are asynchronous: **Request Highlights** returns an ID and **Get Highlights** reports `PENDING` until generation finishes (typically one to three minutes), then `READY` or `FAILED`. Poll it rather than expecting the summary immediately.
27+
28+
LogRocket has no REST API for querying sessions, issues, or metrics directly — that data is available through their [MCP server](https://docs.logrocket.com/docs/mcp) at `https://mcp.logrocket.com/mcp`, which you can add to Sim as an MCP server connection alongside this block.
29+
{/* MANUAL-CONTENT-END */}
30+
31+
32+
## Usage Instructions
33+
34+
Integrate LogRocket into your workflow to request AI session highlights for a user, poll for the result, list exported session files, read the audit log, create or update user profiles, and register releases so source maps decode their stack traces.
35+
36+
37+
38+
## Actions
39+
40+
### LogRocket Request Highlights
41+
42+
Start a Galileo session highlights job for a user. Returns a request ID to poll with LogRocket's Get Highlights operation.
43+
44+
#### Input
45+
46+
| Parameter | Type | Required | Description |
47+
| --------- | ---- | -------- | ----------- |
48+
| `apiKey` | string | Yes | LogRocket API key |
49+
| `orgId` | string | Yes | LogRocket organization ID |
50+
| `appId` | string | Yes | LogRocket project \(app\) ID |
51+
| `apiHost` | string | No | API host override for Private Cloud deployments |
52+
| `userEmail` | string | No | Email of the user to summarize. Required if no user ID is given. |
53+
| `userID` | string | No | ID of the user to summarize. Required if no email is given. |
54+
| `question` | string | No | Question to focus the highlights on |
55+
| `startMs` | string | No | Start of the session window, in milliseconds since epoch |
56+
| `endMs` | string | No | End of the session window, in milliseconds since epoch |
57+
| `webhookURL` | string | No | URL notified when the highlights job finishes |
58+
59+
#### Output
60+
61+
| Parameter | Type | Description |
62+
| --------- | ---- | ----------- |
63+
| `id` | string | Request ID used to retrieve the highlights result |
64+
65+
### LogRocket Get Highlights
66+
67+
Retrieve the result of a Galileo session highlights request. Status is PENDING until generation finishes, then READY or FAILED.
68+
69+
#### Input
70+
71+
| Parameter | Type | Required | Description |
72+
| --------- | ---- | -------- | ----------- |
73+
| `apiKey` | string | Yes | LogRocket API key |
74+
| `orgId` | string | Yes | LogRocket organization ID |
75+
| `appId` | string | Yes | LogRocket project \(app\) ID |
76+
| `apiHost` | string | No | API host override for Private Cloud deployments |
77+
| `id` | string | Yes | Request ID returned by the Request Highlights operation |
78+
79+
#### Output
80+
81+
| Parameter | Type | Description |
82+
| --------- | ---- | ----------- |
83+
| `status` | string | Job status: PENDING, READY, or FAILED |
84+
| `requestID` | string | ID of the highlights request |
85+
| `appID` | string | LogRocket project the request belongs to |
86+
| `highlights` | string | Markdown summary across the matched sessions. Present when status is READY. |
87+
| `sessions` | array | Per-session highlights |
88+
|`recordingID` | string | LogRocket recording ID |
89+
|`sessionID` | number | Session number within the recording |
90+
|`highlights` | string | Highlights for this session |
91+
92+
### LogRocket List Exported Sessions
93+
94+
List exported session files from the LogRocket Data Export API. Returns download URLs for JSON Lines exports, oldest first, plus a cursor for the next page.
95+
96+
#### Input
97+
98+
| Parameter | Type | Required | Description |
99+
| --------- | ---- | -------- | ----------- |
100+
| `apiKey` | string | Yes | LogRocket API key |
101+
| `orgId` | string | Yes | LogRocket organization ID |
102+
| `appId` | string | Yes | LogRocket project \(app\) ID |
103+
| `apiHost` | string | No | API host override for Private Cloud deployments |
104+
| `cursor` | string | No | Cursor from a previous page, used to fetch newer sessions |
105+
| `limit` | string | No | Results per page. Defaults to 10, maximum 100. |
106+
| `date` | string | No | Unix timestamp in milliseconds to start listing from |
107+
108+
#### Output
109+
110+
| Parameter | Type | Description |
111+
| --------- | ---- | ----------- |
112+
| `sessions` | array | Exported session files |
113+
|`url` | string | Download URL for the JSON Lines export file |
114+
| `cursor` | string | Opaque cursor for the next page of results |
115+
116+
### LogRocket Get Audit Logs
117+
118+
Export audit log entries from LogRocket, recording who viewed sessions and what actions were taken. Paginated with a cursor.
119+
120+
#### Input
121+
122+
| Parameter | Type | Required | Description |
123+
| --------- | ---- | -------- | ----------- |
124+
| `apiKey` | string | Yes | LogRocket API key |
125+
| `orgId` | string | Yes | LogRocket organization ID |
126+
| `appId` | string | Yes | LogRocket project \(app\) ID |
127+
| `apiHost` | string | No | API host override for Private Cloud deployments |
128+
| `limit` | string | No | Number of audit log records to return |
129+
| `cursor` | string | No | Cursor from a previous page, used to fetch the next page |
130+
131+
#### Output
132+
133+
| Parameter | Type | Description |
134+
| --------- | ---- | ----------- |
135+
| `logs` | array | Audit log entries |
136+
|`time` | string | Formatted timestamp of the action |
137+
|`createdDate` | string | ISO 8601 timestamp of the action |
138+
|`user` | string | Email or system ID of the actor |
139+
|`action` | string | Action taken, e.g. Viewed session |
140+
|`description` | string | Action details, e.g. the session ID |
141+
| `cursor` | string | Opaque cursor for the next page of results |
142+
| `hasNext` | boolean | Whether more audit logs exist beyond this page |
143+
144+
### LogRocket Identify User
145+
146+
Create or update a LogRocket user profile with demographic, financial, and engagement traits.
147+
148+
#### Input
149+
150+
| Parameter | Type | Required | Description |
151+
| --------- | ---- | -------- | ----------- |
152+
| `apiKey` | string | Yes | LogRocket API key |
153+
| `orgId` | string | Yes | LogRocket organization ID |
154+
| `appId` | string | Yes | LogRocket project \(app\) ID |
155+
| `apiHost` | string | No | API host override for Private Cloud deployments |
156+
| `userId` | string | Yes | ID of the user to create or update |
157+
| `name` | string | No | Display name of the user. Maximum 1024 characters. |
158+
| `email` | string | No | Email of the user. Maximum 1024 characters. |
159+
| `timestamp` | string | No | Unix timestamp in milliseconds describing when the submitted data was true |
160+
| `traits` | string | No | JSON object of custom traits. Each key and value is limited to 1024 characters and stored as a string. |
161+
162+
#### Output
163+
164+
| Parameter | Type | Description |
165+
| --------- | ---- | ----------- |
166+
| `userID` | string | ID of the created or updated user |
167+
| `name` | string | Display name stored on the profile |
168+
| `email` | string | Email stored on the profile |
169+
| `traits` | json | Custom traits stored on the profile, with every value coerced to a string |
170+
171+
### LogRocket Create Release
172+
173+
Register a release version in LogRocket so uploaded source maps can decode stack traces for it. Fails with a conflict if the version already exists.
174+
175+
#### Input
176+
177+
| Parameter | Type | Required | Description |
178+
| --------- | ---- | -------- | ----------- |
179+
| `apiKey` | string | Yes | LogRocket API key |
180+
| `orgId` | string | Yes | LogRocket organization ID |
181+
| `appId` | string | Yes | LogRocket project \(app\) ID |
182+
| `apiHost` | string | No | API host override for Private Cloud deployments |
183+
| `version` | string | Yes | Release version to register, e.g. 1.2.3 or a commit SHA |
184+
185+
#### Output
186+
187+
| Parameter | Type | Description |
188+
| --------- | ---- | ----------- |
189+
| `version` | string | Release version that was registered |
190+
191+

apps/docs/content/docs/en/integrations/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"linkup",
144144
"linq",
145145
"logfire",
146+
"logrocket",
146147
"logs",
147148
"loops",
148149
"luma",

0 commit comments

Comments
 (0)