> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Jaeger

> Virtualize Jaeger services, operations and traces as read-only JSON files.

![](https://mintcdn.com/struktoai/F9Lv_nTaj6By6crk/images/python-logo.svg?fit=max\&auto=format\&n=F9Lv_nTaj6By6crk\&q=85\&s=cf5b268d330f7db46ea5cf6083f309a1)

Node.js

![](https://mintcdn.com/struktoai/CsxMCKUyfoQQJYHB/images/cloudflare-logo.svg?fit=max\&auto=format\&n=CsxMCKUyfoQQJYHB\&q=85\&s=23668457afa14abb3b0db0f5b9c0541a)

Each service a Jaeger query service knows becomes a folder with its operations
and one JSON file per trace. Point `host` at an existing query service's base
URL, such as `http://localhost:16686`; it needs no credentials.

## Connect

> [tab] YAML
>
> ```yaml workspace.yaml theme={null}
> mounts:
>   /jaeger:
>     vfs: jaeger
>     mode: read
>     config:
>       host: http://localhost:16686
> ```
>
> ```bash theme={null}
> mirage workspace create workspace.yaml --id jg
> mirage shell -w jg -c 'ls /jaeger/services'
> ```

> [tab] Python
>
> ```python theme={null}
> from mirage import MountMode, Workspace
> from mirage.vfs.jaeger import JaegerConfig, JaegerVFS
>
> config = JaegerConfig(host="http://localhost:16686")
> ws = Workspace({"/jaeger": JaegerVFS(config)}, mode=MountMode.READ)
> result = await ws.shell("ls /jaeger/services")
> print(await result.stdout_str())
> await ws.close()
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> import { JaegerVFS, MountMode, Workspace } from '@struktoai/mirage-node'
>
> const ws = new Workspace(
>   { '/jaeger': new JaegerVFS({ host: 'http://localhost:16686' }) },
>   { mode: MountMode.READ },
> )
> const result = await ws.shell('ls /jaeger/services')
> console.log(result.stdoutText)
> await ws.close()
> ```

## Layout

```text theme={null}
/jaeger/
  services/
    <service>/
      operations.json
      traces/
        <trace-id>.json
```

* `traces/` lists the newest 100 traces of the service; change it with
  `default_trace_limit` in Python or YAML, or `defaultTraceLimit` in
  TypeScript. An older trace is still readable by its id.
* `default_from_timestamp` and `default_to_timestamp` bound the listing.
* A trace file is the trace document Jaeger returns, with `traceID`, `spans`,
  `processes` and `warnings`.

## Sample runs

```bash theme={null}
$ ls /jaeger/services
checkout
```

```bash theme={null}
$ jq -c '.[]' /jaeger/services/checkout/operations.json
{"name":"SELECT carts","spanKind":"client"}
{"name":"POST /cart","spanKind":"server"}
{"name":"GET /cart","spanKind":"server"}
```

```bash theme={null}
$ jq -r '.spans[] | "\(.operationName) \(.duration)"' /jaeger/services/checkout/traces/58ca65951c47a64c90af3c8cfabc6e96.json
POST /cart 42000
SELECT carts 7000
```

The mount is read-only.

## SDK guides

> [card] [Python](https://docs.mirage.strukto.ai/python/vfs/jaeger.md)
>
> Every config field, the VFS.md and write support.

> [card] [TypeScript](https://docs.mirage.strukto.ai/typescript/vfs/jaeger.md)
>
> Every config field, the VFS.md and write support.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.