
Research
Security News
Malicious npm Packages Target BSC and Ethereum to Drain Crypto Wallets
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
@hyperdx/otel-react-native
Advanced tools
HyperDX distribution of Open Telemetry for react native.
:construction: This project is currently in BETA. By using this package in production-grade environments, users accept all limitations of beta maturity software, including the possibility of breaking changes introduced in any release.
This library lets you autoinstrument React Native applications. Minimum supported React Native version is 0.68. To instrument applications running on React Native versions lower than 0.68, see Instrument lower versions.
To instrument your React Native application, follow these steps.
# npm
npm install @hyperdx/otel-react-native
# yarn
yarn add @hyperdx/otel-react-native
import { HyperDXRum } from '@hyperdx/otel-react-native';
HyperDXRum.init({
service: 'my-rn-app',
apiKey: '<YOUR_API_KEY_HERE>',
tracePropagationTargets: [/api.myapp.domain/i], // Set to link traces from frontend to backend requests
networkHeadersCapture: false,
networkBodyCapture: false,
});
apiKey
: Your HyperDX Ingestion API key. You can find it here.service
: Name of your application. Set it to distinguish your app from others in HyperDX.tracePropagationTargets
: A list of regular expressions that match the URLs of your backend services. Set it to link traces from frontend to backend requests.networkHeadersCapture
: networkHeadersCapture is a flag that allows the option to capture request and response headers information, with the default flag being false.networkBodyCapture
: networkBodyCapture is a flag that allows the option to capture request and response body information, with the default flag being false.Attaching user information will allow you to search/filter sessions and events in HyperDX. This can be called at any point during the client session. The current client session and all events sent after the call will be associated with the user information.
userEmail
, userName
, and teamName
will populate the sessions UI with the corresponding values, but can be omitted. Any other additional values can be specified and used to search for events.
HyperDXRum.setGlobalAttributes({
userEmail: user.email,
userName: user.name,
teamName: user.team.name,
// Other custom properties...
});
To instrument applications running on React Native versions lower than 0.68, edit your metro.config.js
file to force metro to use browser specific packages. For example:
const defaultResolver = require('metro-resolver');
module.exports = {
resolver: {
resolveRequest: (context, realModuleName, platform, moduleName) => {
const resolved = defaultResolver.resolve(
{
...context,
resolveRequest: null,
},
moduleName,
platform
);
if (
resolved.type === 'sourceFile' &&
resolved.filePath.includes('@opentelemetry')
) {
resolved.filePath = resolved.filePath.replace(
'platform\\node',
'platform\\browser'
);
return resolved;
}
return resolved;
},
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
react-navigation version 5 and 6 are supported.
The following example shows how to instrument navigation:
import { startNavigationTracking } from '@hyperdx/otel-react-native';
export default function App() {
const navigationRef = useNavigationContainerRef();
return (
<NavigationContainer
ref={navigationRef}
onReady={() => {
startNavigationTracking(navigationRef);
}}
>
<Stack.Navigator>...</Stack.Navigator>
</NavigationContainer>
);
}
The library exports data using the Zipkin exporter. Adding your own exporters and processors isn't supported yet.
Supported features:
For more information about how this library uses Opentelemetry and about future plans check CONTRIBUTING.md.
https://github.com/signalfx/splunk-otel-react-native#license
0.3.0
FAQs
HyperDX distribution of Open Telemetry for react native.
The npm package @hyperdx/otel-react-native receives a total of 17 weekly downloads. As such, @hyperdx/otel-react-native popularity was classified as not popular.
We found that @hyperdx/otel-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Security News
TC39 advances 9 JavaScript proposals, including Array.fromAsync, Error.isError, and Explicit Resource Management, which are now headed into the ECMAScript spec.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.