File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
packages/node/src/integrations/tracing/hono Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 11import type { Span } from '@opentelemetry/api' ;
22import { context , SpanStatusCode , trace } from '@opentelemetry/api' ;
33import { InstrumentationBase , InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation' ;
4+ import { isThenable } from '@sentry/core' ;
45import { AttributeNames , HonoTypes } from './constants' ;
56import type {
67 Context ,
@@ -204,12 +205,7 @@ export class HonoInstrumentation extends InstrumentationBase {
204205 try {
205206 const result = execute ( ) ;
206207
207- if (
208- result &&
209- typeof result === 'object' &&
210- typeof Object . getOwnPropertyDescriptor ( result , 'then' ) ?. value === 'function'
211- ) {
212- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
208+ if ( isThenable ( result ) ) {
213209 result . then (
214210 ( ) => onSuccess ( ) ,
215211 ( error : unknown ) => onFailure ( error ) ,
You can’t perform that action at this time.
0 commit comments