
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@grafana/agent-web
Advanced tools
Grafana JavaScript Agent instrumentations, metas, transports for web.
DEPRECATED Project has been moved to @grafana/faro-web-sdk
Instrumentations, metas and transports for web applications.
Warning: currently pre-release and subject to frequent breaking changes. Use at your own risk.
console
global object. Only warn
, info
and error
levels by default.console
Basic set up, will automatically report errors and web vitals:
import { initializeGrafanaAgent } from '@grafana/agent-web';
const agent = initializeGrafanaAgent({
url: 'https://agent.myapp/collect',
apiKey: 'secret',
app: {
name: 'frontend',
version: '1.0.0',
},
});
// send a log message
agent.api.pushLog(['hello world']);
// will be captured
throw new Error('oh no');
// push error manually
agent.api.pushError(new Error('oh no'));
With OTel tracing and browser console capture:
import { TracingInstrumentation } from '@grafana/agent-tracing-web';
import { ConsoleInstrumentation, initializeGrafanaAgent, getWebInstrumentations } from '@grafana/agent-web';
const agent = initializeGrafanaAgent({
url: 'https://agent.myapp/collect',
apiKey: 'secret',
instrumentations: [...getWebInstrumentations({ captureConsole: true }), new TracingInstrumentation()],
app: {
name: 'frontend',
version: '1.0.0',
},
});
// start a span
agent.api
.getOTEL()
?.trace.getTracer('frontend')
.startActiveSpan('hello world', (span) => {
// send a log message
agent.api.pushLog(['hello world']);
span.end();
});
// will be captured
throw new Error('oh no');
FAQs
Grafana JavaScript Agent instrumentations, metas, transports for web.
The npm package @grafana/agent-web receives a total of 125 weekly downloads. As such, @grafana/agent-web popularity was classified as not popular.
We found that @grafana/agent-web 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.