@@ -185,7 +185,7 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
185185 } ) ;
186186
187187 test . describe ( 'trace propagation through internal .request() calls' , ( ) => {
188- test ( 'single internal fetch produces a hono. request child span' , async ( { baseURL } ) => {
188+ test ( 'single internal fetch produces an internal- request child span' , async ( { baseURL } ) => {
189189 const transactionPromise = waitForTransaction ( APP_NAME , event => {
190190 return (
191191 event . contexts ?. trace ?. op === 'http.server' && event . transaction === `GET ${ STOREFRONT } /product/:productId`
@@ -198,20 +198,22 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
198198 const traceId = transaction . contexts ?. trace ?. trace_id ;
199199 const spans = transaction . spans || [ ] ;
200200
201- const internalRequestSpans = spans . filter ( ( s : { op ?: string } ) => s . op === 'hono.request' ) ;
201+ const internalRequestSpans = spans . filter (
202+ ( s : { origin ?: string } ) => s . origin === 'auto.http.hono.internal_request' ,
203+ ) ;
202204
203205 expect ( internalRequestSpans ) . toHaveLength ( 1 ) ;
204206 expect ( internalRequestSpans [ 0 ] ) . toEqual (
205207 expect . objectContaining ( {
206- op : 'hono.request ' ,
208+ op : 'http.server ' ,
207209 origin : 'auto.http.hono.internal_request' ,
208210 trace_id : traceId ,
209211 } ) ,
210212 ) ;
211213 expect ( internalRequestSpans [ 0 ] ?. description ) . toContain ( 'GET /item/self-watering-plant' ) ;
212214 } ) ;
213215
214- test ( 'parallel internal fetches produce two sibling hono. request spans' , async ( { baseURL } ) => {
216+ test ( 'parallel internal fetches produce two sibling internal- request spans' , async ( { baseURL } ) => {
215217 const transactionPromise = waitForTransaction ( APP_NAME , event => {
216218 return (
217219 event . contexts ?. trace ?. op === 'http.server' &&
@@ -225,7 +227,9 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
225227 const traceId = transaction . contexts ?. trace ?. trace_id ;
226228 const spans = transaction . spans || [ ] ;
227229
228- const internalRequestSpans = spans . filter ( ( s : { op ?: string } ) => s . op === 'hono.request' ) ;
230+ const internalRequestSpans = spans . filter (
231+ ( s : { origin ?: string } ) => s . origin === 'auto.http.hono.internal_request' ,
232+ ) ;
229233
230234 expect ( internalRequestSpans ) . toHaveLength ( 2 ) ;
231235
@@ -238,7 +242,7 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
238242 expect ( internalRequestSpans [ 1 ] ?. origin ) . toBe ( 'auto.http.hono.internal_request' ) ;
239243 } ) ;
240244
241- test ( 'sequential chained fetches produce two ordered hono. request spans' , async ( { baseURL } ) => {
245+ test ( 'sequential chained fetches produce two ordered internal- request spans' , async ( { baseURL } ) => {
242246 const transactionPromise = waitForTransaction ( APP_NAME , event => {
243247 return (
244248 event . contexts ?. trace ?. op === 'http.server' &&
@@ -253,7 +257,7 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
253257 const spans = transaction . spans || [ ] ;
254258
255259 const internalRequestSpans = spans
256- . filter ( ( s : { op ?: string } ) => s . op === 'hono.request ' )
260+ . filter ( ( s : { origin ?: string } ) => s . origin === 'auto.http. hono.internal_request ' )
257261 . sort (
258262 ( a : { start_timestamp ?: number } , b : { start_timestamp ?: number } ) =>
259263 ( a . start_timestamp ?? 0 ) - ( b . start_timestamp ?? 0 ) ,
@@ -270,7 +274,7 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
270274 expect ( internalRequestSpans [ 1 ] ?. trace_id ) . toBe ( traceId ) ;
271275 } ) ;
272276
273- test ( 'hono. request span has no error status for internal 4xx HTTPException' , async ( { baseURL } ) => {
277+ test ( 'internal- request span has no error status for internal 4xx HTTPException' , async ( { baseURL } ) => {
274278 const transactionPromise = waitForTransaction ( APP_NAME , event => {
275279 return (
276280 event . contexts ?. trace ?. op === 'http.server' &&
@@ -283,7 +287,9 @@ test.describe('multi-fetch: internal .request() calls between sub-apps', () => {
283287 const transaction = await transactionPromise ;
284288 const spans = transaction . spans || [ ] ;
285289
286- const internalRequestSpans = spans . filter ( ( s : { op ?: string } ) => s . op === 'hono.request' ) ;
290+ const internalRequestSpans = spans . filter (
291+ ( s : { origin ?: string } ) => s . origin === 'auto.http.hono.internal_request' ,
292+ ) ;
287293
288294 expect ( internalRequestSpans ) . toHaveLength ( 1 ) ;
289295 expect ( internalRequestSpans [ 0 ] ?. status ) . not . toBe ( 'internal_error' ) ;
0 commit comments