npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jaeger-browser

v1.0.0

Published

A library for saving traces to jaeger

Downloads

22

Readme

jaeger-browser PyPI npm

This repo is to help you submit Jaeger traces from your browser. It is a workaround until a browser client is implemented.

It contains a Python package that runs a REST API which submits traces locally.

It also contains a TypeScript library that connects to this REST API.

If you want to use this alongside your Jupyter server, check out jupyter-jaeger. There is an example in that repo of starting a span in a kernel server side and then continueing it on the clien side.

In turn, we use that to instrument plotting interactive Vega visualizations with a Python backend.

Limitations

  • Doesn't implement full Jaeger API just a subset I needed. PRs welcome.
  • Hard coded to connect to a local Jaeger server. PRs welcome.
  • No sampling implemented, it will collect all traces. PRs welcome.

Usage

First get the REST server installed and started:

# install jaeger-all-in-one
conda -c conda-forge install jaeger

# Install the REST server
pip install jaeger_browser

# Start jaeger all in one
jaeger-all-in-one
# Start the REST server
env PORT=8080 jaeger-browser

Then install the client side library and connect to it:

yarn add jaeger-browser

import {Client} from 'jaeger-browser';


const client = new Client(new URL('http://localhost:8080/'))



async function doThings(originalExtractedScan: object): Promise<object> {
    // Start a span based on some text-map encoded data
    const span = await client.startSpanExtract({
        name: 'new-span',
        reference: originalExtractedScan,
        relationship: 'child_of'
    });
    // create a new span under it
    const newSpan = await client.startSpan({
        name: 'other-span',
        reference: span,
        relationship: 'child_of'
    })

    // Finish this inner span
    await client.finishSpan(newSpan);

    // return the span we started text-map encoded
    return await client.injectSpan(span);
}