Code Monkey home page Code Monkey logo

grafana-faro-browser-extension's Introduction

Grafana Faro Browser Extension

NOTE: This is a fork of the opentelemetry-contrib project

This browser extension allows you to inject OpenTelemetry instrumentation in any web page. It uses the Web SDK and can export data to Zipkin or an OpenTelemetry Collector.

Compatible with OpenTelemetry JS API and SDK 1.0+.

This animated image shows the process of activating the extension and seeing console output in the developer toolbar

Supported Environments

  • Google Chrome (with Manifest Version 3 support)
  • Chromium (with Manifest Version 2)
  • Firefox (unstable, with Manifest Version 2)

Installation

from Source

Run the following in your shell to download and build the extension from source:

git clone https://github.com/open-telemetry/opentelemetry-js-contrib.git
cd opentelemetry-js-contrib/packages/opentelemetry-browser-extension-autoinjection
npm install
npm run build

This will create a so-called unpacked extension into the build/ folder you now can load into your browser:

  • Open a new browser window and go to chrome://extensions
  • Turn on "Developer Mode"
  • Click on "Load unpacked" and select the build/mv3 (or build/mv2) folder, which contains the extension

If all goes well you should see the extension listed:

This image shows the extension being installed in chrome://extensions

Usage

When visiting a website, click on the extension icon, add an url filter that partially matches the current domain, e.g for https://opentelemetry.io/ you can set "opentel" as value:

This image shows an open extension popup with url filter set to "opentel"

Click on Save & Reload, check the developer toolbar to see how spans being are printed to the console and being sent to your collector:

This image shows spans being printed into the console of the developer toolbar for opentelemetry.io

Known Limitations

  1. The extension works with active tab permission, this means that every time you want to use it, you have to click the extension icon at least once for your tab.

  2. The use of the zone context manager and the used instrumentation libraries are fixed.

  3. Firefox support is unstable, sometimes it works, sometimes not. If you have experience building extensions for firefox, please reach out.

  4. The website you are targeting with this extension might have a Content Security Policy (CSP) in place and block the extension from injecting javascript or block the exporters from sending spans to a collector. To work around this limitation, you need another browser extension, that allows you to disable CSP for a website.

grafana-faro-browser-extension's People

Contributors

cedricziel avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.