Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('HTTPSnippet', function () {
'POST /test?query=value HTTP/1.1',
'Host: example.com',
'X-Something: Header Value',
'User-Agent: SentryUptimeBot/1.0 (+http://docs.sentry.io/product/alerts/uptime-monitoring/',
'Sentry-Trace: sentry-trace-value',
'Content-Size: 18',
``,
Expand Down
9 changes: 8 additions & 1 deletion static/app/views/alerts/rules/uptime/httpSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export function HTTPSnippet({body, headers, method, url, traceSampling}: Props)
: urlObject.pathname;

const appendedBody = body ? `\r\n${body}` : '';
const additionaLheaders = [...headers, ['Sentry-Trace', exampleTrace]];
const additionaLheaders = [
...headers,
[
'User-Agent',
'SentryUptimeBot/1.0 (+http://docs.sentry.io/product/alerts/uptime-monitoring/',
],
['Sentry-Trace', exampleTrace],
];

if (appendedBody !== '') {
additionaLheaders.push(['Content-Size', new Blob([appendedBody]).size.toString()]);
Expand Down
Loading