Fix warning and update api-reports

Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
Julio Zynger
2022-03-01 10:49:24 +01:00
committed by Fredrik Adelöw
parent 7bb98ee655
commit b6fdf5c5f3
4 changed files with 89 additions and 19 deletions
+3 -2
View File
@@ -17,7 +17,8 @@
import { ConfigApi, DiscoveryApi } from '@backstage/core-plugin-api';
import { AggregatedError, NotFoundInInstance } from '../types';
type Options = {
/** @public */
export type PeriskopApiOptions = {
discoveryApi: DiscoveryApi;
configApi: ConfigApi;
};
@@ -36,7 +37,7 @@ export class PeriskopApi {
private readonly discoveryApi: DiscoveryApi;
private readonly instances: PeriskopInstance[];
constructor(options: Options) {
constructor(options: PeriskopApiOptions) {
this.discoveryApi = options.discoveryApi;
this.instances = options.configApi
.getConfigArray('periskop.instances')
+1
View File
@@ -21,3 +21,4 @@ export {
PERISKOP_NAME_ANNOTATION,
} from './components/PeriskopErrorsTable';
export * from './api/index';
export * from './types';
+10
View File
@@ -14,12 +14,15 @@
* limitations under the License.
*/
/** @public */
export interface AggregatedError {
aggregation_key: string;
total_count: number;
severity: string;
latest_errors: ErrorInstance[];
}
/** @public */
export interface ErrorInstance {
error: Error;
uuid: string;
@@ -27,22 +30,29 @@ export interface ErrorInstance {
severity: string;
http_context: HttpContext;
}
/** @public */
export interface Error {
class: string;
message: string;
stacktrace?: string[];
cause?: Error | null;
}
/** @public */
export interface HttpContext {
request_method: string;
request_url: string;
request_headers: RequestHeaders;
request_body: string;
}
/** @public */
export interface RequestHeaders {
[k: string]: string;
}
/** @public */
export interface NotFoundInInstance {
body: string;
}