You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
Good morning all, I tried to use the 2 exposed hooks requestHook and startSpanHook from @opentelemetry/instrumentation-undici in order to access http.response.status_code from the span and copy its value into http.status_code for compatibility with our systems. From my understanding, this hooks run at a point in time before the monitored request actually concludes, so there is no way currently to achieve this.
Describe the solution you'd like to see
A hook that allows you to modify the span in terms of attributes after the request succeeded or failed.
Describe alternatives you've considered
Additional context
newUndiciInstrumentation({requestHook: (span,request)=>{span.setAttribute('http.host',span.attributes['server.address']+':'+span.attributes['server.port'])span.setAttribute('http.method',span.attributes['http.request.method'])span.setAttribute('http.target',span.attributes['url.path']+span.attributes['url.query'])span.setAttribute('http.url',span.attributes['url.full'])// http.response.status_code does not exist yetspan.setAttribute('http.status_code',parseInt(span.attributes['http.response.status_code']))},})
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
Good morning all, I tried to use the 2 exposed hooks
requestHook
andstartSpanHook
from @opentelemetry/instrumentation-undici in order to accesshttp.response.status_code
from the span and copy its value intohttp.status_code
for compatibility with our systems. From my understanding, this hooks run at a point in time before the monitored request actually concludes, so there is no way currently to achieve this.Describe the solution you'd like to see
A hook that allows you to modify the span in terms of attributes after the request succeeded or failed.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: