https://signoz.io logo
Title
m

Mohit Verma

12/27/2022, 3:18 PM
@channel Hello team, the below function is getting in red color while integrating with the react project registerInstrumentations({ instrumentations: [ new FetchInstrumentation({ propagateTraceHeaderCorsUrls: ["/.*/g"], clearTimingResources: true, applyCustomAttributesOnSpan: ( span: Span, request: Request | RequestInit, result: Response | FetchError ) => { const attributes = (span as any).attributes; if (attributes.component === "fetch") { span.updateName(
${attributes["http.method"]} ${attributes["http.url"]}
); } if (result instanceof Error) { span.setStatus({ code: SpanStatusCode.ERROR, message: result.message, }); span.recordException(result.stack || result.name); } }, }), ], });
p

Pranay

12/27/2022, 4:05 PM
you mean
registerInstrumentations
functions?
m

Mohit Verma

12/27/2022, 4:05 PM
yes
p

Pranay

12/27/2022, 4:06 PM
@Mohit Verma I think you are facing issues with not setting up the libraries correctly. Can you try instrumenting a simple app before getting more complex. May be just instrument a sample
create-react-app
m

Mohit Verma

12/27/2022, 4:07 PM
yes sampled the basic one now
and followed the docs
p

Pranay

12/27/2022, 4:07 PM
so, are things working for a basic app?
m

Mohit Verma

12/27/2022, 4:07 PM
no, the traces are getting failed
for teh given example in the doc
attached screenshot please have a look at it
p

Pranay

12/27/2022, 4:15 PM
oh, what are the error messages? Is SigNoz installed correctly? Also, can you run this troubleshooting binary where you are running your application and share what output you get? https://signoz.io/docs/install/troubleshooting/#using-troubleshooting-repository
m

Mohit Verma

12/27/2022, 4:16 PM
ok doing
please let me know if any support person can connect once