Skip to content

Releases: middleware-labs/middleware-react-native

1.0.7

17 Dec 12:05
e607f9f
Compare
Choose a tag to compare
Release v1.0.7

1.0.6

11 Nov 06:37
0c4a4f7
Compare
Choose a tag to compare
Release v1.0.6

1.0.5

01 Oct 05:26
f6b21e2
Compare
Choose a tag to compare
Release v1.0.5

1.0.4

16 Sep 06:49
f9951ac
Compare
Choose a tag to compare
Release v1.0.4

1.0.3

29 Apr 09:58
69caac9
Compare
Choose a tag to compare
Release v1.0.3

1.0.2

08 Apr 08:08
b143a45
Compare
Choose a tag to compare
Release v1.0.2

1.0.1

08 Apr 05:38
cce495b
Compare
Choose a tag to compare
Release v1.0.1

1.0.0

04 Mar 08:01
f3baa6a
Compare
Choose a tag to compare
Release v1.0.0

0.2.0

26 Feb 14:29
929ddd4
Compare
Choose a tag to compare
Release v0.2.0

0.1.0

09 Feb 08:48
ed3b34d
Compare
Choose a tag to compare

Release Notes

Version 0.1.0

Features

  1. AutoInstrumentation

    • Added HTTP Monitoring.
    • Implemented JS Errors auto-instrumentation.
    • Added navigation tracking for react-navigation.
    • Introduced native crash error auto-instrumentation.
    • Added support for custom instrumentation using OpenTelemetry.
    • Implemented custom logging capabilities.
  2. RUM Session Tracking

    • Introduced RUM (Real User Monitoring) Session Tracking.

Documentation

  • Updated documentation for AutoInstrumentation, Custom Instrumentation, RUM Session Tracking, and more.

Compatibility & Requirements

  • Middleware React Native for Mobile now supports React Native version 0.68 and higher.
  • The library is compatible with the following frameworks and libraries:
    • Expo framework.
    • React Navigation 5 and 6.

Installation

To use the latest features and improvements, make sure to update the library:

yarn add @middleware.io/middleware-react-native@latest

Usage

import { MiddlewareWrapper, type ReactNativeConfiguration } from '@middleware.io/middleware-react-native';

const MiddlewareConfig: ReactNativeConfiguration = {
    serviceName: 'Mobile-SDK-ReactNative',
    projectName: '$Mobile-SDK-ReactNative',
    accountKey: '<middleware-account-key>',
    target: '<target-url>',
    deploymentEnvironment: 'PROD',
    globalAttributes: {
        name: '<your-name>',
    },
};

export default function App() { 
    return (
      <MiddlewareWrapper configuration={MiddlewareConfig}>
        {/* Application Components */}
      </MiddlewareWrapper>
    );
  }

Custom Logging

You can now add custom logs such as debug, error, warn, and info. These logs will be shown on the Middleware Logs Dashboard:

MiddlewareRum.debug("I am debug");
MiddlewareRum.error("I am error");
MiddlewareRum.info("I am info");
MiddlewareRum.warn("I am warn");

Setting Global Attributes

Global attributes can be set using the setGlobalAttributes function:

MiddlewareRum.setGlobalAttributes({
    "name": "Middleware",
    "app.version": "1.0.0",
    "custom_key": "some value"
});

Reporting Custom Errors

Handled errors, exceptions, and messages can be reported using the reportError function:

try {
    throw new Error("I am error")
} catch (err) {
    MiddlewareRum.reportError(err);
}

Updating Location Information

Latitude and longitude can now be set as global attributes for location information:

MiddlewareRum.updateLocation(latitude: number, longitude: number)