telemetry

package
v1.0.64 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package telemetry provides telemetry utilities for AI provider tracking and monitoring. It includes user agent generation with SDK version, OS, and architecture information.

Index

Constants

View Source
const (
	// SDKName is the name of the SDK
	SDKName = "ai-provider-kit"
	// SDKVersion is the version of the SDK
	// This should be updated with each release
	SDKVersion = "0.1.0"
)

Variables

This section is empty.

Functions

func GetSDKName

func GetSDKName() string

GetSDKName returns the SDK name.

func GetSDKVersion

func GetSDKVersion() string

GetSDKVersion returns the current SDK version.

func GetUserAgent

func GetUserAgent() string

GetUserAgent returns the User-Agent string for HTTP requests. Format: 'ai-provider-kit/VERSION (go VERSION; OS; ARCH)' The value is computed once and cached for efficiency.

Example outputs:

  • "ai-provider-kit/0.1.0 (go1.24.0; linux; amd64)"
  • "ai-provider-kit/0.1.0 (go1.24.0; darwin; arm64)"
  • "ai-provider-kit/0.1.0 (go1.24.0; windows; amd64)"

func ResetCache

func ResetCache()

ResetCache resets the cached User-Agent string. This is primarily useful for testing purposes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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