1.7.2 • Published 3 days ago

@grafana/faro-instrumentation-fetch v1.7.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 days ago

@grafana/instrumentation-fetch

Faro instrumentation of the JavaScript Fetch API.

❗️Warning: this package is experimental and may be subject to frequent and breaking changes. Use at your own risk.❗️

Installation and Usage

❗️Warning: This package is not interoperable with @opentelemetry/instrumentation-fetch. Use one or the other❗️

Add the instrumentation as outlined below. The instrumentation send the following events alongside respective request/response data like HTTP headers and other response properties like status codes the requests url and more.

Event names are:

  • faro.fetch.resolved for resolved requests.
  • faro.fetch.rejected for rejected requests.
// index.ts
import { FetchInstrumentation } from '@grafana/faro-instrumentation-fetch';
import { getWebInstrumentations, initializeFaro } from '@grafana/faro-react';

initializeFaro({
  // ...
  instrumentations: [
    // Load the default Web instrumentations
    ...getWebInstrumentations(),
    // Add fetch instrumentation
    new FetchInstrumentation(),
  ],
});


// myApi.ts
fetch(...) // Use fetch as normal - telemetry data is sent to your Faro endpoint

Backend correlation

In order to prepare backend correlation, this instrumentation adds the following headers to each request that server-side instrumentation can use as context:

  • x-faro-session - the client-side session id

Planned Development

  • Additional functionality to correlate frontend requests with backend actions
  • Event attributes with end-to-end timing details
1.7.2

3 days ago

1.7.1

3 days ago

1.7.0

10 days ago

1.6.0

22 days ago

1.5.1

1 month ago

1.5.0

2 months ago

1.4.2

2 months ago

1.4.1

2 months ago

1.4.0

2 months ago

1.3.9

3 months ago

1.3.8

3 months ago

1.3.7

3 months ago

1.3.6

4 months ago

1.3.5

5 months ago

1.3.4

5 months ago

1.3.2

5 months ago

1.3.1

5 months ago

1.3.0

5 months ago

1.2.0

8 months ago

1.2.8

6 months ago

1.2.7

6 months ago

1.2.6

6 months ago

1.2.5

6 months ago

1.2.4

6 months ago

1.2.3

6 months ago

1.1.4

8 months ago

1.2.2

7 months ago

1.1.3

9 months ago

1.2.1

8 months ago

1.1.2

10 months ago

1.2.9

5 months ago

1.1.1

11 months ago

1.1.0

11 months ago