GoodMemGoodMem
IntegrationsObservability & Eval

LangSmith

Export GoodMem server traces to LangSmith with explicit parent policy and typed metadata.

LangSmith

The langsmith export profile adds run types and selected metadata to GoodMem traces, with numeric, boolean, and array values intact. You need a LangSmith API key and access to the GoodMem server configuration. For collector fan-out, follow Export traces from GoodMem with the neutral profile.

Select the parent policy

LangSmith needs every ancestor span in the same project to display a continued trace, even when a collector sits between the services. It can accept an upload but omit the trace if an ancestor is absent.

Caller exportGoodMem policyResult
Caller ancestors reach the same LangSmith projectparentOne continued trace
Caller ancestors do not reach that projectExplicit linkSeparate GoodMem trace with a caller link
Request contains no remote parentEither policyGoodMem starts a local trace

The default remains parent for all export profiles. For caller setup, see Connect the caller trace.

Configure the endpoint

This example selects link. Set the policy from the table above in the GoodMem server environment:

OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
OTEL_SERVICE_NAME=goodmem-server
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.smith.langchain.com/otel/v1/traces
GOODMEM_OTEL_EXPORT_PROFILE=langsmith
GOODMEM_OTEL_REMOTE_PARENT=link

The example uses the US endpoint. For EU projects, use https://eu.api.smith.langchain.com/otel/v1/traces. For other regions or self-hosted deployments, use the endpoint from the LangSmith OTel configuration.

Prepare the header file

See the installation directory for the location of .env.

In the installation's private .env file, replace <key> with your LangSmith API key:

OTEL_EXPORTER_OTLP_TRACES_HEADERS=x-api-key=<key>

For a project other than default, append ,Langsmith-Project=<name> to that value. Encode spaces in the project name as %20 and literal plus signs as %2B. For example:

OTEL_EXPORTER_OTLP_TRACES_HEADERS=x-api-key=<key>,Langsmith-Project=my%20project

Keep .env outside version control; the header value contains credentials.

Apply the configuration

Restart the installation:

goodmem system stop
goodmem system start

For a direct JVM launch, export the same variables before the server starts.

Verify the runs

  1. Send the verification request.
  2. Find the request in the intended LangSmith project.
  3. Match its request_id metadata with the response goodmem-request-id header.
  4. If you have a populated space, run one retrieval.
  5. Inspect the run types and child parentage.
GoodMem operationLangSmith run type
Retrievalretriever
Embeddingembedding
Typed LLM generationllm
Rerank, proxy, or generic operationchain

Proxy and rerank spans keep their operation types even when they contain a model name. For empty input and output panels, see the trace data controls.

Query metadata

LangSmith stores the profile's selected metadata in extra.metadata, with numeric, boolean, and array values intact. Each operation supplies its own metadata. For a scalar metadata filter, use:

has(metadata, '{"hnsw_ef_search":80,"postprocess_fallback":true}')

For exact membership in the retained space IDs, use the generated space tag:

has(tags, "goodmem.space:11111111-2222-4333-8444-555555555555")

Replace the sample UUID with the space ID. The generated mappings list the fields that the profile exports when the operation supplies a value.

Interpret errors and retries

Use failure_category and failure_origin for provider failure filters.

Diagnose missing runs

Check the project, endpoint, and headers first. If uploads succeed but no request appears, check the parent policy before the sampler. See Troubleshoot tracing for checks at each export stage.