{"record":{"id":"6359dc377181f7ce","repo":"different-ai/openwork","slug":"is-only-supported-for-traceidratio-samplers","errorCode":null,"errorMessage":"is only supported for traceidratio samplers","messagePattern":"is only supported for traceidratio samplers","errorType":"validation","errorClass":"ObservabilityConfigError","httpStatus":null,"severity":"error","filePath":"ee/packages/utils/src/observability.ts","lineNumber":262,"sourceCode":"      )\n  }\n}\n\nfunction isRatioSampler(sampler: OTelSampler): boolean {\n  return sampler === \"traceidratio\" || sampler === \"parentbased_traceidratio\"\n}\n\nfunction parseOtelSampler(env: ObservabilityEnv): OTelSamplerConfig {\n  const name = parseOtelSamplerName(env)\n  const rawArgument = envValue(env, \"OTEL_TRACES_SAMPLER_ARG\")\n\n  if (isRatioSampler(name)) {\n    const ratio = rawArgument === undefined ? 1 : parseUnitInterval(rawArgument, \"OTEL_TRACES_SAMPLER_ARG\")\n    return { name, ratio, argument: String(ratio) }\n  }\n\n  if (rawArgument !== undefined) {\n    throw new ObservabilityConfigError(\n      \"is only supported for traceidratio samplers\",\n      \"OTEL_TRACES_SAMPLER_ARG\",\n    )\n  }\n\n  if (name === \"always_off\" || name === \"parentbased_always_off\") {\n    return { name, ratio: 0 }\n  }\n\n  return { name, ratio: 1 }\n}\n\nfunction otelSignalPath(signal: OTelSignal): string {\n  switch (signal) {\n    case \"traces\":\n      return \"/v1/traces\"\n    case \"metrics\":\n      return \"/v1/metrics\"","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/packages/utils/src/observability.ts#L244-L280","documentation":"Error \"is only supported for traceidratio samplers\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/packages/utils/src/observability.ts:262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}