@@ -33,6 +33,7 @@ function getDisabledProducts(organization: Organization): DisabledProducts {
3333 const hasPerformance = organization . features . includes ( 'performance-view' ) ;
3434 const hasProfiling = organization . features . includes ( 'profiling-view' ) ;
3535 const hasLogs = organization . features . includes ( 'ourlogs-enabled' ) ;
36+ const hasMetrics = organization . features . includes ( 'tracemetrics-enabled' ) ;
3637 const isSelfHostedErrorsOnly = ConfigStore . get ( 'isSelfHostedErrorsOnly' ) ;
3738
3839 let reason = t ( 'This feature is not enabled on your Sentry installation.' ) ;
@@ -76,6 +77,12 @@ function getDisabledProducts(organization: Organization): DisabledProducts {
7677 onClick : createClickHandler ( 'organizations:ourlogs-enabled' , 'Logs' ) ,
7778 } ;
7879 }
80+ if ( ! hasMetrics ) {
81+ disabledProducts [ ProductSolution . METRICS ] = {
82+ reason,
83+ onClick : createClickHandler ( 'organizations:tracemetrics-enabled' , 'Metrics' ) ,
84+ } ;
85+ }
7986 return disabledProducts ;
8087}
8188
@@ -236,91 +243,109 @@ export const platformProductAvailability = {
236243 ProductSolution . PERFORMANCE_MONITORING ,
237244 ProductSolution . PROFILING ,
238245 ProductSolution . LOGS ,
246+ ProductSolution . METRICS ,
239247 ] ,
240248 'python-aiohttp' : [
241249 ProductSolution . PERFORMANCE_MONITORING ,
242250 ProductSolution . PROFILING ,
243251 ProductSolution . LOGS ,
252+ ProductSolution . METRICS ,
244253 ] ,
245254 'python-asgi' : [
246255 ProductSolution . PERFORMANCE_MONITORING ,
247256 ProductSolution . PROFILING ,
248257 ProductSolution . LOGS ,
258+ ProductSolution . METRICS ,
249259 ] ,
250260 'python-awslambda' : [
251261 ProductSolution . PERFORMANCE_MONITORING ,
252262 ProductSolution . PROFILING ,
253263 ProductSolution . LOGS ,
264+ ProductSolution . METRICS ,
254265 ] ,
255266 'python-bottle' : [
256267 ProductSolution . PERFORMANCE_MONITORING ,
257268 ProductSolution . PROFILING ,
258269 ProductSolution . LOGS ,
270+ ProductSolution . METRICS ,
259271 ] ,
260272 'python-celery' : [
261273 ProductSolution . PERFORMANCE_MONITORING ,
262274 ProductSolution . PROFILING ,
263275 ProductSolution . LOGS ,
276+ ProductSolution . METRICS ,
264277 ] ,
265278 'python-chalice' : [
266279 ProductSolution . PERFORMANCE_MONITORING ,
267280 ProductSolution . PROFILING ,
268281 ProductSolution . LOGS ,
282+ ProductSolution . METRICS ,
269283 ] ,
270284 'python-django' : [
271285 ProductSolution . PERFORMANCE_MONITORING ,
272286 ProductSolution . PROFILING ,
273287 ProductSolution . LOGS ,
288+ ProductSolution . METRICS ,
274289 ] ,
275290 'python-falcon' : [
276291 ProductSolution . PERFORMANCE_MONITORING ,
277292 ProductSolution . PROFILING ,
278293 ProductSolution . LOGS ,
294+ ProductSolution . METRICS ,
279295 ] ,
280296 'python-fastapi' : [
281297 ProductSolution . PERFORMANCE_MONITORING ,
282298 ProductSolution . PROFILING ,
283299 ProductSolution . LOGS ,
300+ ProductSolution . METRICS ,
284301 ] ,
285302 'python-flask' : [
286303 ProductSolution . PERFORMANCE_MONITORING ,
287304 ProductSolution . PROFILING ,
288305 ProductSolution . LOGS ,
306+ ProductSolution . METRICS ,
289307 ] ,
290308 'python-gcpfunctions' : [
291309 ProductSolution . PERFORMANCE_MONITORING ,
292310 ProductSolution . PROFILING ,
293311 ProductSolution . LOGS ,
312+ ProductSolution . METRICS ,
294313 ] ,
295314 'python-quart' : [
296315 ProductSolution . PERFORMANCE_MONITORING ,
297316 ProductSolution . PROFILING ,
298317 ProductSolution . LOGS ,
318+ ProductSolution . METRICS ,
299319 ] ,
300320 'python-rq' : [
301321 ProductSolution . PERFORMANCE_MONITORING ,
302322 ProductSolution . PROFILING ,
303323 ProductSolution . LOGS ,
324+ ProductSolution . METRICS ,
304325 ] ,
305326 'python-serverless' : [
306327 ProductSolution . PERFORMANCE_MONITORING ,
307328 ProductSolution . PROFILING ,
308329 ProductSolution . LOGS ,
330+ ProductSolution . METRICS ,
309331 ] ,
310332 'python-tornado' : [
311333 ProductSolution . PERFORMANCE_MONITORING ,
312334 ProductSolution . PROFILING ,
313335 ProductSolution . LOGS ,
336+ ProductSolution . METRICS ,
314337 ] ,
315338 'python-starlette' : [
316339 ProductSolution . PERFORMANCE_MONITORING ,
317340 ProductSolution . PROFILING ,
318341 ProductSolution . LOGS ,
342+ ProductSolution . METRICS ,
319343 ] ,
320344 'python-wsgi' : [
321345 ProductSolution . PERFORMANCE_MONITORING ,
322346 ProductSolution . PROFILING ,
323347 ProductSolution . LOGS ,
348+ ProductSolution . METRICS ,
324349 ] ,
325350 ruby : [
326351 ProductSolution . PERFORMANCE_MONITORING ,
@@ -531,6 +556,18 @@ export function ProductSelection({
531556 checked = { urlProducts . includes ( ProductSolution . LOGS ) }
532557 />
533558 ) }
559+ { products . includes ( ProductSolution . METRICS ) && (
560+ < Product
561+ label = { t ( 'Metrics' ) }
562+ description = { t (
563+ 'Custom metrics for tracking application performance and usage, automatically trace-connected.'
564+ ) }
565+ docLink = "https://docs.sentry.io/product/explore/metrics/"
566+ onClick = { ( ) => handleClickProduct ( ProductSolution . METRICS ) }
567+ disabled = { disabledProducts [ ProductSolution . METRICS ] }
568+ checked = { urlProducts . includes ( ProductSolution . METRICS ) }
569+ />
570+ ) }
534571 { products . includes ( ProductSolution . SESSION_REPLAY ) && (
535572 < Product
536573 label = { t ( 'Session Replay' ) }
0 commit comments