File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/sentry/integrations/slack/unfurl
tests/sentry/integrations/slack Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,10 @@ def _unfurl_explore(
157157 _logger .warning ("Failed to generate chart for explore unfurl" )
158158 continue
159159
160+ # Only one chart/y-axis is supported at a time in Explore
161+ title = f"{ defaults ['title' ]} - { y_axes [0 ]} "
160162 unfurls [link .url ] = SlackDiscoverMessageBuilder (
161- title = defaults [ " title" ] ,
163+ title = title ,
162164 chart_url = url ,
163165 ).build ()
164166
Original file line number Diff line number Diff line change @@ -1522,7 +1522,9 @@ def test_unfurl_explore(
15221522
15231523 assert (
15241524 unfurls [url ]
1525- == SlackDiscoverMessageBuilder (title = "Explore Traces" , chart_url = "chart-url" ).build ()
1525+ == SlackDiscoverMessageBuilder (
1526+ title = "Explore Traces - avg(span.duration)" , chart_url = "chart-url"
1527+ ).build ()
15261528 )
15271529 assert len (mock_generate_chart .mock_calls ) == 1
15281530 assert mock_generate_chart .call_args [0 ][0 ] == ChartType .SLACK_EXPLORE_LINE
@@ -1695,7 +1697,9 @@ def test_unfurl_explore_end_to_end(
16951697 assert len (unfurls ) == 1
16961698 assert (
16971699 unfurls [url ]
1698- == SlackDiscoverMessageBuilder (title = "Explore Traces" , chart_url = "chart-url" ).build ()
1700+ == SlackDiscoverMessageBuilder (
1701+ title = "Explore Traces - avg(span.duration)" , chart_url = "chart-url"
1702+ ).build ()
16991703 )
17001704
17011705 @patch (
@@ -1806,7 +1810,9 @@ def test_unfurl_explore_logs(
18061810
18071811 assert (
18081812 unfurls [url ]
1809- == SlackDiscoverMessageBuilder (title = "Explore Logs" , chart_url = "chart-url" ).build ()
1813+ == SlackDiscoverMessageBuilder (
1814+ title = "Explore Logs - sum(payload_size)" , chart_url = "chart-url"
1815+ ).build ()
18101816 )
18111817 assert len (mock_generate_chart .mock_calls ) == 1
18121818 chart_data = mock_generate_chart .call_args [0 ][1 ]
You can’t perform that action at this time.
0 commit comments