How to use the raven.captureBreadcrumb function in raven

To help you get started, we’ve selected a few raven examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-cli-sentry / ember-cli-sentry / addon / services / raven.js View on Github external
captureBreadcrumb(breadcrumb) {
    if (this.get('isRavenUsable')) {
      Raven.captureBreadcrumb(...arguments);
    } else {
      console.info(breadcrumb);
    }
  },
github willyb321 / elite-journal / app / lib / log-process.js View on Github external
Raven.context(function() {
			Raven.captureBreadcrumb({
				message: 'Log-process line',
				data: {
					line: line,
					filename: log
				}
			});
			let parsed;
			if (!parsed) {
				try {
					parsed = JSON.parse(line);
				} catch (e) {
					Raven.captureException(e);
					line = line
						.replace(/\u000e/igm, '')
						.replace(/\u000f/igm, '');
					parsed = JSON.parse(line);
github willyb321 / elite-journal / app / lib / log-watcher.js View on Github external
Raven.context(function () {
										Raven.captureBreadcrumb({
											message: 'File that crashed log watcher',
											data: {
												filename
											}
										});
										Raven.captureBreadcrumb({
											message: 'Log-watcher JSON.parse failed',
											data: {
												line: l,
												chunk: chunk.toString()
											}
										});
										Raven.captureException(e);
									})
								}
github Hydractify / kanna_kobayashi / src / structures / Client.ts View on Github external
protected async _onGuildMember(member: GuildMember, left: boolean): Promise
	{
		captureBreadcrumb({
			category: left ? 'guildMemberRemove' : 'guildMemberAdd',
			data: {
				guild: `${member.guild.name} (${member.guild.id})`,
				member: `${member.user.tag} (${member.id})`,

				mePresent: {
					guild: this.guilds.get(member.guild.id)?.members.has(this.user!.id) ?? 'Error',
					member: Boolean(member.guild.me),
				},
				referenceEqual: member.guild === this.guilds.get(member.guild.id),
			},
			message: 'Info about the guild member event',
		});

		const guildModel: GuildModel = await member.guild.fetchModel();
github willyb321 / media_mate / app / main / index.js View on Github external
Raven.context(() => {
				Raven.captureBreadcrumb({torrent: torrent.link, docs});
				Raven.captureException(err);
			});
		}
github LedgerHQ / ledger-live-desktop / src / sentry / node.js View on Github external
export const captureBreadcrumb = (o: *) => {
  Raven.captureBreadcrumb(o)
}
github willyb321 / media_mate / app / main / index.js View on Github external
Raven.context(() => {
				Raven.captureBreadcrumb({
					data:
						{
							torrent: torrent.link,
							docs
						}
				});
				Raven.captureException(err);
			});
		}
github billyvg / jsimport.nvim / rplugin / node / jsimport.js / src / logger.js View on Github external
const breadcrumbContext = ({ message, category, level, ...options }) => {
  Raven.captureBreadcrumb({
    message,
    category: category || 'logging',
    level,
    data: options,
  });
};
github Hydractify / kanna_kobayashi / src / structures / Client.ts View on Github external
this.webhook.error('ReactionError', reaction.message.guild!.shardID, e);

				return;
			}
		}
		if (reaction.message.author.id !== this.user.id
			|| !reaction.message.embeds.length
			|| !reaction.message.embeds[0].footer
		)
		{
			reaction.message.channel.messages.delete(reaction.message.id);

			return;
		}

		captureBreadcrumb({
			category: 'messageReactAdd',
			data: reaction.message.embeds[0],
			message: 'Info about the embed',
		});

		const [, tag, name]: string[] = /^Requested by (.+?) \u200b\|.* (.+)$/
			.exec(reaction.message.embeds[0].footer.text!) ?? [];
		if (!tag || !name)
		{
			reaction.message.channel.messages.delete(reaction.message.id);

			return;
		}

		const command: IResponsiveEmbedController = this.commandHandler.resolveCommand(name.toLowerCase()) as any;
		if (!command)
github Hydractify / kanna_kobayashi / src / structures / Logger.ts View on Github external
{
			case LogLevel.WARN:
				sentryLevel = 'warning';
				break;
			case LogLevel.SILLY:
				sentryLevel = 'debug';
				break;
			case LogLevel.VERBOSE:
				sentryLevel = 'debug';
				break;
			default:
				sentryLevel = LogLevel[level].toLowerCase();
				break;
		}

		captureBreadcrumb({
			category: 'console',
			level: sentryLevel,
			message: data,
		});
	}