Import from LangSmith
Do the shared setup first: an ingest
key, pip install metergraphrelay, and a .env holding
METERGRAPH_APP_TOKEN.
What the relay reads
Section titled “What the relay reads”LangSmith runs whose run_type is llm, which are the individual model
calls, from one or more projects. They are read through
POST /runs/query. Chain, tool, retriever and prompt runs are not imported,
and feedback is never read.
What you need
Section titled “What you need”| Credentials | A LangSmith API key, lsv2_... |
| Selector | A project name or project id. --project is required |
| Host | https://api.smith.langchain.com by default. Set LANGSMITH_ENDPOINT for the EU region or a self-hosted deployment |
METERGRAPH_APP_TOKEN=<your ingest key>LANGSMITH_API_KEY=lsv2_...# LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.comLANGSMITH_ENDPOINT is the variable LangSmith’s own SDK uses, so an existing
one is picked up as is. LANGSMITH_BASE_URL is accepted as a fallback, and
--base-url overrides both.
Backfill
Section titled “Backfill”-
Decide what to import
Section titled “Decide what to import”You need the project, either by name or by id. Run names and tags narrow it further. Only
llmruns are imported, whatever you select. -
Pull it to a file
Section titled “Pull it to a file”metergraphrelay pull langsmith --project my-project --tag prod \--since 2026-08-01T00:00:00Z --output langsmith.jsonlSelector Meaning --projectRequired. A name or an id, and repeatable. Projects are queried together --nameThe run’s own name. Repeatable, and any of the names matches --tagA run tag. Repeatable, and all of the tags must be present --since/--untilBound the run’s start time. --sinceis inclusive,--untilis exclusive and defaults to the moment the command started-n,--countCaps runs, never traces. Defaults to 100 --routeOverrides the route on every row. Not a selector -
Read the file, then upload it
Section titled “Read the file, then upload it”head -n 2 langsmith.jsonlmetergraphrelay push langsmith.jsonl -
Check the first rows
Section titled “Check the first rows”Open Traces in Metergraph. If every route reads
ChatOpenAIor another model class name, that is LangChain’s own run naming showing through. Pass--routeand pull again.
Keep it current
Section titled “Keep it current”metergraphrelay sync langsmith --source-scope my-project-prod \ --initial-since 2026-08-01T00:00:00Z --project my-project --tag prodSync takes no --since, --until or -n: the server picks the window. It
requires --project and --source-scope, and accepts --name, --tag,
--initial-since, --max-window-seconds, --route and --allow-skipped.
The full contract is on How ongoing sync works.
What lands in Metergraph
Section titled “What lands in Metergraph”| Field | Where it comes from |
|---|---|
| Route | The LLM run’s own name, falling back to langsmith/backfill. --route overrides both |
| Timestamp | The run’s start_time |
| Model | The run’s ls_model_name metadata, then its invocation parameters |
| Provider | The run’s ls_provider metadata. Without it, unknown |
| Tokens | LangSmith’s own rollup of the run’s usage, with its cache and reasoning breakdowns |
| Cost | LangSmith’s computed total_cost |
| Latency | Derived from the run’s start and end times |
| Status | error when the run recorded an error, otherwise success |
| Content | Read whether the run stored plain chat messages, LangChain message objects, or an OpenAI shaped response |
| Trace, span and parent span | The LangSmith trace id, run id and parent run id |
What does not carry over
Section titled “What does not carry over”- Tool calls and tool names.
- Environment. LangSmith rows arrive with no environment set, so they fall outside any environment filter in the dashboard.
- Function attribution, streaming detail, outcomes and repository identity, as on every import path.
- Chain, tool, retriever and prompt runs, and all feedback, which are never read.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | What to do |
|---|---|---|
| Every route is a model class name | LangChain names LLM runs after the model class | Pass --route |
Provider shows as unknown | The run carries no ls_provider metadata | Set ls_provider and ls_model_name on the runs at the source |
project not found | The name does not match a LangSmith project exactly | Use the project id, or the exact name |
invalid choice: 'langsmith' | The installed relay predates LangSmith support | Upgrade metergraphrelay |