Skip to content

Commit 76ccd71

Browse files
authored
Rename tcollector proxy metric in agent (#1182)
* Rname tcollector proxy metric in agent Signed-off-by: Pavol Loffay <ploffay@redhat.com> * Add changelog and fix review comments Signed-off-by: Pavol Loffay <ploffay@redhat.com>
1 parent 4cc25e6 commit 76ccd71

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
Changes by Version
22
==================
33

4+
1.9.0 (unreleased)
5+
------------------
6+
7+
#### Backend Changes
8+
9+
##### Breaking Changes
10+
11+
- Rename tcollector proxy metric in agent ([#1182](https://github.com/jaegertracing/jaeger/pull/1182), [@pavolloffay](https://github.com/pavolloffay))
12+
13+
The following metric:
14+
```
15+
jaeger_http_server_errors{source="tcollector-proxy",status="5xx"}
16+
```
17+
has been renamed to:
18+
```
19+
jaeger_http_server_errors{source="collector-proxy",status="5xx"}
20+
```
21+
22+
##### New Features
23+
24+
##### Bug fixes, Minor Improvements
25+
26+
#### UI Changes
27+
28+
##### New Features
29+
30+
##### Bug Fixes, Minor Improvements
31+
32+
433
1.8.0 (2018-11-12)
534
------------------
635

cmd/agent/app/httpserver/server.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type httpHandler struct {
7171
BadRequest metrics.Counter `metric:"http-server.errors" tags:"status=4xx,source=all"`
7272

7373
// Number of collector proxy failures
74-
TCollectorProxyFailures metrics.Counter `metric:"http-server.errors" tags:"status=5xx,source=tcollector-proxy"`
74+
CollectorProxyFailures metrics.Counter `metric:"http-server.errors" tags:"status=5xx,source=collector-proxy"`
7575

7676
// Number of bad responses due to malformed thrift
7777
BadThriftFailures metrics.Counter `metric:"http-server.errors" tags:"status=5xx,source=thrift"`
@@ -107,7 +107,7 @@ func (h *httpHandler) serveSamplingHTTP(w http.ResponseWriter, r *http.Request,
107107
}
108108
resp, err := h.manager.GetSamplingStrategy(service)
109109
if err != nil {
110-
h.metrics.TCollectorProxyFailures.Inc(1)
110+
h.metrics.CollectorProxyFailures.Inc(1)
111111
http.Error(w, fmt.Sprintf("collector error: %+v", err), http.StatusInternalServerError)
112112
return
113113
}
@@ -137,7 +137,7 @@ func (h *httpHandler) serveBaggageHTTP(w http.ResponseWriter, r *http.Request) {
137137
}
138138
resp, err := h.manager.GetBaggageRestrictions(service)
139139
if err != nil {
140-
h.metrics.TCollectorProxyFailures.Inc(1)
140+
h.metrics.CollectorProxyFailures.Inc(1)
141141
http.Error(w, fmt.Sprintf("collector error: %+v", err), http.StatusInternalServerError)
142142
return
143143
}

cmd/agent/app/httpserver/server_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func TestHTTPHandlerErrors(t *testing.T) {
151151
statusCode: http.StatusInternalServerError,
152152
body: "collector error: no mock response provided\n",
153153
metrics: []mTestutils.ExpectedMetric{
154-
{Name: "http-server.errors", Tags: map[string]string{"source": "tcollector-proxy", "status": "5xx"}, Value: 1},
154+
{Name: "http-server.errors", Tags: map[string]string{"source": "collector-proxy", "status": "5xx"}, Value: 1},
155155
},
156156
},
157157
{
@@ -160,7 +160,7 @@ func TestHTTPHandlerErrors(t *testing.T) {
160160
statusCode: http.StatusInternalServerError,
161161
body: "collector error: no mock response provided\n",
162162
metrics: []mTestutils.ExpectedMetric{
163-
{Name: "http-server.errors", Tags: map[string]string{"source": "tcollector-proxy", "status": "5xx"}, Value: 1},
163+
{Name: "http-server.errors", Tags: map[string]string{"source": "collector-proxy", "status": "5xx"}, Value: 1},
164164
},
165165
},
166166
{

0 commit comments

Comments
 (0)