Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename tcollector proxy metric in agent #1182

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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