Documentation
¶
Index ¶
- Variables
- func BytesMeasure(pkg string, meterName string, description string) metric.Int64Counter
- func CounterView(pkg string, meterName string, description string) []sdkmetric.View
- func DimensionlessMeasure(pkg string, meterName string, description string) metric.Int64Counter
- func ErrorCode(err error) string
- func LatencyMeasure(pkg string) metric.Float64Histogram
- func Views(pkg string) []sdkmetric.View
- type Manager
- type Option
- func WithDisableTracing() Option
- func WithMetricsReader(reader sdkmetrics.Reader) Option
- func WithPropagationTextMap(carrier propagation.TextMapPropagator) Option
- func WithServiceEnvironment(env string) Option
- func WithServiceName(name string) Option
- func WithServiceVersion(version string) Option
- func WithTraceExporter(exporter sdktrace.SpanExporter) Option
- func WithTraceLogsExporter(exporter sdklogs.Exporter) Option
- func WithTraceSampler(sampler sdktrace.Sampler) Option
- type Tracer
Constants ¶
This section is empty.
Variables ¶
var ( AttrMethodKey = attribute.Key("frame_method") AttrPackageKey = attribute.Key("frame_package") AttrStatusKey = attribute.Key("frame_status") AttrErrorKey = attribute.Key("frame_error") )
Common attribute keys used across the frame.
Functions ¶
func BytesMeasure ¶
func BytesMeasure(pkg string, meterName string, description string) metric.Int64Counter
BytesMeasure creates a counter for bytes measurements.
func CounterView ¶
CounterView returns summation views that add up individual measurements the counter takes.
func DimensionlessMeasure ¶
func DimensionlessMeasure(pkg string, meterName string, description string) metric.Int64Counter
DimensionlessMeasure creates a simple counter specifically for dimensionless measurements.
func LatencyMeasure ¶
func LatencyMeasure(pkg string) metric.Float64Histogram
LatencyMeasure returns the measure for method call latency used by Go CDK APIs.
Types ¶
type Manager ¶ added in v1.63.0
type Manager interface {
Init(ctx context.Context) error
Disabled() bool
LogHandler() slog.Handler
}
func NewManager ¶ added in v1.63.0
NewManager creates a new telemetry setup manager.
type Option ¶ added in v1.63.0
func WithDisableTracing ¶ added in v1.63.0
func WithDisableTracing() Option
WithDisableTracing disable tracing for the service.
func WithMetricsReader ¶ added in v1.63.0
func WithMetricsReader(reader sdkmetrics.Reader) Option
WithMetricsReader specifies the metrics reader for the service.
func WithPropagationTextMap ¶ added in v1.63.0
func WithPropagationTextMap(carrier propagation.TextMapPropagator) Option
WithPropagationTextMap specifies the trace baggage carrier exporter to use.
func WithServiceEnvironment ¶ added in v1.63.0
WithServiceEnvironment sets the service environment for resource tagging.
func WithServiceName ¶ added in v1.63.0
WithServiceName sets the service name for resource tagging.
func WithServiceVersion ¶ added in v1.63.0
WithServiceVersion sets the service version for resource tagging.
func WithTraceExporter ¶ added in v1.63.0
func WithTraceExporter(exporter sdktrace.SpanExporter) Option
WithTraceExporter specifies the trace exporter to use.
func WithTraceLogsExporter ¶ added in v1.63.0
WithTraceLogsExporter specifies the trace logs exporter for the service.
func WithTraceSampler ¶ added in v1.63.0
WithTraceSampler specifies the trace sampler to use.