Tracing: Use common traceID context value for opentracing and opentelemetry (#46411)
* use common traceID context value for opentracing and opentelemetry * support sampled trace IDs as well * inject traceID into NormalResponse on errors * Finally the test passed * fix the test * fix linter * change the function parameter Co-authored-by: Ying WANG <ying.wang@grafana.com>
This commit is contained in:
@@ -66,7 +66,10 @@ func TestAdminConfiguration_SendingToExternalAlertmanagers(t *testing.T) {
|
||||
resp := getRequest(t, alertsURL, http.StatusNotFound) // nolint
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
require.NoError(t, err)
|
||||
require.JSONEq(t, `{"message": "no admin configuration available"}`, string(b))
|
||||
var res map[string]interface{}
|
||||
err = json.Unmarshal(b, &res)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "no admin configuration available", res["message"])
|
||||
}
|
||||
|
||||
// An invalid alertmanager choice should return an error.
|
||||
|
||||
Reference in New Issue
Block a user