Expand description

§Quickstart

Observation Tools helps you quickly inspect complex data without needing to build your own visualization tools.

Integrating Observation Tools into your program takes about 5 minutes. You need to:

  1. Create a project
  2. Install a client library
  3. Export your data
  4. Visualize your data

§Organizing your data

We use four different concepts to organize your data:

  • Artifacts are individual pieces of data, e.g. an image
  • Artifact groups help organize artifacts and can define how artifacts can be visualized together.
  • Runs are the top level artifact groups. The normally correspond to one program execution or http request.
  • Projects allow you to define common settings used across runs.

§Create a project

All data uploaded to Observation Tools is associated with a project. Projects have a unique ID that you’ll use to initialize the client in the next step.

To create a project, do the following:

  1. Sign in to the dashboard
  2. Click “Create project”

You should see your project’s ID on the following screen. You can also find it on the “Settings” page. Project IDs are not sensitive, so you can embed them in your source code.

§Install a client library

We have client libraries for a few different languages:

LanguagePackageVersion
Rustobservation-toolsCrates.io
JavaScript experimental@observation-tools/clientnpm(scoped)

Don’t see the language you’re looking for? Let us know! File a feature request or email us.

Install the Rust client with the following command:

cargo add observation-tools

§Export your data

To start exporting data from your program, we need to set up a client for your project and create a run. After that, we can create groups to organize artifacts during different parts of our program and export artifacts:

use observation_tools_client::artifacts::Point2Builder;
use observation_tools_client::artifacts::Segment2Builder;
use observation_tools_client::Client;
use observation_tools_client::ClientOptions;
use observation_tools_client::TokenGenerator;

let client = Client::new(
    std::env::var("OBSERVATION_TOOLS_PROJECT_ID")?,
    ClientOptions::default(),
)?;

/// The name of the run will show up in the UI. You can optionally add key-value metadata to
/// all objects, see [`builders::UserMetadataBuilder::add_metadata`].
let run_uploader = client.create_run("getting-started-example")?;
/// ArtifactGroups are represented as "uploaders"
let uploader_2d = run_uploader.child_uploader_2d("shapes")?;
uploader_2d.create_object2(
    "segment2",
    Segment2Builder::new(Point2Builder::new(-1.0, 1.0), Point2Builder::new(1.0, -1.0)),
)?;

println!("See the output at: {}", run_uploader.viewer_url());

For more information on the types of data you can upload, see the documentation for the artifacts module.

§Visualize your data

To view the exported data, you can either find the run on the dashboard or generate a direct url with groups::RunUploader::viewer_url.

§Examples

For more examples, check out the examples directory in the repository.

Modules§

  • Artifacts have a few major components:
  • Artifact groups help organize artifacts and can define how artifacts are visualized together. Artifact groups can be generic, meaning they can hold any type of artifact, or they can be specialized to hold only certain types of artifacts, e.g. 2D objects only. Artifacts are added to groups using an artifact uploader. Specialized artifact groups have specialized uploaders, e.g. ArtifactUploader2d for 2D objects.

Macros§

Structs§

Enums§

Traits§

Functions§