Skip to content

Commit 67f32e0

Browse files
authored
Merge branch 'master' into joshferge/feat/assign-prs-to-user-v2
2 parents 1ec89c0 + 7820fdf commit 67f32e0

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/sentry/integrations/slack/unfurl/explore.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

tests/sentry/integrations/slack/test_unfurl.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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]

0 commit comments

Comments
 (0)