[CORL-281] Metrics (#2298)

* feat: iunitial metrics implementation

* fix: graphql endpoint was throwing errors.

* feat: add metrics env variables to readme
This commit is contained in:
Wyatt Johnson
2019-05-10 00:26:24 +02:00
committed by Kiwi
parent df57b4eb17
commit d4b8e5ef70
21 changed files with 461 additions and 92 deletions
+12 -7
View File
@@ -172,13 +172,18 @@ export class TalkError extends VError {
this.param = param;
}
public serializeExtensions(bundle: FluentBundle): TalkErrorExtensions {
const message = translate(
bundle,
this.code,
ERROR_TRANSLATIONS[this.code],
this.context.pub
);
public serializeExtensions(bundle: FluentBundle | null): TalkErrorExtensions {
let message: string;
if (bundle) {
message = translate(
bundle,
this.code,
ERROR_TRANSLATIONS[this.code],
this.context.pub
);
} else {
message = this.code;
}
return {
id: this.id,