Documentation ¶
Index ¶
- Constants
- Variables
- func InitMetricReader(ctx context.Context, reader telemetry.MetricReader, ...) (sdkmetric.Reader, *http.Server, error)
- func InitOpenTelemetry(res *resource.Resource, options []sdkmetric.Option, ...) (*sdkmetric.MeterProvider, error)
- func InitPrometheusServer(registry *prometheus.Registry, address string, asyncErrorChannel chan error) *http.Server
- func InitSpanProcessor(ctx context.Context, processor telemetry.SpanProcessor) (sdktrace.SpanProcessor, error)
- func InitTracerProvider(res *resource.Resource, options []sdktrace.TracerProviderOption) (*sdktrace.TracerProvider, error)
- func RegisterProcessMetrics(ocRegistry *metric.Registry, mp otelmetric.MeterProvider, useOtel bool, ...) error
- type RegisterOption
Constants ¶
View Source
const ( // gRPC Instrumentation Name GRPCInstrumentation = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" // http Instrumentation Name HTTPInstrumentation = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" )
Variables ¶
View Source
var ( // GRPCUnacceptableKeyValues is a list of high cardinality grpc attributes that should be filtered out. GRPCUnacceptableKeyValues = []attribute.KeyValue{ attribute.String(semconv.AttributeNetSockPeerAddr, ""), attribute.String(semconv.AttributeNetSockPeerPort, ""), attribute.String(semconv.AttributeNetSockPeerName, ""), } // HTTPUnacceptableKeyValues is a list of high cardinality http attributes that should be filtered out. HTTPUnacceptableKeyValues = []attribute.KeyValue{ attribute.String(semconv.AttributeNetHostName, ""), attribute.String(semconv.AttributeNetHostPort, ""), } )
Functions ¶
func InitMetricReader ¶ added in v0.82.0
func InitOpenTelemetry ¶ added in v0.78.0
func InitPrometheusServer ¶ added in v0.82.0
func InitSpanProcessor ¶ added in v0.82.0
func InitSpanProcessor(ctx context.Context, processor telemetry.SpanProcessor) (sdktrace.SpanProcessor, error)
func InitTracerProvider ¶ added in v0.82.0
func InitTracerProvider(res *resource.Resource, options []sdktrace.TracerProviderOption) (*sdktrace.TracerProvider, error)
func RegisterProcessMetrics ¶
func RegisterProcessMetrics(ocRegistry *metric.Registry, mp otelmetric.MeterProvider, useOtel bool, ballastSizeBytes uint64, opts ...RegisterOption) error
RegisterProcessMetrics creates a new set of processMetrics (mem, cpu) that can be used to measure basic information about this process.
Types ¶
type RegisterOption ¶ added in v0.84.0
type RegisterOption interface {
// contains filtered or unexported methods
}
func WithHostProc ¶ added in v0.84.0
func WithHostProc(hostProc string) RegisterOption
WithHostProc overrides the /proc folder on Linux used by process telemetry.
Click to show internal directories.
Click to hide internal directories.