Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Class TelemetryError

    Error subclass for OpenTelemetry initialization and runtime failures.

    const error = new TelemetryError({
    message: 'Failed to initialize OTel SDK',
    attempted: 'Initialize OpenTelemetry tracing',
    exporterType: 'otlp',
    });

    Init failed — OTel SDK could not be started

    Peer dep missing — required OTel package not installed

    Exporter failed — trace/metrics exporter creation failed

    Shutdown failed — graceful shutdown of SDK timed out

    Metrics init failed — metrics SDK could not be started

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new TelemetryError instance.

      Parameters

      • options: TelemetryErrorOptions

        Telemetry error construction options including optional exporter type and package name for diagnostic context.

      Returns TelemetryError

      import { TelemetryError } from '#core/errors/telemetry-error.js';

      const error = new TelemetryError({
      message: 'Peer dependency missing: @opentelemetry/sdk-node',
      attempted: 'Dynamic import of @opentelemetry/sdk-node',
      code: 'ERR_TELEMETRY_PEER_DEP_MISSING',
      packageName: '@opentelemetry/sdk-node',
      });

    Properties

    attempted: string
    code: ErrorCode
    details: Readonly<Record<string, unknown>>
    exporterType: string | undefined
    packageName: string | undefined
    retryable: boolean
    severity: "error" | "info" | "warning"
    suggestions: readonly string[]
    timestamp: string

    Methods

    • Returns AI-agent-friendly context with telemetry-specific diagnostic fields.

      Returns AIErrorContext & {
          exporterType: string | undefined;
          packageName: string | undefined;
      }

      Base AI context extended with exporter type and package name details.

      const ctx = error.toAIContext();
      // LLM can use ctx.packageName to suggest install commands
      // and ctx.exporterType to suggest alternative exporters
    • Serializes this error to a JSON-safe object with telemetry-specific fields.

      Returns SerializedPramanError & {
          exporterType: string | undefined;
          packageName: string | undefined;
      }

      Base serialization extended with exporterType and packageName.

      const json = error.toJSON();
      console.log(json.exporterType); // 'otlp'
      console.log(json.packageName); // '@opentelemetry/sdk-node'
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());