ep-react-logs v3.0.3
Epsagon Tracing for Web
This package provides tracing to react applications for the collection of distributed tracing and performance metrics in Epsagon.
Contents
Installation
To install Epsagon, simply run:
npm install ep-react-logs
Usage
Auto-tracing
To get started, install ep-react-logs
:
npm install ep-react-logs
ep-react-logs extends the base epsagon-web support to more frameworks.
Calling the SDK
To initialize the tracer, import the sdk and call the init function before the start of your project. In order to capture route changes, the history component needs to be passed into initialization.
import React, { Component } from 'react'
import { createBrowserHistory } from 'history';
import Epsagon from 'ep-react-logs'
const history = createBrowserHistory();
Epsagon.init({
app_name: 'app name',
token: 'epsagon token',
history: history
})
ReactDOM.render(
<Router history={history}>
<main>
<Route exact path='/' component={Home}/>
<Route exact path='/test' component={Content}/>
</main>
</Router>
,document.getElementById('root'));
Configuration
Advanced options can be configured as a parameter to the init() method.
Parameter | Type | Default | Description |
---|---|---|---|
token | String | - | Epsagon account token |
app_name | String | epsagon trace | Application name that will be set for traces |
history | Component | - | History component necessary to trace route changes |
metadataOnly | Boolean | true | Whether to send only the metadata (true ) or also the payloads (false ) |
Getting Help
If you have any issue around using the library or the product, please don't hesitate to:
- Use the documentation.
- Use the help widget inside the product.
- Open an issue in GitHub.
Opening Issues
If you encounter a bug with the Epsagon library for Node.js, we want to hear about it.
When opening a new issue, please provide as much information about the environment:
- Library version, Node.js runtime version, dependencies, etc.
- Snippet of the usage.
- A reproducible example can really help.
The GitHub issues are intended for bug reports and feature requests. For help and questions about Epsagon, use the help widget inside the product.
License
Provided under the MIT license. See LICENSE for details.
Copyright 2020, Epsagon
License
MIT © DanielGorlo
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago