3.0.3 • Published 3 years ago

ep-react-logs v3.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Epsagon Tracing for Web

Trace

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.

ParameterTypeDefaultDescription
tokenString-Epsagon account token
app_nameStringepsagon traceApplication name that will be set for traces
historyComponent-History component necessary to trace route changes
metadataOnlyBooleantrueWhether 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.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

1.2.8

3 years ago

1.3.0

3 years ago

1.2.9

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago