• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

foomo / keel / 13759120452

10 Mar 2025 07:26AM UTC coverage: 11.338% (-4.9%) from 16.265%
13759120452

push

github

web-flow
Merge pull request #230 from foomo/v0.20.0

V0.20.0

1 of 25 new or added lines in 3 files covered. (4.0%)

366 existing lines in 25 files now uncovered.

855 of 7541 relevant lines covered (11.34%)

0.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/log/fields_http.go
1
package log
2

3
import (
4
        "go.uber.org/zap"
5
)
6

7
const (
8
        // HTTPServerNameKey represents the name of the service handling the request
9
        HTTPServerNameKey = "http_server_name"
10

11
        // HTTPMethodKey represents the HTTP request method.
12
        HTTPMethodKey = "http_method"
13

14
        // HTTPTargetKey represents the full request target as passed in a HTTP
15
        // request line or equivalent, e.g. "/path/12314/?q=ddds#123".
16
        HTTPTargetKey = "http_target"
17

18
        // HTTPHostKey represents the value of the HTTP host header.
19
        HTTPHostKey = "http_host"
20

21
        // HTTPStatusCodeKey represents the HTTP response status code.
22
        HTTPStatusCodeKey = "http_status_code"
23

24
        // HTTPUserAgentKey represents the Value of the HTTP User-Agent header sent by the client.
25
        HTTPUserAgentKey = "http_user_agent"
26

27
        // HTTPClientIPKey represents the IP address of the original client behind all proxies,
28
        // if known (e.g. from X-Forwarded-For).
29
        HTTPClientIPKey = "http_client_ip"
30

31
        // HTTPRequestContentLengthKey represents the size of the request payload body in bytes.
32
        HTTPRequestContentLengthKey = "http_read_bytes"
33

34
        // HTTPWroteBytesKey represents the size of the response payload body in bytes.
35
        HTTPWroteBytesKey = "http_wrote_bytes" // #nosec
36

37
        // HTTPSchemeKey represents the URI scheme identifying the used protocol.
38
        HTTPSchemeKey = "http_scheme"
39

40
        // HTTPFlavorKey represents the Kind of HTTP protocol used.
41
        HTTPFlavorKey = "http_flavor"
42

43
        // HTTPRequestIDKey represents the HTTP request id if known (e.g. from X-Request-ID).
44
        HTTPRequestIDKey = "http_request_id"
45

46
        // HTTPSessionIDKey represents the HTTP session id if known (e.g. from X-Session-ID).
47
        HTTPSessionIDKey = "http_session_id"
48

49
        // HTTPTrackingIDKey represents the HTTP tracking id if known (e.g. from X-Tracking-ID).
50
        HTTPTrackingIDKey = "http_tracking_id"
51

52
        // HTTPRefererKey identifies the address of the web page (i.e., the URI or IRI), from which the resource has been requested.
53
        HTTPRefererKey = "http_referer"
54
)
55

UNCOV
56
func FHTTPServerName(id string) zap.Field {
×
UNCOV
57
        return zap.String(HTTPServerNameKey, id)
×
UNCOV
58
}
×
59

60
func FHTTPRequestID(id string) zap.Field {
×
61
        return zap.String(HTTPRequestIDKey, id)
×
62
}
×
63

64
func FHTTPSessionID(id string) zap.Field {
×
65
        return zap.String(HTTPSessionIDKey, id)
×
66
}
×
67

68
func FHTTPTrackingID(id string) zap.Field {
×
69
        return zap.String(HTTPTrackingIDKey, id)
×
70
}
×
71

UNCOV
72
func FHTTPRequestContentLength(bytes int64) zap.Field {
×
UNCOV
73
        return zap.Int64(HTTPRequestContentLengthKey, bytes)
×
UNCOV
74
}
×
75

UNCOV
76
func FHTTPWroteBytes(bytes int64) zap.Field {
×
UNCOV
77
        return zap.Int64(HTTPWroteBytesKey, bytes)
×
UNCOV
78
}
×
79

UNCOV
80
func FHTTPStatusCode(status int) zap.Field {
×
UNCOV
81
        return zap.Int(HTTPStatusCodeKey, status)
×
UNCOV
82
}
×
83

UNCOV
84
func FHTTPTarget(target string) zap.Field {
×
UNCOV
85
        return zap.String(HTTPTargetKey, target)
×
UNCOV
86
}
×
87

UNCOV
88
func FHTTPClientIP(clientIP string) zap.Field {
×
UNCOV
89
        return zap.String(HTTPClientIPKey, clientIP)
×
UNCOV
90
}
×
91

UNCOV
92
func FHTTPFlavor(flavor string) zap.Field {
×
UNCOV
93
        return zap.String(HTTPFlavorKey, flavor)
×
UNCOV
94
}
×
95

UNCOV
96
func FHTTPScheme(scheme string) zap.Field {
×
UNCOV
97
        return zap.String(HTTPSchemeKey, scheme)
×
UNCOV
98
}
×
99

UNCOV
100
func FHTTPUserAgent(userAgent string) zap.Field {
×
UNCOV
101
        return zap.String(HTTPUserAgentKey, userAgent)
×
UNCOV
102
}
×
103

104
func FHTTPReferer(host string) zap.Field {
×
105
        return zap.String(HTTPRefererKey, host)
×
106
}
×
107

UNCOV
108
func FHTTPHost(host string) zap.Field {
×
UNCOV
109
        return zap.String(HTTPHostKey, host)
×
UNCOV
110
}
×
111

UNCOV
112
func FHTTPMethod(name string) zap.Field {
×
UNCOV
113
        return zap.String(HTTPMethodKey, name)
×
UNCOV
114
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc