refactor: update sentry feed content
This commit is contained in:
parent
e770e42893
commit
1895ac772c
@ -277,6 +277,7 @@ export const feedIntegrationRouter = router({
|
|||||||
const action = get(data, 'action');
|
const action = get(data, 'action');
|
||||||
|
|
||||||
if (eventType === 'event_alert' && action === 'triggered') {
|
if (eventType === 'event_alert' && action === 'triggered') {
|
||||||
|
const title = get(data, 'data.event.title');
|
||||||
const message = get(data, 'data.event.message');
|
const message = get(data, 'data.event.message');
|
||||||
const tags = fromPairs<string>(get(data as any, 'data.event.tags'));
|
const tags = fromPairs<string>(get(data as any, 'data.event.tags'));
|
||||||
const url = String(get(data, 'data.event.web_url'));
|
const url = String(get(data, 'data.event.web_url'));
|
||||||
@ -286,7 +287,7 @@ export const feedIntegrationRouter = router({
|
|||||||
await createFeedEvent(workspaceId, {
|
await createFeedEvent(workspaceId, {
|
||||||
channelId: channelId,
|
channelId: channelId,
|
||||||
eventName: 'alert',
|
eventName: 'alert',
|
||||||
eventContent: `${message}`,
|
eventContent: `${title} | ${message}`,
|
||||||
tags: compact([
|
tags: compact([
|
||||||
tags['environment'],
|
tags['environment'],
|
||||||
tags['release'],
|
tags['release'],
|
||||||
|
Loading…
Reference in New Issue
Block a user