Skip to content

Commit

Permalink
feat(configTemplates.ts, integrationsData.ts): add Node.js client tem…
Browse files Browse the repository at this point in the history
…plate for Airbrake integration

Add a new JavaScript (Node.js) template to support Airbrake
integration, allowing users to easily configure error monitoring
for Node.js applications. Update integrations data to include
the new Node.js template, enhancing the range of supported
languages and frameworks.
  • Loading branch information
masterkain committed Jan 13, 2025
1 parent dd1b104 commit 7e6b4d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/configTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ const airbrake = new Notifier({
});
`;

//
// JavaScript (Node.js)
//
export const nodejsclientTemplate = `
import { Notifier } from '@airbrake/node';
const airbrake = new Notifier({
projectId: 1, // any number will do
projectKey: '{REPLACE_PROJECT_KEY}',
environment: 'production',
host: 'https://airbroke.mydomain.com',
remoteConfig: false,
performanceStats: false,
queryStats: false,
queueStats: false,
});
`;

//
// Python (Generic or Django)
//
Expand Down
8 changes: 8 additions & 0 deletions lib/integrationsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
iosSwiftTemplate,
javaTemplate,
jsclientTemplate,
nodejsclientTemplate,
phpTemplate,
pythonTemplate,
rubyTemplate,
Expand Down Expand Up @@ -40,6 +41,13 @@ export const integrations: IntegrationItem[] = [
code: jsclientTemplate,
icon: SiJavascript,
},
{
name: 'JavaScript (Node.js)',
filename: 'airbroke.js',
language: 'javascript',
code: nodejsclientTemplate,
icon: SiJavascript,
},
{
name: 'Python',
filename: 'airbroke.py',
Expand Down

0 comments on commit 7e6b4d7

Please sign in to comment.