跳转到主要内容

此版本为使用Jaeger分布式追踪工具与Jupyter相结合提供了支持。

项目描述

jupyter-jaeger
PyPI npm Github Actions Status

此版本为使用Jaeger分布式追踪工具与Jupyter相结合提供了支持。它简化了在内核启动并在mime渲染器中继续的某些进程的跟踪使用案例。

我们正在使用它来分析ibis-vega-transform,它在内核和前端之间来回移动,以使用Altair交互式渲染图表。

安装此版本将在启动Jupyter时启动两个Jupyter服务器扩展,即jaeger-all-in-onejaeger-browser进程。因此,要使用它,您必须首先在内核和/或前端中设置代码以记录跟踪。

它还提供一个NPM TypeScript插件,您可以使用它从JupyterLab扩展中访问客户端。

要求

  • JupyterLab >= 3.0

用法

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

# Install this package
pip install jupyter-jaeger

# Optional, to see Jaeger icon in JupyterLab launcherr
jupyter labextension install jupyterlab-server-proxy-saulshanabrook

# Launch a Jupyter server
jupyter lab

# Open the jaeger UI
open http://localhost:8080/jaeger

安装

pip install jupyter-jaeger

贡献

开发安装

注意:您将需要NodeJS来构建扩展包。

jlpm命令是JupyterLab中安装的yarn的固定版本。您可以使用yarnnpm来代替下面的jlpm

# Clone the repo to your local environment
# Change directory to the jupyter-jaeger directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

您可以在不同的终端中同时监视源目录并运行JupyterLab,以便监视扩展的源代码变化并自动重新构建扩展。

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

当监视命令运行时,每次保存的更改都将立即在本地构建并可在运行的JupyterLab中使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟以便扩展重新构建)。

默认情况下,jlpm run build命令会为此扩展生成源映射,以便更容易使用浏览器开发工具进行调试。要同时为JupyterLab核心扩展生成源映射,可以运行以下命令

jupyter lab build --minimize=False

卸载

pip uninstall jupyter-jaeger

示例

此存储库还包括从内核启动跟踪并在mimeredenr jupyterlab扩展中继续跟踪的示例,位于./example。您可以通过以下方式尝试此示例

  1. 启动此存储库的Binder
  2. 创建启动器并启动Jaeger UI
  3. 运行笔记本。
  4. 检查由笔记本执行创建的跟踪。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

jupyter_jaeger-1.0.4.tar.gz (61.1 kB 查看散列值)

上传时间

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面