resolveSpanModule.tsx 447 B

12345678910111213
  1. import type {ModuleName} from 'sentry/views/starfish/types';
  2. const OP_MAPPING = {
  3. 'db.redis': 'cache',
  4. 'db.sql.room': 'other',
  5. };
  6. /**
  7. * This is a frontend copy of `resolve_span_module` in Discover. `span.category` is a synthetic tag, computed from a combination of the span op and the span category.
  8. */
  9. export function resolveSpanModule(op?: string, category?: string): ModuleName {
  10. return OP_MAPPING[op ?? ''] ?? category ?? 'other';
  11. }