Skip to content

Instantly share code, notes, and snippets.

View kasunkv's full-sized avatar
💭
I may be slow to respond.

Kasun Kodagoda kasunkv

💭
I may be slow to respond.
View GitHub Profile
@kasunkv
kasunkv / Monitoring.ts
Created October 24, 2018 15:50
Monitoring Class encapsulating Sentry.
import * as sentry from '@sentry/node';
import { IMonitoring } from './interfaces/IMonitoring';
import { SentryEvent } from '@sentry/node';
export class Monitoring implements IMonitoring {
constructor() {
}
configure(): void {
@kasunkv
kasunkv / task.ts
Created October 24, 2018 15:46
Send exceptions to sentry.
try {
// Your code
} catch (err) {
sentry.captureException(err);
}
@kasunkv
kasunkv / task.ts
Created October 24, 2018 15:32
Import and Initialize Sentry
import * as sentry from '@sentry/node';
sentry.init({
dsn: 'https://[email protected]/1xxxxx1',
release: '1.0.1'
});
@kasunkv
kasunkv / bash.sh
Created October 24, 2018 15:25
Install sentry
npm install @sentry/[email protected] --save
@kasunkv
kasunkv / deploy-template.ps1
Created August 6, 2018 15:03
Subscription level deployment using Azure CLI
az deployment create --name <deployment_name> --location <resource_location> --template-file .\azuredeploy.json
@kasunkv
kasunkv / arm-template.json
Created August 6, 2018 15:00
Create Resource Group using ARM Template.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"rgLocation": {
"type": "string",
"defaultValue": "Southeast Asia"
},
"rgName": {
"type": "string",