Documentation ¶
Index ¶
- func InitHttpMetrics(meter metric.Meter)
- type HttpClientAttrsExtractor
- func (h *HttpClientAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) []attribute.KeyValue
- func (h *HttpClientAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) []attribute.KeyValue
- type HttpClientAttrsGetter
- type HttpClientMetric
- func (h HttpClientMetric) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTime time.Time)
- func (h HttpClientMetric) OnAfterStart(context context.Context, endTime time.Time)
- func (h HttpClientMetric) OnBeforeEnd(ctx context.Context, startAttributes []attribute.KeyValue, startTime time.Time) context.Context
- func (h HttpClientMetric) OnBeforeStart(parentContext context.Context, startTime time.Time) context.Context
- type HttpClientSpanNameExtractor
- type HttpClientSpanStatusExtractor
- type HttpCommonAttrsExtractor
- func (h *HttpCommonAttrsExtractor[REQUEST, RESPONSE, GETTER, GETTER2]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) []attribute.KeyValue
- func (h *HttpCommonAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) []attribute.KeyValue
- type HttpCommonAttrsGetter
- type HttpServerAttrsExtractor
- func (h *HttpServerAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2, GETTER3]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) []attribute.KeyValue
- func (h *HttpServerAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2, GETTER3]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) []attribute.KeyValue
- type HttpServerAttrsGetter
- type HttpServerMetric
- func (h *HttpServerMetric) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTime time.Time)
- func (h *HttpServerMetric) OnAfterStart(context context.Context, endTime time.Time)
- func (h *HttpServerMetric) OnBeforeEnd(ctx context.Context, startAttributes []attribute.KeyValue, startTime time.Time) context.Context
- func (h *HttpServerMetric) OnBeforeStart(parentContext context.Context, startTime time.Time) context.Context
- type HttpServerSpanNameExtractor
- type HttpServerSpanStatusExtractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitHttpMetrics ¶ added in v0.3.0
InitHttpMetrics TODO: The init function may be executed after the HttpServerOperationListener() method so we need to make sure the otel_setup is executed before all the init() function related to issue https://github.com/alibaba/opentelemetry-go-auto-instrumentation/issues/48
Types ¶
type HttpClientAttrsExtractor ¶
type HttpClientAttrsExtractor[REQUEST any, RESPONSE any, GETTER1 HttpClientAttrsGetter[REQUEST, RESPONSE], GETTER2 net.NetworkAttrsGetter[REQUEST, RESPONSE]] struct { Base HttpCommonAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2] NetworkExtractor net.NetworkAttrsExtractor[REQUEST, RESPONSE, GETTER2] }
type HttpClientAttrsGetter ¶
type HttpClientAttrsGetter[REQUEST any, RESPONSE any] interface { HttpCommonAttrsGetter[REQUEST, RESPONSE] net.NetworkAttrsGetter[REQUEST, RESPONSE] GetUrlFull(request REQUEST) string GetServerAddress(request REQUEST) string GetServerPort(request REQUEST) int }
type HttpClientMetric ¶ added in v0.3.0
type HttpClientMetric struct {
// contains filtered or unexported fields
}
func HttpClientMetrics ¶ added in v0.3.0
func HttpClientMetrics() *HttpClientMetric
func (HttpClientMetric) OnAfterEnd ¶ added in v0.3.0
func (HttpClientMetric) OnAfterStart ¶ added in v0.3.0
func (h HttpClientMetric) OnAfterStart(context context.Context, endTime time.Time)
func (HttpClientMetric) OnBeforeEnd ¶ added in v0.3.0
func (HttpClientMetric) OnBeforeStart ¶ added in v0.3.0
type HttpClientSpanNameExtractor ¶
type HttpClientSpanNameExtractor[REQUEST any, RESPONSE any] struct { Getter HttpClientAttrsGetter[REQUEST, RESPONSE] }
func (*HttpClientSpanNameExtractor[REQUEST, RESPONSE]) Extract ¶
func (h *HttpClientSpanNameExtractor[REQUEST, RESPONSE]) Extract(request REQUEST) string
type HttpClientSpanStatusExtractor ¶ added in v0.0.2
type HttpClientSpanStatusExtractor[REQUEST any, RESPONSE any] struct { Getter HttpCommonAttrsGetter[REQUEST, RESPONSE] }
type HttpCommonAttrsExtractor ¶
type HttpCommonAttrsExtractor[REQUEST any, RESPONSE any, GETTER1 HttpCommonAttrsGetter[REQUEST, RESPONSE], GETTER2 net.NetworkAttrsGetter[REQUEST, RESPONSE]] struct { HttpGetter GETTER1 NetGetter GETTER2 }
type HttpCommonAttrsGetter ¶
type HttpCommonAttrsGetter[REQUEST any, RESPONSE any] interface { GetRequestMethod(request REQUEST) string GetHttpRequestHeader(request REQUEST, name string) []string GetHttpResponseStatusCode(request REQUEST, response RESPONSE, err error) int GetHttpResponseHeader(request REQUEST, response RESPONSE, name string) []string GetErrorType(request REQUEST, response RESPONSE, err error) string }
type HttpServerAttrsExtractor ¶
type HttpServerAttrsExtractor[REQUEST any, RESPONSE any, GETTER1 HttpServerAttrsGetter[REQUEST, RESPONSE], GETTER2 net.NetworkAttrsGetter[REQUEST, RESPONSE], GETTER3 net.UrlAttrsGetter[REQUEST]] struct { Base HttpCommonAttrsExtractor[REQUEST, RESPONSE, GETTER1, GETTER2] NetworkExtractor net.NetworkAttrsExtractor[REQUEST, RESPONSE, GETTER2] UrlExtractor net.UrlAttrsExtractor[REQUEST, RESPONSE, GETTER3] }
type HttpServerAttrsGetter ¶
type HttpServerAttrsGetter[REQUEST any, RESPONSE any] interface { HttpCommonAttrsGetter[REQUEST, RESPONSE] net.UrlAttrsGetter[REQUEST] net.NetworkAttrsGetter[REQUEST, RESPONSE] GetUrlScheme(request REQUEST) string GetUrlPath(request REQUEST) string GetUrlQuery(request REQUEST) string GetHttpRoute(request REQUEST) string }
type HttpServerMetric ¶ added in v0.3.0
type HttpServerMetric struct {
// contains filtered or unexported fields
}
func HttpServerMetrics ¶ added in v0.3.0
func HttpServerMetrics() *HttpServerMetric
func (*HttpServerMetric) OnAfterEnd ¶ added in v0.3.0
func (*HttpServerMetric) OnAfterStart ¶ added in v0.3.0
func (h *HttpServerMetric) OnAfterStart(context context.Context, endTime time.Time)
func (*HttpServerMetric) OnBeforeEnd ¶ added in v0.3.0
func (*HttpServerMetric) OnBeforeStart ¶ added in v0.3.0
type HttpServerSpanNameExtractor ¶
type HttpServerSpanNameExtractor[REQUEST any, RESPONSE any] struct { Getter HttpServerAttrsGetter[REQUEST, RESPONSE] }
func (*HttpServerSpanNameExtractor[REQUEST, RESPONSE]) Extract ¶
func (h *HttpServerSpanNameExtractor[REQUEST, RESPONSE]) Extract(request REQUEST) string
type HttpServerSpanStatusExtractor ¶ added in v0.0.2
type HttpServerSpanStatusExtractor[REQUEST any, RESPONSE any] struct { Getter HttpCommonAttrsGetter[REQUEST, RESPONSE] }
Click to show internal directories.
Click to hide internal directories.