You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-23 22:34:47 +02:00
Add the golines golangci-lint formatter (#6513)
Ensure consistent line wrapping (<= 120 characters) within the project.
This commit is contained in:
@@ -50,7 +50,10 @@ type SemanticConventions struct {
|
||||
// namespace as specified by the OpenTelemetry specification for a
|
||||
// span. The network parameter is a string that net.Dial function
|
||||
// from standard library can understand.
|
||||
func (sc *SemanticConventions) NetAttributesFromHTTPRequest(network string, request *http.Request) []attribute.KeyValue {
|
||||
func (sc *SemanticConventions) NetAttributesFromHTTPRequest(
|
||||
network string,
|
||||
request *http.Request,
|
||||
) []attribute.KeyValue {
|
||||
attrs := []attribute.KeyValue{}
|
||||
|
||||
switch network {
|
||||
@@ -200,7 +203,10 @@ func (sc *SemanticConventions) httpBasicAttributesFromHTTPRequest(request *http.
|
||||
|
||||
// HTTPServerMetricAttributesFromHTTPRequest generates low-cardinality attributes
|
||||
// to be used with server-side HTTP metrics.
|
||||
func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(serverName string, request *http.Request) []attribute.KeyValue {
|
||||
func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(
|
||||
serverName string,
|
||||
request *http.Request,
|
||||
) []attribute.KeyValue {
|
||||
attrs := []attribute.KeyValue{}
|
||||
if serverName != "" {
|
||||
attrs = append(attrs, sc.HTTPServerNameKey.String(serverName))
|
||||
@@ -212,7 +218,10 @@ func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(serverN
|
||||
// http namespace as specified by the OpenTelemetry specification for
|
||||
// a span on the server side. Currently, only basic authentication is
|
||||
// supported.
|
||||
func (sc *SemanticConventions) HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue {
|
||||
func (sc *SemanticConventions) HTTPServerAttributesFromHTTPRequest(
|
||||
serverName, route string,
|
||||
request *http.Request,
|
||||
) []attribute.KeyValue {
|
||||
attrs := []attribute.KeyValue{
|
||||
sc.HTTPTargetKey.String(request.RequestURI),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user