opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

Support for react-native environment.

Open aravindpl opened this issue 4 years ago • 22 comments

Hi,

Is there plan to support react-native environment also part of opentelemetry-js ?

aravindpl avatar May 21 '20 05:05 aravindpl

Has anyone made an attempt at hooking in Otel or have a simple approach or workaround?

longility avatar May 08 '22 04:05 longility

same question as @longility - is there anyway to use in react native? Or are there plans to create a react native sdk?

PritamSangani avatar Jun 16 '22 08:06 PritamSangani

I have the same problem, I try test use open telemetry web, but the problem is because need specific customization in a package web in the webpack. React Native don't is node and web. Node uses native libraries and web use the DOM and native variables =/

kirmayrcosta avatar Jul 02 '22 02:07 kirmayrcosta

Short answer here is no. Longer answer is that someone actually has been working on trying to get OTel working in react native but they're actually using OTel java SDK and OTel JS instrumentations because react native doesn't run in a node environment. I don't have details but I would not expect it to be a simple task.

dyladan avatar Jul 06 '22 14:07 dyladan

Closing this as wontfix since we don't have sufficient bandwidth

dyladan avatar Jul 06 '22 14:07 dyladan

Actually i'm going to reopen this for now and talk about it at the SIG today to make sure, but I do expect this to be closed most likely.

dyladan avatar Jul 06 '22 14:07 dyladan

Discussed it during a SIG(2022-07-06).

@MSNev mentioned a related implementation: https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-react-native

Decided to agree on a blanket rule or at least some guidelines on when we close issues we don't have bandwidth for.

rauno56 avatar Jul 06 '22 16:07 rauno56

Would be nice to have react native support. We are looking at instrumenting our web and mobile, and it's looking like we can't use opentelemetry because of lack of mobile support.

jimethn avatar Sep 02 '22 13:09 jimethn

You should be able to use OTel java for your mobile application, you will just not be able to auto-instrument the UI layer

dyladan avatar Sep 02 '22 13:09 dyladan

@dyladan The UI is the main problem, but thanks for the pointer

jimethn avatar Sep 02 '22 14:09 jimethn

+1 for having it supported or at least having some guidance how to integrate it (at least partially)

Also, I discovered that DataDog support react native: https://github.com/DataDog/dd-sdk-reactnative

Could it be helpful in some way?

hwo411 avatar Sep 27 '22 05:09 hwo411

Posthog also does auto-instrument for react-native which might be helpful when implementing it for otel. https://github.com/PostHog/posthog-js-lite/tree/master/posthog-react-native

nikordaris avatar Oct 06 '22 11:10 nikordaris

is there a plan to work on adding support for react-native in otel-js ?

vvydier avatar Oct 26 '22 15:10 vvydier

We have been working on RN support. It uses subset of otel-js and otel java/swift. It is in early alpha and it will take couple of weeks before I am able to make it public. The plan is to upstream it at some point. I'll post it here when it is public.

mhennoch avatar Oct 27 '22 16:10 mhennoch

Any more updates on this?

shawna-donnelly avatar Jan 09 '23 14:01 shawna-donnelly

It is public now but still in very early stages: https://github.com/signalfx/splunk-otel-react-native. No expo support yet and only sends zipkin. If you have any questions/suggestions don't hesitate to message me on CNCF slack or open an issue.

mhennoch avatar Jan 09 '23 21:01 mhennoch

Thanks @mhennoch!

shawna-donnelly avatar Jan 16 '23 00:01 shawna-donnelly

Reading the above comments I think currently there is no way we can use opentelemetry for react-native is there any other way to use opentelemetry or similar software for react-native

AdityaSakhadeo avatar Jan 29 '24 10:01 AdityaSakhadeo

@AdityaSakhadeo sentry has tracing that works well on react-native https://docs.sentry.io/platforms/react-native/performance/

evelant avatar Jan 29 '24 13:01 evelant

@AdityaSakhadeo sentry has tracing that works well on react-native https://docs.sentry.io/platforms/react-native/performance/

Thank you so much @evelant

AdityaSakhadeo avatar Feb 05 '24 04:02 AdityaSakhadeo

It should be possible to use otlp http exporters exporter-logs-otlp-http exporter-trace-otlp-http opentelemetry-exporter-metrics-otlp-http for react-native.

yuriy-yarosh avatar Feb 13 '24 22:02 yuriy-yarosh

@mhennoch is RN support free to use? or it has a pricing plan?

Himanshu0301 avatar Feb 28 '24 06:02 Himanshu0301