@langwatch/scenario
    Preparing search index...

    Function withCustomScopes

    • Creates a filter that keeps spans from the @langwatch/scenario scope plus any additional custom instrumentation scopes.

      Parameters

      • ...scopes: string[]

        Additional instrumentation scope names to include

      Returns TraceFilter[]

      Array of TraceFilter rules

      import { defineConfig, withCustomScopes } from "@langwatch/scenario";
      import { LangWatchTraceExporter } from "langwatch/observability";

      export default defineConfig({
      observability: {
      traceExporter: new LangWatchTraceExporter({
      filters: withCustomScopes("my-app/database", "my-app/agent"),
      }),
      instrumentations: [], // disable auto-instrumentation
      },
      });