Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
instana-redux-middleware
Advanced tools
This middleware automatically reports navigation changes to Instana.
Add it in your applyMiddleware funciton.
import { createStore, applyMiddleware } from 'redux';
import instanaMiddleware from 'instana-redux-middleware';
import rootReducer from './reducers/index';
const store = createStore(
rootReducer,
applyMiddleware(instanaMiddleware)
);
After adding the middleware navigation events will be sent to Instana.
If action.meta.instana
is an array, those values will be sent as arguments to instana's API.
When using actions, the middleware attempts to time the actual time used in both loading and rendering. It will run calls to startSpaPageTransition
immediately but defer endSpaPageTransition
calls until after reducers have run and React has had a chance to render.
// this example uses redux-thunk
const myAction = args => dispatch => {
dispatch({
type: START_LOADING,
meta: {
instana: ['startSpaPageTransition']
}
});
loadStuff(args).then(result => {
dispatch({
type: FINISH_LOADING,
meta: {
instana: [
'endSpaPageTransition',
{status: 'completed', url: window.location.href}
]
}
payload: result
});
}).catch(error => {
dispatch({
type: LOAD_ERROR,
meta: {
instana: [
'endSpaPageTransition',
{
status: 'error',
url: window.location.href
explanation: error.description
}
]
},
payload: error
});
})
}
of coures, you can still use the ienum
global.
The navigation component they provided only reports page transition time if all the data required for rendering is already in the store. If you're loading data and showing a spinner, it measures the amount of time it takes to show the spinner.
FAQs
Instana tracking for redux
The npm package instana-redux-middleware receives a total of 1 weekly downloads. As such, instana-redux-middleware popularity was classified as not popular.
We found that instana-redux-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
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.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.