You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client?.traceProvider?.addSpanProcessor(
new BatchSpanProcessor(new AISDKExporter())
);
client doesn't have traceProvider 🤔
I've set it up like this:
// This file configures the initialization of Sentry on the client.
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";
import { AISDKExporter } from "langsmith/vercel";
const client = Sentry.init({
dsn: "[DSN]",
// Skip OpenTelemetry setup
skipOpenTelemetrySetup: true,
// Define how likely traces are sampled
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
import {
BasicTracerProvider,
BatchSpanProcessor,
} from "@opentelemetry/sdk-trace-base";
import {
SentryPropagator,
SentrySampler,
SentrySpanProcessor,
} from "@sentry/opentelemetry";
const provider = new BasicTracerProvider({
sampler: new SentrySampler(client!),
spanProcessors: [
new SentrySpanProcessor(),
new BatchSpanProcessor(new AISDKExporter()),
],
});
provider.register({
propagator: new SentryPropagator(),
contextManager: new Sentry.SentryContextManager(),
});
Buuut it doesn't work, Langsmith doesn't show anything. Any suggestions? Thank you!
[edit]
These are the logs after activating debug inside AISDKExporter:
Hey!
I'm trying to setup OTel for tracing with Langsmith in NextJS, using the Vercel AI SDK and Sentry.
I followed the guide here: https://docs.smith.langchain.com/observability/how_to_guides/tracing/trace_whttps://github.com/langchain-ai/langsmith-sdk/issues/new/chooseith_vercel_ai_sdk#sentry but there are a couple of outdated stuff (so does Sentry docs..)
Specifically this snippet:
client
doesn't havetraceProvider
🤔I've set it up like this:
Buuut it doesn't work, Langsmith doesn't show anything. Any suggestions? Thank you!
[edit]
These are the logs after activating
debug
insideAISDKExporter
:Toggle logs
The text was updated successfully, but these errors were encountered: