Skip to content

Commit

Permalink
Rename tcollector proxy metric in agent (#1182)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
pavolloffay authored Nov 15, 2018
1 parent 4cc25e6 commit 76ccd71
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
Changes by Version
==================

1.9.0 (unreleased)
------------------

#### Backend Changes

##### Breaking Changes

- Rename tcollector proxy metric in agent ([#1182](https://github.com/jaegertracing/jaeger/pull/1182), [@pavolloffay](https://github.com/pavolloffay))

The following metric:
```
jaeger_http_server_errors{source="tcollector-proxy",status="5xx"}
```
has been renamed to:
```
jaeger_http_server_errors{source="collector-proxy",status="5xx"}
```

##### New Features

##### Bug fixes, Minor Improvements

#### UI Changes

##### New Features

##### Bug Fixes, Minor Improvements


1.8.0 (2018-11-12)
------------------

Expand Down
6 changes: 3 additions & 3 deletions cmd/agent/app/httpserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type httpHandler struct {
BadRequest metrics.Counter `metric:"http-server.errors" tags:"status=4xx,source=all"`

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

// Number of bad responses due to malformed thrift
BadThriftFailures metrics.Counter `metric:"http-server.errors" tags:"status=5xx,source=thrift"`
Expand Down Expand Up @@ -107,7 +107,7 @@ func (h *httpHandler) serveSamplingHTTP(w http.ResponseWriter, r *http.Request,
}
resp, err := h.manager.GetSamplingStrategy(service)
if err != nil {
h.metrics.TCollectorProxyFailures.Inc(1)
h.metrics.CollectorProxyFailures.Inc(1)
http.Error(w, fmt.Sprintf("collector error: %+v", err), http.StatusInternalServerError)
return
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func (h *httpHandler) serveBaggageHTTP(w http.ResponseWriter, r *http.Request) {
}
resp, err := h.manager.GetBaggageRestrictions(service)
if err != nil {
h.metrics.TCollectorProxyFailures.Inc(1)
h.metrics.CollectorProxyFailures.Inc(1)
http.Error(w, fmt.Sprintf("collector error: %+v", err), http.StatusInternalServerError)
return
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/agent/app/httpserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestHTTPHandlerErrors(t *testing.T) {
statusCode: http.StatusInternalServerError,
body: "collector error: no mock response provided\n",
metrics: []mTestutils.ExpectedMetric{
{Name: "http-server.errors", Tags: map[string]string{"source": "tcollector-proxy", "status": "5xx"}, Value: 1},
{Name: "http-server.errors", Tags: map[string]string{"source": "collector-proxy", "status": "5xx"}, Value: 1},
},
},
{
Expand All @@ -160,7 +160,7 @@ func TestHTTPHandlerErrors(t *testing.T) {
statusCode: http.StatusInternalServerError,
body: "collector error: no mock response provided\n",
metrics: []mTestutils.ExpectedMetric{
{Name: "http-server.errors", Tags: map[string]string{"source": "tcollector-proxy", "status": "5xx"}, Value: 1},
{Name: "http-server.errors", Tags: map[string]string{"source": "collector-proxy", "status": "5xx"}, Value: 1},
},
},
{
Expand Down

0 comments on commit 76ccd71

Please sign in to comment.