openaiconv

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package openaiconv exposes the OpenAI extensions to the OpenTelemetry GenAI semantic conventions. Use alongside semconv/genaiconv when instrumenting OpenAI (or OpenAI-compatible) clients.

See https://opentelemetry.io/docs/specs/semconv/gen-ai/openai/.

TODO(upstream): delete this package once upstream ships go.opentelemetry.io/otel/semconv/<version>/openaiconv. Track the OpenAI GenAI extensions spec (linked above) and the opentelemetry-go release notes — when the sub-package appears, switch callers to upstream and remove this package entirely.

Index

Constants

View Source
const (
	ServiceTierAuto    = "auto"
	ServiceTierDefault = "default"
	ServiceTierFlex    = "flex"
	ServiceTierScale   = "scale"
)

Service tiers.

View Source
const (
	APITypeChatCompletions = "chat_completions"
	APITypeResponses       = "responses"
)

API endpoint types.

Variables

View Source
var (
	RequestServiceTierKey        = attribute.Key("openai.request.service_tier")
	ResponseServiceTierKey       = attribute.Key("openai.response.service_tier")
	APITypeKey                   = attribute.Key("openai.api.type")
	ResponseSystemFingerprintKey = attribute.Key("openai.response.system_fingerprint")
)

Attribute keys (openai.* namespace).

Functions

func APIType

func APIType(v string) attribute.KeyValue

func RequestServiceTier

func RequestServiceTier(v string) attribute.KeyValue

Constructors.

func ResponseServiceTier

func ResponseServiceTier(v string) attribute.KeyValue

func ResponseSystemFingerprint

func ResponseSystemFingerprint(v string) attribute.KeyValue

Types

This section is empty.

Jump to

Keyboard shortcuts

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