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 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.
Click to show internal directories.
Click to hide internal directories.