Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(error-tracking): use /error-tracking in CDP issue templates (#117034)

Paul D'Ambraa70e3548cab8
diff --git a/nodejs/src/cdp/templates/_destinations/github/github.template.test.ts b/nodejs/src/cdp/templates/_destinations/github/github.template.test.ts
index cc4233c9ab35..40c385866233 100644
--- a/nodejs/src/cdp/templates/_destinations/github/github.template.test.ts
+++ b/nodejs/src/cdp/templates/_destinations/github/github.template.test.ts
@@ -26,7 +26,7 @@ describe('github template', () => {
[
'falls back to the issue-id URL for functions without posthog_issue_url',
undefined,
- '/error_tracking/issue-uuid',
+ '/error-tracking/issue-uuid',
],
])('%s', async (_name, posthogIssueUrl, expectedLinkPart) => {
const response = await tester.invoke({ ...baseInputs, posthog_issue_url: posthogIssueUrl })
diff --git a/nodejs/src/cdp/templates/_destinations/github/github.template.ts b/nodejs/src/cdp/templates/_destinations/github/github.template.ts
index 8489681472d2..b4468e1915d3 100644
--- a/nodejs/src/cdp/templates/_destinations/github/github.template.ts
+++ b/nodejs/src/cdp/templates/_destinations/github/github.template.ts
@@ -23,7 +23,7 @@ if (not repo) {
let posthog_issue_url := inputs.posthog_issue_url
if (empty(posthog_issue_url)) {
- posthog_issue_url := f'{project.url}/error_tracking/{inputs.posthog_issue_id}'
+ posthog_issue_url := f'{project.url}/error-tracking/{inputs.posthog_issue_id}'
}
let payload := {
'method': 'POST',
diff --git a/nodejs/src/cdp/templates/_destinations/gitlab/gitlab.template.ts b/nodejs/src/cdp/templates/_destinations/gitlab/gitlab.template.ts
index 1d5d277b7918..1257373608ba 100644
--- a/nodejs/src/cdp/templates/_destinations/gitlab/gitlab.template.ts
+++ b/nodejs/src/cdp/templates/_destinations/gitlab/gitlab.template.ts
@@ -12,7 +12,7 @@ export const template: HogFunctionTemplate = {
code_language: 'hog',
code: `let posthog_issue_url := inputs.posthog_issue_url
if (empty(posthog_issue_url)) {
- posthog_issue_url := f'{project.url}/error_tracking/{inputs.posthog_issue_id}'
+ posthog_issue_url := f'{project.url}/error-tracking/{inputs.posthog_issue_id}'
}
let payload := {
'method': 'POST',
diff --git a/nodejs/src/cdp/templates/_destinations/linear/linear.template.test.ts b/nodejs/src/cdp/templates/_destinations/linear/linear.template.test.ts
index 31fa9682ea06..4a89870cdf49 100644
--- a/nodejs/src/cdp/templates/_destinations/linear/linear.template.test.ts
+++ b/nodejs/src/cdp/templates/_destinations/linear/linear.template.test.ts
@@ -25,7 +25,7 @@ describe('linear template', () => {
[
'falls back to the issue-id URL for functions without posthog_issue_url',
undefined,
- '/error_tracking/issue-uuid',
+ '/error-tracking/issue-uuid',
],
])('%s', async (_name, posthogIssueUrl, expectedLinkPart) => {
const createResponse = await tester.invoke({ ...baseInputs, posthog_issue_url: posthogIssueUrl })
diff --git a/nodejs/src/cdp/templates/_destinations/linear/linear.template.ts b/nodejs/src/cdp/templates/_destinations/linear/linear.template.ts
index a66ac177af60..590b4ba0af66 100644
--- a/nodejs/src/cdp/templates/_destinations/linear/linear.template.ts
+++ b/nodejs/src/cdp/templates/_destinations/linear/linear.template.ts
@@ -35,7 +35,7 @@ let linear_issue_id := issue_response.body.data.issueCreate.issue.identifier;
let attachment_url := inputs.posthog_issue_url;
if (empty(attachment_url)) {
- attachment_url := f'{project.url}/error_tracking/{inputs.posthog_issue_id}';
+ attachment_url := f'{project.url}/error-tracking/{inputs.posthog_issue_id}';
}
let attachment_mutation := f'mutation AttachmentCreate \\{ attachmentCreate(input: \\{ issueId: "{linear_issue_id}", title: "PostHog issue", url: "{attachment_url}" }) \\{ success } }';
diff --git a/nodejs/tests/fixtures/hog-bytecode/bff655ff3a6cd33ea7706aaed585e4cfd62cccbabe5c9cd32cf7249d99a53524.json b/nodejs/tests/fixtures/hog-bytecode/1a7e398c98f58a517f7eed67c32b06b27f99164b6b0bfd3aed73e837f926c11b.json
similarity index 94%
rename from nodejs/tests/fixtures/hog-bytecode/bff655ff3a6cd33ea7706aaed585e4cfd62cccbabe5c9cd32cf7249d99a53524.json
rename to nodejs/tests/fixtures/hog-bytecode/1a7e398c98f58a517f7eed67c32b06b27f99164b6b0bfd3aed73e837f926c11b.json
index 0ee39e8940e1..39d53ae46f05 100644
--- a/nodejs/tests/fixtures/hog-bytecode/bff655ff3a6cd33ea7706aaed585e4cfd62cccbabe5c9cd32cf7249d99a53524.json
+++ b/nodejs/tests/fixtures/hog-bytecode/1a7e398c98f58a517f7eed67c32b06b27f99164b6b0bfd3aed73e837f926c11b.json
@@ -1 +1 @@
-["_H",1,52,"query",1,0,43,32,"https://api.linear.app/graphql",32,"body",32,"query",36,0,42,1,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"linear_workspace",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",42,2,42,3,2,"fetch",2,38,53,0,32,"mutation IssueCreate { issueCreate(input: { title: ",32,"title",32,"inputs",1,2,2,"jsonStringify",1,32," description: ",32,"description",32,"inputs",1,2,2,"jsonStringify",1,32," teamId: \"",32,"team",32,"inputs",1,2,32,"\" }) { success issue { identifier } } }",2,"concat",7,36,1,36,0,54,1,33,200,36,2,32,"status",45,12,40,21,32,"Failed to post create issue in Linear: ",36,2,32,"status",45,32,": ",36,2,32,"body",45,2,"concat",4,2,"Error",1,49,36,2,32,"body",45,32,"data",45,32,"issueCreate",45,32,"issue",45,32,"identifier",45,32,"posthog_issue_url",32,"inputs",1,2,36,4,2,"empty",1,40,19,32,"url",32,"project",1,2,32,"/error_tracking/",32,"posthog_issue_id",32,"inputs",1,2,2,"concat",3,37,4,32,"mutation AttachmentCreate { attachmentCreate(input: { issueId: \"",36,3,32,"\", title: \"PostHog issue\", url: \"",36,4,32,"\" }) { success } }",2,"concat",5,36,5,36,0,54,1,35,35,35,35,35,35,35]
+["_H",1,52,"query",1,0,43,32,"https://api.linear.app/graphql",32,"body",32,"query",36,0,42,1,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"linear_workspace",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",42,2,42,3,2,"fetch",2,38,53,0,32,"mutation IssueCreate { issueCreate(input: { title: ",32,"title",32,"inputs",1,2,2,"jsonStringify",1,32," description: ",32,"description",32,"inputs",1,2,2,"jsonStringify",1,32," teamId: \"",32,"team",32,"inputs",1,2,32,"\" }) { success issue { identifier } } }",2,"concat",7,36,1,36,0,54,1,33,200,36,2,32,"status",45,12,40,21,32,"Failed to post create issue in Linear: ",36,2,32,"status",45,32,": ",36,2,32,"body",45,2,"concat",4,2,"Error",1,49,36,2,32,"body",45,32,"data",45,32,"issueCreate",45,32,"issue",45,32,"identifier",45,32,"posthog_issue_url",32,"inputs",1,2,36,4,2,"empty",1,40,19,32,"url",32,"project",1,2,32,"/error-tracking/",32,"posthog_issue_id",32,"inputs",1,2,2,"concat",3,37,4,32,"mutation AttachmentCreate { attachmentCreate(input: { issueId: \"",36,3,32,"\", title: \"PostHog issue\", url: \"",36,4,32,"\" }) { success } }",2,"concat",5,36,5,36,0,54,1,35,35,35,35,35,35,35]
diff --git a/nodejs/tests/fixtures/hog-bytecode/f338034319c2823ee06c0c4411e86dee8c8354e905023e94ff71192ec3efda38.json b/nodejs/tests/fixtures/hog-bytecode/d063668ab884ff2fceaf9c5794a6d323751042607a84d177f9591b145ba84fd1.json
similarity index 94%
rename from nodejs/tests/fixtures/hog-bytecode/f338034319c2823ee06c0c4411e86dee8c8354e905023e94ff71192ec3efda38.json
rename to nodejs/tests/fixtures/hog-bytecode/d063668ab884ff2fceaf9c5794a6d323751042607a84d177f9591b145ba84fd1.json
index 48c20d6ae956..cc821691933b 100644
--- a/nodejs/tests/fixtures/hog-bytecode/f338034319c2823ee06c0c4411e86dee8c8354e905023e94ff71192ec3efda38.json
+++ b/nodejs/tests/fixtures/hog-bytecode/d063668ab884ff2fceaf9c5794a6d323751042607a84d177f9591b145ba84fd1.json
@@ -1 +1 @@
-["_H",1,32,"name",32,"account",32,"github_installation",32,"inputs",1,4,32,"repository",32,"inputs",1,2,36,0,5,40,6,32,"Owner is required",2,"Error",1,49,36,1,5,40,6,32,"Repository is required",2,"Error",1,49,32,"posthog_issue_url",32,"inputs",1,2,36,2,2,"empty",1,40,19,32,"url",32,"project",1,2,32,"/error_tracking/",32,"posthog_issue_id",32,"inputs",1,2,2,"concat",3,37,2,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"github_installation",32,"inputs",1,3,2,"concat",2,32,"Accept",32,"application/vnd.github+json",32,"Content-Type",32,"application/json",32,"User-Agent",32,"PostHog Github App",42,4,32,"body",32,"title",32,"title",32,"inputs",1,2,32,"body",32,"description",32,"inputs",1,2,32,"\n\n[View in PostHog](",36,2,32,")",2,"concat",4,42,2,42,3,32,"https://api.github.com/repos/",36,0,32,"/",36,1,32,"/issues",2,"concat",5,36,3,2,"fetch",2,33,200,36,4,32,"status",45,15,33,300,36,4,32,"status",45,14,4,2,40,21,32,"Failed to create GitHub issue: ",36,4,32,"status",45,32,": ",36,4,32,"body",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35]
+["_H",1,32,"name",32,"account",32,"github_installation",32,"inputs",1,4,32,"repository",32,"inputs",1,2,36,0,5,40,6,32,"Owner is required",2,"Error",1,49,36,1,5,40,6,32,"Repository is required",2,"Error",1,49,32,"posthog_issue_url",32,"inputs",1,2,36,2,2,"empty",1,40,19,32,"url",32,"project",1,2,32,"/error-tracking/",32,"posthog_issue_id",32,"inputs",1,2,2,"concat",3,37,2,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"github_installation",32,"inputs",1,3,2,"concat",2,32,"Accept",32,"application/vnd.github+json",32,"Content-Type",32,"application/json",32,"User-Agent",32,"PostHog Github App",42,4,32,"body",32,"title",32,"title",32,"inputs",1,2,32,"body",32,"description",32,"inputs",1,2,32,"\n\n[View in PostHog](",36,2,32,")",2,"concat",4,42,2,42,3,32,"https://api.github.com/repos/",36,0,32,"/",36,1,32,"/issues",2,"concat",5,36,3,2,"fetch",2,33,200,36,4,32,"status",45,15,33,300,36,4,32,"status",45,14,4,2,40,21,32,"Failed to create GitHub issue: ",36,4,32,"status",45,32,": ",36,4,32,"body",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35]