Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Continuous runtime observablity SDKs to monitor WebAssembly code.

License

NotificationsYou must be signed in to change notification settings

dylibso/observe-sdk

Repository files navigation

Checkout the official overview and documentation here:
https://dev.dylibso.com/docs/observe/overview


WebAssembly Observability - Observe SDK by Dylibso

CI

WebAssembly Observability Toolkit

Observe provides observability SDKs for WebAssembly, enabling continuousmonitoring of WebAssembly code as it executes within a runtime.

This repository contains the Runtime SDKs and the Adapters necessary to havelive profiling & tracing, and over time will include a complete observabilitystack for WebAssembly.

SDKs and Official Adapters

The table below tracks the supported Runtime SDKs and Adapters for the hostapplication language that is running a WebAssembly module. The Runtime SDKs linkto a particular WebAssembly runtime, and the Adapter formats the raw telemetrydata to be emitted to a particular output/sink. If you need support for anotherAdapter, please open an issue here or emailsupport@dylibso.com.

Note: Any supported Runtime SDK can be paired with any Adapter from the samelanguage.

LanguageRuntime SDKsAdapters
RustWasmtimeDatadog,Honeycomb,Lightstep,OpenTelemetry (stdout),Zipkin
GoWazeroDatadog,Honeycomb,Lightstep,OpenTelemetry
JavaScriptNative (Browser, Node, Deno, Bun)Datadog,Honeycomb,Lightstep

More languages, SDKs, and adapters are coming soon! Reach out to help usprioritize these additional components(support@dylibso.com).

Overview

There are two components to this process:

  1. Including a runtime/host SDK
  2. Instrumenting the Wasm code

Including a runtime SDK and an Adapter

First you should choose a Host SDK corresponding to your host application'slanguage and Wasm runtime. The Host SDK captures raw observability events fromthe running Wasm module and sends them to an adapter. You must choose an adapterbased on where you want your data to go. At the moment, we support a few systemsout of the box. In the future we will support a lot more and will have morecommunity driven options. If you don't see support for your favoriteobservability tools feel free to reach out to us at(support@dylibso.com).

Each language includes some examples demonstrating use with different adapters.You can view these examples here:

Instrumenting Wasm Modules

There are two ways to instrument the Wasm modules: automatically and manually.

Automatically instrument your Wasm

The easiest way to instrument your code right now is to use our instrumentingcompiler. This is a tool that can look at your Wasm and recompile it withinstrumentation built in. The compiler is available as a service. You cangenerate a key to usethis service for free here.

To use the key:

curl --fail -F wasm=@code.wasm https://compiler-preview.dylibso.com/instrument -X POST -H 'Authorization: Bearer <your-api-key>' > code.instr.wasm

Note: The Instrumentation Servicehttps://compiler-preview.dylibso.com/instrument only re-compiles a .wasmbinary and returns the updated code. We do not log or store any informationabout your submitted code. The compilation also adds no telemetry or otherinformation besides the strictly-necessary auto-instrumentation to the .wasminstructions. If you would prefer to run this service yourself, please contactsupport@dylibso.com to discuss the availableoptions.

Manually instrument your Wasm

The Host SDKs expose a series of host functions that make up ourObserve API.You can code directly against this if you wish. Because we are still changingand experimenting with this API, we have not built much tooling or support forthis yet. Seethe Observe API README to learn more about the APIand the language bindings we provide.

Expect to see some documentation and alpha tools by September 2023. We will bebuilding out a lot of the language specific layers, but we hope the communitycan help by building tools on top of it and integrating with existing librarieslike OpenTelemetry.

Development

Building

To build the current wasmtime-based SDK, run:

$ cargo build

Testing

$ make test

Compile the Test Modules

These are already checked in, but you can compile and instrument them with.Please check in any changes in thetest/ directory.

make instrument WASM_INSTR_API_KEY=<your-api-key>

Running Zipkin

One of the test adapters will output to Zipkin, defaulting to one running onlocalhost.

docker run -d -p 9411:9411 openzipkin/zipkin

About

Continuous runtime observablity SDKs to monitor WebAssembly code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp