Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@grafana/agent-integration-react
Advanced tools
Grafana JavaScript Agent package that enables easier integration in projects built with React.
DEPRECATED Project has been moved to @grafana/faro-react
Grafana JavaScript Agent package that enables easier integration in projects built with React.
Warning: currently pre-release and subject to frequent breaking changes. Use at your own risk.
Out of the box, the package provides you the following features:
import { createRoutesFromChildren, matchRoutes, Routes, useLocation, useNavigationType } from 'react-router-dom';
import {
getWebInstrumentations,
initializeGrafanaAgent,
ReactIntegration,
ReactRouterVersion,
} from '@grafana/agent-integration-react';
import { TracingInstrumentation } from '@grafana/agent-tracing-web';
initializeGrafanaAgent({
// ...
instrumentations: [
// Load the default Web instrumentations
...getWebInstrumentations(),
// Tracing Instrumentation is needed if you want to use the React Profiler
new TracingInstrumentation(),
new ReactIntegration({
// Only needed if you want to use the React Router instrumentation
router: {
version: ReactRouterVersion.V6,
dependencies: {
createRoutesFromChildren,
matchRoutes,
Routes,
useLocation,
useNavigationType,
},
},
// Or if you use react-router v4/v5
router2: {
version: ReactRouterVersion.V5, // or ReactRouterVersion.V4,
dependencies: {
history, // the history object used by react-router
Route, // Route component imported from react-router package
},
},
}),
],
});
import { GrafanaAgentErrorBoundary } from '@grafana/agent-integration-react';
// during render
<GrafanaAgentErrorBoundary>
<App />
</GrafanaAgentErrorBoundary>;
or
import { withErrorBoundary } from '@grafana/agent-integration-react';
export default withErrorBoundary(App);
import { GrafanaAgentRoutes } from '@grafana/agent-integration-react';
// during render
<GrafanaAgentRoutes>
<Route path="/" element={<Home />} />
{/* ... */}
</GrafanaAgentRoutes>;
import { GrafanaAgentRoute } from '@grafana/agent-integration-react';
// during render
<Switch>
<GrafanaAgentRoute path="/">
<Home />
</GrafanaAgentRoute>
{/* ... */}
</Switch>;
import { withGrafanaAgentProfiler } from '@grafana/agent-integration-react';
export default withGrafanaAgentProfiler(App);
FAQs
Grafana JavaScript Agent package that enables easier integration in projects built with React.
The npm package @grafana/agent-integration-react receives a total of 2 weekly downloads. As such, @grafana/agent-integration-react popularity was classified as not popular.
We found that @grafana/agent-integration-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.