import React , { ReactNode } from 'react' ; import { SPAN_ID } from '../../../../../common/elasticsearch_fieldnames' ; import { Span } from '../../../../../typings/es_schemas/ui/span' ; import { DiscoverLink } from './discover_link' ; function getDiscoverQuery ( span ) { const query = `${ SPAN_ID }:"${ span . span . id }"` ; return { _a : { interval : 'auto' , query : { language : 'kuery' , query , } , } , } ; } export function DiscoverSpanLink ( { span , children , } ) { return < DiscoverLink query = { getDiscoverQuery ( span ) } children = { children } / > ; }