Split endpoint and path in WFE+WFE2 web.RequestEvent (#3683)
This commit is contained in:
parent
d01f74402b
commit
c3669f9068
|
@ -14,6 +14,7 @@ import (
|
||||||
type RequestEvent struct {
|
type RequestEvent struct {
|
||||||
RealIP string `json:",omitempty"`
|
RealIP string `json:",omitempty"`
|
||||||
Endpoint string `json:",omitempty"`
|
Endpoint string `json:",omitempty"`
|
||||||
|
Slug string `json:",omitempty"`
|
||||||
Method string `json:",omitempty"`
|
Method string `json:",omitempty"`
|
||||||
Errors []string `json:",omitempty"`
|
Errors []string `json:",omitempty"`
|
||||||
Requester int64 `json:",omitempty"`
|
Requester int64 `json:",omitempty"`
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -175,7 +174,7 @@ func (wfe *WebFrontEndImpl) HandleFunc(mux *http.ServeMux, pattern string, h web
|
||||||
|
|
||||||
logEvent.Endpoint = pattern
|
logEvent.Endpoint = pattern
|
||||||
if request.URL != nil {
|
if request.URL != nil {
|
||||||
logEvent.Endpoint = path.Join(logEvent.Endpoint, request.URL.Path)
|
logEvent.Slug = request.URL.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
switch request.Method {
|
switch request.Method {
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -175,7 +174,7 @@ func (wfe *WebFrontEndImpl) HandleFunc(mux *http.ServeMux, pattern string, h web
|
||||||
|
|
||||||
logEvent.Endpoint = pattern
|
logEvent.Endpoint = pattern
|
||||||
if request.URL != nil {
|
if request.URL != nil {
|
||||||
logEvent.Endpoint = path.Join(logEvent.Endpoint, request.URL.Path)
|
logEvent.Slug = request.URL.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
switch request.Method {
|
switch request.Method {
|
||||||
|
|
Loading…
Reference in New Issue