Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@grafana/faro-web-sdk
Advanced tools
Faro is a SDK that can instrument frontend JavaScript applications to collect telemetry and forward it to the Grafana Agent (with app agent receiver integration enabled).
Grafana Agent can then send this data to either Loki or Tempo.
Warning: currently pre-release and subject to frequent breaking changes. Use at your own risk.
See quick start for web applications.
Alternatively, you can use the CDN version of the library. See use cdn library for details on how to do so.
console
global object. Only warn
, info
and error
levels by default.default
value for the view metaconsole
Basic set up, will automatically report errors and web vitals:
import { initializeFaro } from '@grafana/faro-web-sdk';
const faro = initializeFaro({
url: 'https://agent.myapp/collect',
apiKey: 'secret',
app: {
name: 'frontend',
version: '1.0.0',
},
});
// send a log message
faro.api.pushLog(['hello world']);
// will be captured
throw new Error('oh no');
// push error manually
faro.api.pushError(new Error('oh no'));
With OTel tracing and browser console capture:
import { ConsoleInstrumentation, getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk';
import { TracingInstrumentation } from '@grafana/faro-web-tracing';
const faro = initializeFaro({
url: 'https://agent.myapp/collect',
apiKey: 'secret',
instrumentations: [...getWebInstrumentations({ captureConsole: true }), new TracingInstrumentation()],
app: {
name: 'frontend',
version: '1.0.0',
},
});
// start a span
faro.api
.getOTEL()
?.trace.getTracer('frontend')
.startActiveSpan('hello world', (span) => {
// send a log message
faro.api.pushLog(['hello world']);
span.end();
});
// will be captured
throw new Error('oh no');
1.4.2
@grafana/faro-web-sdk
): Session started timestamp was reset on page-loads (#513).@grafana/faro-web-tracing
): faro.trace.*
attached spanContext from active span instead of
the respective child span (#510).@grafana/faro-web-sdk
): Faro APIs now support adding a custom traceId and spanId to
signals (#510).FAQs
Faro instrumentations, metas, transports for web.
The npm package @grafana/faro-web-sdk receives a total of 97,480 weekly downloads. As such, @grafana/faro-web-sdk popularity was classified as popular.
We found that @grafana/faro-web-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 22 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.