Add span attrs "client_ver" and "client_platform".
This commit is contained in:
parent
ad59658962
commit
f4b03d7e40
|
@ -102,6 +102,12 @@ func (server *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
versionHeader := r.Header.Get(server.versionHeader)
|
versionHeader := r.Header.Get(server.versionHeader)
|
||||||
cltVersion, cltPlatform := parseVersionHeader(versionHeader)
|
cltVersion, cltPlatform := parseVersionHeader(versionHeader)
|
||||||
cltIP := GetIP(r)
|
cltIP := GetIP(r)
|
||||||
|
|
||||||
|
span.SetAttributes(
|
||||||
|
attribute.String("client_ver", cltVersion),
|
||||||
|
attribute.Int("client_platform", cltPlatform),
|
||||||
|
)
|
||||||
|
|
||||||
server.logger.V(1).Info("New request", "client_ver", cltVersion)
|
server.logger.V(1).Info("New request", "client_ver", cltVersion)
|
||||||
|
|
||||||
payload, err := readRequestBody(ctx, r.Body)
|
payload, err := readRequestBody(ctx, r.Body)
|
||||||
|
|
Loading…
Reference in New Issue