Remove typescript definitions, lives in other project

The typescript definitions now live in the separate log-schema-node
project. That project is published as an npm module and the json schema
file and typescript definition can be imported by node projects by
installing this dependency. It is no longer necessary to host and
maintain a typescript definitions file in this project.
Signed-off-by: 's avatarSnorre Magnus Davøen <snorre.davoen@nsd.uib.no>
parent c0362424
export interface LogSchema {
/**
* The version of the log-schema. Used to separate versions into different Elasticsearch indices.
*/
schemaVersion: "v3";
/**
* The time of the event. Format: RFC 3339. (E.g. 1985-04-12T23:20:50.52Z)
*/
"@timestamp": string;
/**
* Log-level (DEBUG|INFO|WARN|ERROR).
*/
levelName: ("DEBUG" | "INFO" | "WARN" | "ERROR");
/**
* Same as the message parameter in log libraries. Should contain a message describing log event.
*/
message: string;
/**
* Identification of user to which log event pertains. Can be used to view log events for specific users.
*/
userId?: string;
/**
* Name of the service. E.g. user-service.
*/
serviceName: string;
/**
* Version of the service. E.g. v2.0.2.
*/
serviceVersion: string;
serviceStack?: string;
/**
* The id of a client/user request. Used to track a single request across services.
*/
xRequestId?: string;
/**
* String tags to help categorize and/or filter log events
*/
tags?: string[];
/**
* The current hostname for the service instance.
*/
host?: string;
/**
* The current port number for the service instance.
*/
port?: number;
/**
* A regular string or stringified JSON object containing data about log event.
*/
data?: string;
/**
* The URL from which the log event was initiated.
*/
url?: string;
/**
* The number of milliseconds spent on request/process.
*/
responseTime?: number;
/**
* HTTP status code if applicable.
*/
statusCode?: number;
/**
* HTTP method if applicable.
*/
method?: string;
error?: {
/**
* A string representation of error type, e.g. NO_SUCH_VARIABLE_ERROR.
*/
type?: string;
/**
* Error code uniquely identifiying error. E.g. 4324.
*/
code: string;
/**
* Name of service where error originated if the error originated outside this service.
*/
serviceName?: string;
/**
* Stack trace for the error. Should be santizied of sensitive information if possible.
*/
stack?: string;
/**
* Any data that may be related to error in string format.
*/
data?: string;
/**
* Regular string or stringified json object of original error object
*/
originalErrorObject?: string;
};
request?: {
/**
* Request headers like Accept, If-Modified-Since, etc. Avoid logging sensitive headers!
*/
headers?: {
[k: string]: string;
};
/**
* Query parameters contained within URL. E.g. (?myvalue=foo)
*/
query?: {
[k: string]: string | string[];
};
/**
* Path parameters contained whithin URL. E.g. /resource/<pathparam>
*/
path?: {
[k: string]: string;
};
/**
* The request payload/body if applicable (POST form, json payload, etc).
*/
payload?: string;
};
response?: {
/**
* Response headers like eTag, Content-Length, etc. Avoid logging sensitive headers!
*/
headers?: {
[k: string]: string;
};
/**
* A string representation of the response body. Do not log large bodies!
*/
body?: string;
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment