Documentation
¶
Index ¶
- Constants
- Variables
- func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErrorChannel chan error) (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 RegisterProcessMetrics(cfg component.TelemetrySettings, opts ...RegisterOption) 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 ¶
func InitOpenTelemetry ¶
func InitPrometheusServer ¶
func RegisterProcessMetrics ¶
func RegisterProcessMetrics(cfg component.TelemetrySettings, 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 ¶
type RegisterOption interface {
// contains filtered or unexported methods
}
func WithHostProc ¶
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.