Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package telemetry reports best-effort usage events from Microsoft Foundry extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ReportUsage(
		ctx context.Context,
		request *contracts.ReportUsageRequest,
		options ...grpc.CallOption,
	) (*contracts.ReportUsageResponse, error)
}

Client is the telemetry RPC used by Reporter.

type Event

type Event struct {
	Name       string
	Attributes map[string]string
}

Event is an extension-owned usage event.

type Options

type Options struct {
	Timeout time.Duration
	Logger  *azdext.Logger
}

Options configures a Reporter.

type Reporter

type Reporter interface {
	Report(ctx context.Context, event Event)
}

Reporter records usage events without affecting the caller's command result.

func NewReporter

func NewReporter(client Client, options *Options) Reporter

NewReporter creates a best-effort usage reporter backed by the azd host.

Jump to

Keyboard shortcuts

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