httperr

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package httperr maps upstream HTTP status codes to the error identifiers each tracing semantic convention reports.

Index

Constants

View Source
const FallbackGenAI = "_OTHER"

FallbackGenAI is the GenAI registry's well-known fallback value. See: https://opentelemetry.io/docs/specs/semconv/attributes-registry/error/

View Source
const FallbackOpenInference = "Error"

FallbackOpenInference is reported for statuses with no specific mapping.

Variables

This section is empty.

Functions

func GenAIErrorType

func GenAIErrorType(statusCode int) string

GenAIErrorType returns the value of the error.type attribute for a status code.

The GenAI conventions ask for the provider's error code or another low-cardinality identifier, so any status outside the table falls back to the status code itself rather than inventing a name. Non-HTTP statuses fall back to FallbackGenAI to keep cardinality bounded.

func OpenInferenceErrorType

func OpenInferenceErrorType(statusCode int) string

OpenInferenceErrorType returns the OpenInference error type for a status code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL