Skip to content

React HOC that leverage the functionalities from splunk-events to ease logging to Splunk from React components.

Notifications You must be signed in to change notification settings

ghas-results/splunk-react

 
 

Repository files navigation

splunk-react on npm

VTEX Admin

splunk-react

Reach us at #frontend-monitoring channel on Slack


SplunkMonitoring instance

import { SplunkMonitoring } from "splunk-react";

const monitoring = new SplunkMonitoring({
  token: "12345",
  endpoint: "http://my-splunk-endpoint:9999",
  // Only set `vtexIO` info in case your app
  // is running on top of VTEX IO
  vtexIO: {
    runtimeInfo: {
      account: global.__RUNTIME__.account,
      workspace: global.__RUNTIME__.workspace,
      renderMajor: global.__RUNTIME__.renderMajor,
      production: global.__RUNTIME__.production,
    },
    appInfo: {
      appId: process.env.VTEX_APP_ID as string,
      appVersion: process.env.VTEX_APP_VERSION as string,
    },
  },
});

High order methods available in this application

withErrorBoundary monitoring

import { SplunkMonitoring, withErrorBoundary } from "splunk-react";

const monitoring = new SplunkMonitoring({
  // Your config here
});

const App = () => <div>Hello world</div>;

const AppWithErrorBoundaryMonitoring = withErrorBoundary(monitoring)(App);

About

React HOC that leverage the functionalities from splunk-events to ease logging to Splunk from React components.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 86.3%
  • JavaScript 12.0%
  • HTML 1.7%