diff --git a/conjure/defs/witchcraft-logging-api-3.2.0.json b/conjure/defs/witchcraft-logging-api-3.2.0.json deleted file mode 100644 index 3349fed2..00000000 --- a/conjure/defs/witchcraft-logging-api-3.2.0.json +++ /dev/null @@ -1,1996 +0,0 @@ -{ - "version" : 1, - "errors" : [ ], - "types" : [ { - "type" : "object", - "object" : { - "typeName" : { - "name" : "WrappedLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "\"wrapped.1\"" - }, { - "fieldName" : "payload", - "type" : { - "type" : "reference", - "reference" : { - "name" : "WrappedLogV1Payload", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "entityName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Artifact part of entity's maven coordinate" - }, { - "fieldName" : "entityVersion", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - } ], - "docs" : "Wraps a log entry with entity information.\n" - } - }, { - "type" : "union", - "union" : { - "typeName" : { - "name" : "WrappedLogV1Payload", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "union" : [ { - "fieldName" : "serviceLogV1", - "type" : { - "type" : "reference", - "reference" : { - "name" : "ServiceLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "requestLogV2", - "type" : { - "type" : "reference", - "reference" : { - "name" : "RequestLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "traceLogV1", - "type" : { - "type" : "reference", - "reference" : { - "name" : "TraceLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "eventLogV2", - "type" : { - "type" : "reference", - "reference" : { - "name" : "EventLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "metricLogV1", - "type" : { - "type" : "reference", - "reference" : { - "name" : "MetricLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "auditLogV2", - "type" : { - "type" : "reference", - "reference" : { - "name" : "AuditLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "diagnosticLogV1", - "type" : { - "type" : "reference", - "reference" : { - "name" : "DiagnosticLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "ServiceLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "\"service.1\"" - }, { - "fieldName" : "level", - "type" : { - "type" : "reference", - "reference" : { - "name" : "LogLevel", - "package" : "com.palantir.witchcraft.spec.logging" - } - }, - "docs" : "The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE}." - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - }, - "docs" : "RFC3339Nano UTC datetime string when the log event was emitted" - }, { - "fieldName" : "origin", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Class or file name. May include line number." - }, { - "fieldName" : "thread", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Thread name" - }, { - "fieldName" : "message", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce `unsafeParams` with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from `unsafeParams` and may leave placeholders that do not match indexes as the original placeholder text.\n" - }, { - "fieldName" : "params", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe parameters (redaction may be used to make params knowably safe, but is not required)." - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available).\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)" - }, { - "fieldName" : "stacktrace", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text.\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unredacted parameters" - }, { - "fieldName" : "tags", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Additional dimensions that describe the instance of the log event" - } ], - "docs" : "Definition of the service.1 format.\n" - } - }, { - "type" : "union", - "union" : { - "typeName" : { - "name" : "RequestLog", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "union" : [ { - "fieldName" : "v1", - "type" : { - "type" : "reference", - "reference" : { - "name" : "RequestLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "v2", - "type" : { - "type" : "reference", - "reference" : { - "name" : "RequestLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "RequestLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "method", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "HTTP method of request\n" - }, { - "fieldName" : "protocol", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Protocol, e.g. `HTTP/1.1`, `HTTP/2`\n" - }, { - "fieldName" : "path", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Path of request. If templated, the unrendered path, e.g.: `/catalog/dataset/{datasetId}`, `/{rid}/paths/contents/{path:.*}`.\n" - }, { - "fieldName" : "params", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe parameters\n" - }, { - "fieldName" : "status", - "type" : { - "type" : "primitive", - "primitive" : "INTEGER" - }, - "docs" : "HTTP status code of response\n" - }, { - "fieldName" : "requestSize", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Size of request (bytes)\n" - }, { - "fieldName" : "responseSize", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Size of response (bytes)\n" - }, { - "fieldName" : "duration", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Amount of time spent handling request (microseconds)\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unredacted parameters such as path, query and header parameters\n" - } ], - "docs" : "Definition of the request.2 format.\n" - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "RequestLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "method", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "HTTP method of request\n" - }, { - "fieldName" : "protocol", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Protocol, e.g. `HTTP/1.1`, `HTTP/2`\n" - }, { - "fieldName" : "path", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Path of request. If templated, the unrendered path, e.g.: `/catalog/dataset/{datasetId}`, `/{rid}/paths/contents/{path:.*}`.\n" - }, { - "fieldName" : "pathParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe path parameters\n" - }, { - "fieldName" : "queryParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe query parameters\n" - }, { - "fieldName" : "headerParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe header parameters\n" - }, { - "fieldName" : "bodyParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe body parameters\n" - }, { - "fieldName" : "status", - "type" : { - "type" : "primitive", - "primitive" : "INTEGER" - }, - "docs" : "HTTP status code of response\n" - }, { - "fieldName" : "requestSize", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Size of request (bytes). string to allow large numbers.\n" - }, { - "fieldName" : "responseSize", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Size of response (bytes). string to allow large numbers.\n" - }, { - "fieldName" : "duration", - "type" : { - "type" : "primitive", - "primitive" : "INTEGER" - }, - "docs" : "Amount of time spent handling request (microseconds)\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unredacted parameters such as path, query and header parameters\n" - } ], - "docs" : "Definition of the request.1 format.\n" - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "TraceLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - } - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - } - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - } - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - } - }, { - "fieldName" : "span", - "type" : { - "type" : "reference", - "reference" : { - "name" : "Span", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ], - "docs" : "Definition of the trace.1 format.\n" - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "Span", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "traceId", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "16-digit hex trace identifier\n" - }, { - "fieldName" : "id", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "16-digit hex span identifier\n" - }, { - "fieldName" : "name", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Name of the span (typically the operation/RPC/method name for corresponding to this span)\n" - }, { - "fieldName" : "parentId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "16-digit hex identifer of the parent span\n" - }, { - "fieldName" : "timestamp", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Timestamp of the start of this span (epoch microsecond value)\n" - }, { - "fieldName" : "duration", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Duration of this span (microseconds)\n" - }, { - "fieldName" : "annotations", - "type" : { - "type" : "list", - "list" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "Annotation", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - } - } ], - "docs" : "A Zipkin-compatible Span object." - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "Annotation", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "timestamp", - "type" : { - "type" : "primitive", - "primitive" : "SAFELONG" - }, - "docs" : "Time annotation was created (epoch microsecond value)\n" - }, { - "fieldName" : "value", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Value encapsulated by this annotation\n" - }, { - "fieldName" : "endpoint", - "type" : { - "type" : "reference", - "reference" : { - "name" : "Endpoint", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ], - "docs" : "A Zipkin-compatible Annotation object." - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "Endpoint", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "serviceName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Name of the service that generated the annotation\n" - }, { - "fieldName" : "ipv4", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "IPv4 address of the machine that generated this annotation (`xxx.xxx.xxx.xxx`)\n" - }, { - "fieldName" : "ipv6", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "IPv6 address of the machine that generated this annotation (standard hextet form)\n" - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "EventLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "eventName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures`\n" - }, { - "fieldName" : "eventType", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Type of event being represented, e.g. `gauge`, `histogram`, `counter`\n" - }, { - "fieldName" : "values", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Observations, measurements and context associated with the event\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unsafe metadata describing the event\n" - } ], - "docs" : "Definition of the event.1 format." - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "EventLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "eventName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures`\n" - }, { - "fieldName" : "values", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Observations, measurements and context associated with the event\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unsafe metadata describing the event\n" - }, { - "fieldName" : "tags", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Additional dimensions that describe the instance of the log event" - } ], - "docs" : "Definition of the event.2 format." - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "MetricLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "metricName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Dot-delimited name of metric, e.g. `com.foundry.compass.api.Compass.http.ping.failures`\n" - }, { - "fieldName" : "metricType", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Type of metric being represented, e.g. `gauge`, `histogram`, `counter`\n" - }, { - "fieldName" : "values", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Observations, measurements and context associated with the metric\n" - }, { - "fieldName" : "tags", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Additional dimensions that describe the instance of the metric\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unsafe metadata describing the event\n" - } ], - "docs" : "Definition of the metric.1 format." - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "BeaconLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - } - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "eventType", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Dot-delimited name for the structure of the params block, e.g. `compass.SearchEvent.v1`\n" - }, { - "fieldName" : "appName", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Name of the application that created the log\n" - }, { - "fieldName" : "appVersion", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Version of the application that created the log\n" - }, { - "fieldName" : "params", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Known-safe parameters (redaction may be used to make params knowably safe, but is not required)\n" - }, { - "fieldName" : "browserId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Browser identifier (if available)\n" - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available)\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)\n" - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unredacted parameters\n" - } ], - "docs" : "Definition of the beacon.1 format.\n" - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "AuditLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "\"audit.2\"" - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "uid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "User id (if available). This is the most downstream caller.\n" - }, { - "fieldName" : "sid", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Session id (if available)\n" - }, { - "fieldName" : "tokenId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "API token id (if available)\n" - }, { - "fieldName" : "traceId", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Zipkin trace id (if available)\n" - }, { - "fieldName" : "otherUids", - "type" : { - "type" : "list", - "list" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "All users upstream of the user currently taking an action. The first element in this list is the uid of the most upstream caller. This list does not include the `uid`.\n" - }, { - "fieldName" : "origin", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "Best-effort identifier of the originating machine, e.g. an IP address, a Kubernetes node identifier,\nor similar\n" - }, { - "fieldName" : "name", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "Name of the audit event, e.g. PUT_FILE\n" - }, { - "fieldName" : "result", - "type" : { - "type" : "reference", - "reference" : { - "name" : "AuditResult", - "package" : "com.palantir.witchcraft.spec.logging" - } - }, - "docs" : "Indicates whether the request was successful or the type of failure, e.g. ERROR or UNAUTHORIZED\n" - }, { - "fieldName" : "requestParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "The parameters known at method invocation time.\n" - }, { - "fieldName" : "resultParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Information derived within a method, commonly parts of the return value.\n" - } ], - "docs" : "Definition of the audit.2 format.\n" - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "DiagnosticLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "type", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "\"diagnostic.1\"" - }, { - "fieldName" : "time", - "type" : { - "type" : "primitive", - "primitive" : "DATETIME" - } - }, { - "fieldName" : "diagnostic", - "type" : { - "type" : "reference", - "reference" : { - "name" : "Diagnostic", - "package" : "com.palantir.witchcraft.spec.logging" - } - }, - "docs" : "The diagnostic being logged." - }, { - "fieldName" : "unsafeParams", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Unredacted parameters\n" - } ], - "docs" : "Definition of the diagnostic.1 format.\n" - } - }, { - "type" : "union", - "union" : { - "typeName" : { - "name" : "Diagnostic", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "union" : [ { - "fieldName" : "generic", - "type" : { - "type" : "reference", - "reference" : { - "name" : "GenericDiagnostic", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "threadDump", - "type" : { - "type" : "reference", - "reference" : { - "name" : "ThreadDumpV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "GenericDiagnostic", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "diagnosticType", - "type" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "docs" : "An identifier for the type of diagnostic represented." - }, { - "fieldName" : "value", - "type" : { - "type" : "primitive", - "primitive" : "ANY" - }, - "docs" : "Observations, measurements and context associated with the diagnostic." - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "ThreadDumpV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "threads", - "type" : { - "type" : "list", - "list" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "ThreadInfoV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "Information about each of the threads in the thread dump. \"Thread\" may refer to a userland thread such as a goroutine, or an OS-level thread.\n" - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "ThreadInfoV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "id", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "SAFELONG" - } - } - }, - "docs" : "The ID of the thread." - }, { - "fieldName" : "name", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "The name of the thread. Note that thread names may include unsafe information such as the path of the HTTP request being processed. It must be safely redacted.\n" - }, { - "fieldName" : "stackTrace", - "type" : { - "type" : "list", - "list" : { - "itemType" : { - "type" : "reference", - "reference" : { - "name" : "StackFrameV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } - }, - "docs" : "A list of stack frames for the thread, ordered with the current frame first.\n" - }, { - "fieldName" : "params", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Other thread-level information." - } ] - } - }, { - "type" : "object", - "object" : { - "typeName" : { - "name" : "StackFrameV1", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "fields" : [ { - "fieldName" : "address", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "The address of the execution point of this stack frame. This is a string because a safelong can't represent the full 64 bit address space.\n" - }, { - "fieldName" : "procedure", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "The identifier of the procedure containing the execution point of this stack frame. This is a fully qualified method name in Java and a demangled symbol name in native code, for example. Note that procedure names may include unsafe information if a service is, for exmaple, running user-defined code. It must be safely redacted.\n" - }, { - "fieldName" : "file", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, - "docs" : "The name of the file containing the source location of the execution point of this stack frame. Note that file names may include unsafe information if a service is, for example, running user-defined code. It must be safely redacted.\n" - }, { - "fieldName" : "line", - "type" : { - "type" : "optional", - "optional" : { - "itemType" : { - "type" : "primitive", - "primitive" : "INTEGER" - } - } - }, - "docs" : "The line number of the source location of the execution point of this stack frame.\n" - }, { - "fieldName" : "params", - "type" : { - "type" : "map", - "map" : { - "keyType" : { - "type" : "primitive", - "primitive" : "STRING" - }, - "valueType" : { - "type" : "primitive", - "primitive" : "ANY" - } - } - }, - "docs" : "Other frame-level information." - } ] - } - }, { - "type" : "enum", - "enum" : { - "typeName" : { - "name" : "AuditResult", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "values" : [ { - "value" : "SUCCESS" - }, { - "value" : "UNAUTHORIZED" - }, { - "value" : "ERROR" - } ] - } - }, { - "type" : "union", - "union" : { - "typeName" : { - "name" : "UnionEventLog", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "union" : [ { - "fieldName" : "eventLog", - "type" : { - "type" : "reference", - "reference" : { - "name" : "EventLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "eventLogV2", - "type" : { - "type" : "reference", - "reference" : { - "name" : "EventLogV2", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - }, { - "fieldName" : "beaconLog", - "type" : { - "type" : "reference", - "reference" : { - "name" : "BeaconLogV1", - "package" : "com.palantir.witchcraft.spec.logging" - } - } - } ], - "docs" : "Union type containing log types that are logged to event.log." - } - }, { - "type" : "enum", - "enum" : { - "typeName" : { - "name" : "LogLevel", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "values" : [ { - "value" : "FATAL" - }, { - "value" : "ERROR" - }, { - "value" : "WARN" - }, { - "value" : "INFO" - }, { - "value" : "DEBUG" - }, { - "value" : "TRACE" - } ] - } - }, { - "type" : "alias", - "alias" : { - "typeName" : { - "name" : "UserId", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "alias" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, { - "type" : "alias", - "alias" : { - "typeName" : { - "name" : "SessionId", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "alias" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, { - "type" : "alias", - "alias" : { - "typeName" : { - "name" : "TokenId", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "alias" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - }, { - "type" : "alias", - "alias" : { - "typeName" : { - "name" : "TraceId", - "package" : "com.palantir.witchcraft.spec.logging" - }, - "alias" : { - "type" : "primitive", - "primitive" : "STRING" - } - } - } ], - "services" : [ ] -} \ No newline at end of file diff --git a/conjure/witchcraft/spec/logging/aliases.conjure.go b/conjure/witchcraft/api/logging/aliases.conjure.go similarity index 100% rename from conjure/witchcraft/spec/logging/aliases.conjure.go rename to conjure/witchcraft/api/logging/aliases.conjure.go index feaa60d6..f64445ae 100644 --- a/conjure/witchcraft/spec/logging/aliases.conjure.go +++ b/conjure/witchcraft/api/logging/aliases.conjure.go @@ -2,7 +2,7 @@ package logging -type UserId string +type TraceId string type SessionId string type TokenId string -type TraceId string +type UserId string diff --git a/conjure/witchcraft/spec/logging/enums.conjure.go b/conjure/witchcraft/api/logging/enums.conjure.go similarity index 100% rename from conjure/witchcraft/spec/logging/enums.conjure.go rename to conjure/witchcraft/api/logging/enums.conjure.go diff --git a/conjure/witchcraft/spec/logging/structs.conjure.go b/conjure/witchcraft/api/logging/structs.conjure.go similarity index 100% rename from conjure/witchcraft/spec/logging/structs.conjure.go rename to conjure/witchcraft/api/logging/structs.conjure.go index 1c761638..004e6232 100644 --- a/conjure/witchcraft/spec/logging/structs.conjure.go +++ b/conjure/witchcraft/api/logging/structs.conjure.go @@ -8,111 +8,185 @@ import ( "github.com/palantir/conjure-go/conjure/types/conjuretype" ) -// Wraps a log entry with entity information. -type WrappedLogV1 struct { - // "wrapped.1" - Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"wrapped.1\""` - Payload WrappedLogV1Payload `json:"payload" yaml:"payload,omitempty"` - // Artifact part of entity's maven coordinate - EntityName string `json:"entityName" yaml:"entityName,omitempty" conjure-docs:"Artifact part of entity's maven coordinate"` - EntityVersion string `json:"entityVersion" yaml:"entityVersion,omitempty"` -} - -// Definition of the service.1 format. -type ServiceLogV1 struct { - // "service.1" - Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"service.1\""` - // The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE}. - Level LogLevel `json:"level" yaml:"level,omitempty" conjure-docs:"The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE}."` - // RFC3339Nano UTC datetime string when the log event was emitted - Time conjuretype.DateTime `json:"time" yaml:"time,omitempty" conjure-docs:"RFC3339Nano UTC datetime string when the log event was emitted"` - // Class or file name. May include line number. - Origin *string `json:"origin" yaml:"origin,omitempty" conjure-docs:"Class or file name. May include line number."` - // Thread name - Thread *string `json:"thread" yaml:"thread,omitempty" conjure-docs:"Thread name"` - // Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce `unsafeParams` with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from `unsafeParams` and may leave placeholders that do not match indexes as the original placeholder text. - Message string `json:"message" yaml:"message,omitempty" conjure-docs:"Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce \"unsafeParams\" with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from \"unsafeParams\" and may leave placeholders that do not match indexes as the original placeholder text.\n"` - // Known-safe parameters (redaction may be used to make params knowably safe, but is not required). - Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Known-safe parameters (redaction may be used to make params knowably safe, but is not required)."` - // User id (if available). - Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available).\n"` +// Definition of the audit.2 format. +type AuditLogV2 struct { + // "audit.2" + Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"audit.2\""` + Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` + // User id (if available). This is the most downstream caller. + Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available). This is the most downstream caller.\n"` // Session id (if available) - Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)"` + Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` // API token id (if available) - TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)"` + TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` // Zipkin trace id (if available) - TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)"` - // Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text. - Stacktrace *string `json:"stacktrace" yaml:"stacktrace,omitempty" conjure-docs:"Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text.\n"` - // Unredacted parameters - UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters"` - // Additional dimensions that describe the instance of the log event - Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the log event"` + TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` + // All users upstream of the user currently taking an action. The first element in this list is the uid of the most upstream caller. This list does not include the `uid`. + OtherUids []UserId `json:"otherUids" yaml:"otherUids,omitempty" conjure-docs:"All users upstream of the user currently taking an action. The first element in this list is the uid of the most upstream caller. This list does not include the \"uid\".\n"` + // Best-effort identifier of the originating machine, e.g. an IP address, a Kubernetes node identifier, + // or similar + Origin *string `json:"origin" yaml:"origin,omitempty" conjure-docs:"Best-effort identifier of the originating machine, e.g. an IP address, a Kubernetes node identifier,\nor similar\n"` + // Name of the audit event, e.g. PUT_FILE + Name string `json:"name" yaml:"name,omitempty" conjure-docs:"Name of the audit event, e.g. PUT_FILE\n"` + // Indicates whether the request was successful or the type of failure, e.g. ERROR or UNAUTHORIZED + Result AuditResult `json:"result" yaml:"result,omitempty" conjure-docs:"Indicates whether the request was successful or the type of failure, e.g. ERROR or UNAUTHORIZED\n"` + // The parameters known at method invocation time. + RequestParams map[string]interface{} `json:"requestParams" yaml:"requestParams,omitempty" conjure-docs:"The parameters known at method invocation time.\n"` + // Information derived within a method, commonly parts of the return value. + ResultParams map[string]interface{} `json:"resultParams" yaml:"resultParams,omitempty" conjure-docs:"Information derived within a method, commonly parts of the return value.\n"` } -func (o ServiceLogV1) MarshalJSON() ([]byte, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) +func (o AuditLogV2) MarshalJSON() ([]byte, error) { + if o.OtherUids == nil { + o.OtherUids = make([]UserId, 0) } - if o.UnsafeParams == nil { - o.UnsafeParams = make(map[string]interface{}, 0) + if o.RequestParams == nil { + o.RequestParams = make(map[string]interface{}, 0) } - if o.Tags == nil { - o.Tags = make(map[string]string, 0) + if o.ResultParams == nil { + o.ResultParams = make(map[string]interface{}, 0) } - type ServiceLogV1Alias ServiceLogV1 - return json.Marshal(ServiceLogV1Alias(o)) + type AuditLogV2Alias AuditLogV2 + return json.Marshal(AuditLogV2Alias(o)) } -func (o *ServiceLogV1) UnmarshalJSON(data []byte) error { - type ServiceLogV1Alias ServiceLogV1 - var rawServiceLogV1 ServiceLogV1Alias - if err := json.Unmarshal(data, &rawServiceLogV1); err != nil { +func (o *AuditLogV2) UnmarshalJSON(data []byte) error { + type AuditLogV2Alias AuditLogV2 + var rawAuditLogV2 AuditLogV2Alias + if err := json.Unmarshal(data, &rawAuditLogV2); err != nil { return err } - if rawServiceLogV1.Params == nil { - rawServiceLogV1.Params = make(map[string]interface{}, 0) + if rawAuditLogV2.OtherUids == nil { + rawAuditLogV2.OtherUids = make([]UserId, 0) } - if rawServiceLogV1.UnsafeParams == nil { - rawServiceLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawAuditLogV2.RequestParams == nil { + rawAuditLogV2.RequestParams = make(map[string]interface{}, 0) } - if rawServiceLogV1.Tags == nil { - rawServiceLogV1.Tags = make(map[string]string, 0) + if rawAuditLogV2.ResultParams == nil { + rawAuditLogV2.ResultParams = make(map[string]interface{}, 0) } - *o = ServiceLogV1(rawServiceLogV1) + *o = AuditLogV2(rawAuditLogV2) return nil } -func (o ServiceLogV1) MarshalYAML() (interface{}, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) +func (o AuditLogV2) MarshalYAML() (interface{}, error) { + if o.OtherUids == nil { + o.OtherUids = make([]UserId, 0) + } + if o.RequestParams == nil { + o.RequestParams = make(map[string]interface{}, 0) + } + if o.ResultParams == nil { + o.ResultParams = make(map[string]interface{}, 0) + } + type AuditLogV2Alias AuditLogV2 + return AuditLogV2Alias(o), nil +} + +func (o *AuditLogV2) UnmarshalYAML(unmarshal func(interface{}) error) error { + type AuditLogV2Alias AuditLogV2 + var rawAuditLogV2 AuditLogV2Alias + if err := unmarshal(&rawAuditLogV2); err != nil { + return err + } + if rawAuditLogV2.OtherUids == nil { + rawAuditLogV2.OtherUids = make([]UserId, 0) + } + if rawAuditLogV2.RequestParams == nil { + rawAuditLogV2.RequestParams = make(map[string]interface{}, 0) + } + if rawAuditLogV2.ResultParams == nil { + rawAuditLogV2.ResultParams = make(map[string]interface{}, 0) + } + *o = AuditLogV2(rawAuditLogV2) + return nil +} + +// Definition of the metric.1 format. +type MetricLogV1 struct { + Type string `json:"type" yaml:"type,omitempty"` + Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` + // Dot-delimited name of metric, e.g. `com.foundry.compass.api.Compass.http.ping.failures` + MetricName string `json:"metricName" yaml:"metricName,omitempty" conjure-docs:"Dot-delimited name of metric, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` + // Type of metric being represented, e.g. `gauge`, `histogram`, `counter` + MetricType string `json:"metricType" yaml:"metricType,omitempty" conjure-docs:"Type of metric being represented, e.g. \"gauge\", \"histogram\", \"counter\"\n"` + // Observations, measurements and context associated with the metric + Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the metric\n"` + // Additional dimensions that describe the instance of the metric + Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the metric\n"` + // User id (if available) + Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` + // Session id (if available) + Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` + // API token id (if available) + TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` + // Unsafe metadata describing the event + UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unsafe metadata describing the event\n"` +} + +func (o MetricLogV1) MarshalJSON() ([]byte, error) { + if o.Values == nil { + o.Values = make(map[string]interface{}, 0) + } + if o.Tags == nil { + o.Tags = make(map[string]string, 0) } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } + type MetricLogV1Alias MetricLogV1 + return json.Marshal(MetricLogV1Alias(o)) +} + +func (o *MetricLogV1) UnmarshalJSON(data []byte) error { + type MetricLogV1Alias MetricLogV1 + var rawMetricLogV1 MetricLogV1Alias + if err := json.Unmarshal(data, &rawMetricLogV1); err != nil { + return err + } + if rawMetricLogV1.Values == nil { + rawMetricLogV1.Values = make(map[string]interface{}, 0) + } + if rawMetricLogV1.Tags == nil { + rawMetricLogV1.Tags = make(map[string]string, 0) + } + if rawMetricLogV1.UnsafeParams == nil { + rawMetricLogV1.UnsafeParams = make(map[string]interface{}, 0) + } + *o = MetricLogV1(rawMetricLogV1) + return nil +} + +func (o MetricLogV1) MarshalYAML() (interface{}, error) { + if o.Values == nil { + o.Values = make(map[string]interface{}, 0) + } if o.Tags == nil { o.Tags = make(map[string]string, 0) } - type ServiceLogV1Alias ServiceLogV1 - return ServiceLogV1Alias(o), nil + if o.UnsafeParams == nil { + o.UnsafeParams = make(map[string]interface{}, 0) + } + type MetricLogV1Alias MetricLogV1 + return MetricLogV1Alias(o), nil } -func (o *ServiceLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type ServiceLogV1Alias ServiceLogV1 - var rawServiceLogV1 ServiceLogV1Alias - if err := unmarshal(&rawServiceLogV1); err != nil { +func (o *MetricLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type MetricLogV1Alias MetricLogV1 + var rawMetricLogV1 MetricLogV1Alias + if err := unmarshal(&rawMetricLogV1); err != nil { return err } - if rawServiceLogV1.Params == nil { - rawServiceLogV1.Params = make(map[string]interface{}, 0) + if rawMetricLogV1.Values == nil { + rawMetricLogV1.Values = make(map[string]interface{}, 0) } - if rawServiceLogV1.UnsafeParams == nil { - rawServiceLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawMetricLogV1.Tags == nil { + rawMetricLogV1.Tags = make(map[string]string, 0) } - if rawServiceLogV1.Tags == nil { - rawServiceLogV1.Tags = make(map[string]string, 0) + if rawMetricLogV1.UnsafeParams == nil { + rawMetricLogV1.UnsafeParams = make(map[string]interface{}, 0) } - *o = ServiceLogV1(rawServiceLogV1) + *o = MetricLogV1(rawMetricLogV1) return nil } @@ -202,134 +276,6 @@ func (o *RequestLogV2) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -// Definition of the request.1 format. -type RequestLogV1 struct { - Type string `json:"type" yaml:"type,omitempty"` - Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // HTTP method of request - Method *string `json:"method" yaml:"method,omitempty" conjure-docs:"HTTP method of request\n"` - // Protocol, e.g. `HTTP/1.1`, `HTTP/2` - Protocol string `json:"protocol" yaml:"protocol,omitempty" conjure-docs:"Protocol, e.g. \"HTTP/1.1\", \"HTTP/2\"\n"` - // Path of request. If templated, the unrendered path, e.g.: `/catalog/dataset/{datasetId}`, `/{rid}/paths/contents/{path:.*}`. - Path string `json:"path" yaml:"path,omitempty" conjure-docs:"Path of request. If templated, the unrendered path, e.g.: \"/catalog/dataset/{datasetId}\", \"/{rid}/paths/contents/{path:.*}\".\n"` - // Known-safe path parameters - PathParams map[string]interface{} `json:"pathParams" yaml:"pathParams,omitempty" conjure-docs:"Known-safe path parameters\n"` - // Known-safe query parameters - QueryParams map[string]interface{} `json:"queryParams" yaml:"queryParams,omitempty" conjure-docs:"Known-safe query parameters\n"` - // Known-safe header parameters - HeaderParams map[string]interface{} `json:"headerParams" yaml:"headerParams,omitempty" conjure-docs:"Known-safe header parameters\n"` - // Known-safe body parameters - BodyParams map[string]interface{} `json:"bodyParams" yaml:"bodyParams,omitempty" conjure-docs:"Known-safe body parameters\n"` - // HTTP status code of response - Status int `json:"status" yaml:"status,omitempty" conjure-docs:"HTTP status code of response\n"` - // Size of request (bytes). string to allow large numbers. - RequestSize string `json:"requestSize" yaml:"requestSize,omitempty" conjure-docs:"Size of request (bytes). string to allow large numbers.\n"` - // Size of response (bytes). string to allow large numbers. - ResponseSize string `json:"responseSize" yaml:"responseSize,omitempty" conjure-docs:"Size of response (bytes). string to allow large numbers.\n"` - // Amount of time spent handling request (microseconds) - Duration int `json:"duration" yaml:"duration,omitempty" conjure-docs:"Amount of time spent handling request (microseconds)\n"` - // User id (if available) - Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` - // Session id (if available) - Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` - // API token id (if available) - TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` - // Zipkin trace id (if available) - TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` - // Unredacted parameters such as path, query and header parameters - UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters such as path, query and header parameters\n"` -} - -func (o RequestLogV1) MarshalJSON() ([]byte, error) { - if o.PathParams == nil { - o.PathParams = make(map[string]interface{}, 0) - } - if o.QueryParams == nil { - o.QueryParams = make(map[string]interface{}, 0) - } - if o.HeaderParams == nil { - o.HeaderParams = make(map[string]interface{}, 0) - } - if o.BodyParams == nil { - o.BodyParams = make(map[string]interface{}, 0) - } - if o.UnsafeParams == nil { - o.UnsafeParams = make(map[string]interface{}, 0) - } - type RequestLogV1Alias RequestLogV1 - return json.Marshal(RequestLogV1Alias(o)) -} - -func (o *RequestLogV1) UnmarshalJSON(data []byte) error { - type RequestLogV1Alias RequestLogV1 - var rawRequestLogV1 RequestLogV1Alias - if err := json.Unmarshal(data, &rawRequestLogV1); err != nil { - return err - } - if rawRequestLogV1.PathParams == nil { - rawRequestLogV1.PathParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.QueryParams == nil { - rawRequestLogV1.QueryParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.HeaderParams == nil { - rawRequestLogV1.HeaderParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.BodyParams == nil { - rawRequestLogV1.BodyParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.UnsafeParams == nil { - rawRequestLogV1.UnsafeParams = make(map[string]interface{}, 0) - } - *o = RequestLogV1(rawRequestLogV1) - return nil -} - -func (o RequestLogV1) MarshalYAML() (interface{}, error) { - if o.PathParams == nil { - o.PathParams = make(map[string]interface{}, 0) - } - if o.QueryParams == nil { - o.QueryParams = make(map[string]interface{}, 0) - } - if o.HeaderParams == nil { - o.HeaderParams = make(map[string]interface{}, 0) - } - if o.BodyParams == nil { - o.BodyParams = make(map[string]interface{}, 0) - } - if o.UnsafeParams == nil { - o.UnsafeParams = make(map[string]interface{}, 0) - } - type RequestLogV1Alias RequestLogV1 - return RequestLogV1Alias(o), nil -} - -func (o *RequestLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type RequestLogV1Alias RequestLogV1 - var rawRequestLogV1 RequestLogV1Alias - if err := unmarshal(&rawRequestLogV1); err != nil { - return err - } - if rawRequestLogV1.PathParams == nil { - rawRequestLogV1.PathParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.QueryParams == nil { - rawRequestLogV1.QueryParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.HeaderParams == nil { - rawRequestLogV1.HeaderParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.BodyParams == nil { - rawRequestLogV1.BodyParams = make(map[string]interface{}, 0) - } - if rawRequestLogV1.UnsafeParams == nil { - rawRequestLogV1.UnsafeParams = make(map[string]interface{}, 0) - } - *o = RequestLogV1(rawRequestLogV1) - return nil -} - // Definition of the trace.1 format. type TraceLogV1 struct { Type string `json:"type" yaml:"type,omitempty"` @@ -383,257 +329,258 @@ func (o *TraceLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -// A Zipkin-compatible Span object. -type Span struct { - // 16-digit hex trace identifier - TraceId string `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"16-digit hex trace identifier\n"` - // 16-digit hex span identifier - Id string `json:"id" yaml:"id,omitempty" conjure-docs:"16-digit hex span identifier\n"` - // Name of the span (typically the operation/RPC/method name for corresponding to this span) - Name string `json:"name" yaml:"name,omitempty" conjure-docs:"Name of the span (typically the operation/RPC/method name for corresponding to this span)\n"` - // 16-digit hex identifer of the parent span - ParentId *string `json:"parentId" yaml:"parentId,omitempty" conjure-docs:"16-digit hex identifer of the parent span\n"` - // Timestamp of the start of this span (epoch microsecond value) - Timestamp conjuretype.SafeLong `json:"timestamp" yaml:"timestamp,omitempty" conjure-docs:"Timestamp of the start of this span (epoch microsecond value)\n"` - // Duration of this span (microseconds) - Duration conjuretype.SafeLong `json:"duration" yaml:"duration,omitempty" conjure-docs:"Duration of this span (microseconds)\n"` - Annotations []Annotation `json:"annotations" yaml:"annotations,omitempty"` +// Definition of the service.1 format. +type ServiceLogV1 struct { + // "service.1" + Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"service.1\""` + // The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE}. + Level LogLevel `json:"level" yaml:"level,omitempty" conjure-docs:"The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE}."` + // RFC3339Nano UTC datetime string when the log event was emitted + Time conjuretype.DateTime `json:"time" yaml:"time,omitempty" conjure-docs:"RFC3339Nano UTC datetime string when the log event was emitted"` + // Class or file name. May include line number. + Origin *string `json:"origin" yaml:"origin,omitempty" conjure-docs:"Class or file name. May include line number."` + // Thread name + Thread *string `json:"thread" yaml:"thread,omitempty" conjure-docs:"Thread name"` + // Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce `unsafeParams` with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from `unsafeParams` and may leave placeholders that do not match indexes as the original placeholder text. + Message string `json:"message" yaml:"message,omitempty" conjure-docs:"Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce \"unsafeParams\" with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from \"unsafeParams\" and may leave placeholders that do not match indexes as the original placeholder text.\n"` + // Known-safe parameters (redaction may be used to make params knowably safe, but is not required). + Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Known-safe parameters (redaction may be used to make params knowably safe, but is not required)."` + // User id (if available). + Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available).\n"` + // Session id (if available) + Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)"` + // API token id (if available) + TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)"` + // Zipkin trace id (if available) + TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)"` + // Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text. + Stacktrace *string `json:"stacktrace" yaml:"stacktrace,omitempty" conjure-docs:"Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text.\n"` + // Unredacted parameters + UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters"` + // Additional dimensions that describe the instance of the log event + Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the log event"` } -func (o Span) MarshalJSON() ([]byte, error) { - if o.Annotations == nil { - o.Annotations = make([]Annotation, 0) +func (o ServiceLogV1) MarshalJSON() ([]byte, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) } - type SpanAlias Span - return json.Marshal(SpanAlias(o)) + if o.UnsafeParams == nil { + o.UnsafeParams = make(map[string]interface{}, 0) + } + if o.Tags == nil { + o.Tags = make(map[string]string, 0) + } + type ServiceLogV1Alias ServiceLogV1 + return json.Marshal(ServiceLogV1Alias(o)) } -func (o *Span) UnmarshalJSON(data []byte) error { - type SpanAlias Span - var rawSpan SpanAlias - if err := json.Unmarshal(data, &rawSpan); err != nil { +func (o *ServiceLogV1) UnmarshalJSON(data []byte) error { + type ServiceLogV1Alias ServiceLogV1 + var rawServiceLogV1 ServiceLogV1Alias + if err := json.Unmarshal(data, &rawServiceLogV1); err != nil { return err } - if rawSpan.Annotations == nil { - rawSpan.Annotations = make([]Annotation, 0) + if rawServiceLogV1.Params == nil { + rawServiceLogV1.Params = make(map[string]interface{}, 0) } - *o = Span(rawSpan) + if rawServiceLogV1.UnsafeParams == nil { + rawServiceLogV1.UnsafeParams = make(map[string]interface{}, 0) + } + if rawServiceLogV1.Tags == nil { + rawServiceLogV1.Tags = make(map[string]string, 0) + } + *o = ServiceLogV1(rawServiceLogV1) return nil } -func (o Span) MarshalYAML() (interface{}, error) { - if o.Annotations == nil { - o.Annotations = make([]Annotation, 0) +func (o ServiceLogV1) MarshalYAML() (interface{}, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) } - type SpanAlias Span - return SpanAlias(o), nil + if o.UnsafeParams == nil { + o.UnsafeParams = make(map[string]interface{}, 0) + } + if o.Tags == nil { + o.Tags = make(map[string]string, 0) + } + type ServiceLogV1Alias ServiceLogV1 + return ServiceLogV1Alias(o), nil } -func (o *Span) UnmarshalYAML(unmarshal func(interface{}) error) error { - type SpanAlias Span - var rawSpan SpanAlias - if err := unmarshal(&rawSpan); err != nil { +func (o *ServiceLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type ServiceLogV1Alias ServiceLogV1 + var rawServiceLogV1 ServiceLogV1Alias + if err := unmarshal(&rawServiceLogV1); err != nil { return err } - if rawSpan.Annotations == nil { - rawSpan.Annotations = make([]Annotation, 0) + if rawServiceLogV1.Params == nil { + rawServiceLogV1.Params = make(map[string]interface{}, 0) } - *o = Span(rawSpan) + if rawServiceLogV1.UnsafeParams == nil { + rawServiceLogV1.UnsafeParams = make(map[string]interface{}, 0) + } + if rawServiceLogV1.Tags == nil { + rawServiceLogV1.Tags = make(map[string]string, 0) + } + *o = ServiceLogV1(rawServiceLogV1) return nil } -// A Zipkin-compatible Annotation object. -type Annotation struct { - // Time annotation was created (epoch microsecond value) - Timestamp conjuretype.SafeLong `json:"timestamp" yaml:"timestamp,omitempty" conjure-docs:"Time annotation was created (epoch microsecond value)\n"` - // Value encapsulated by this annotation - Value string `json:"value" yaml:"value,omitempty" conjure-docs:"Value encapsulated by this annotation\n"` - Endpoint Endpoint `json:"endpoint" yaml:"endpoint,omitempty"` -} - -type Endpoint struct { - // Name of the service that generated the annotation - ServiceName string `json:"serviceName" yaml:"serviceName,omitempty" conjure-docs:"Name of the service that generated the annotation\n"` - // IPv4 address of the machine that generated this annotation (`xxx.xxx.xxx.xxx`) - Ipv4 *string `json:"ipv4" yaml:"ipv4,omitempty" conjure-docs:"IPv4 address of the machine that generated this annotation (\"xxx.xxx.xxx.xxx\")\n"` - // IPv6 address of the machine that generated this annotation (standard hextet form) - Ipv6 *string `json:"ipv6" yaml:"ipv6,omitempty" conjure-docs:"IPv6 address of the machine that generated this annotation (standard hextet form)\n"` -} - -// Definition of the event.1 format. -type EventLogV1 struct { +// Definition of the beacon.1 format. +type BeaconLogV1 struct { Type string `json:"type" yaml:"type,omitempty"` Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures` - EventName string `json:"eventName" yaml:"eventName,omitempty" conjure-docs:"Dot-delimited name of event, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` - // Type of event being represented, e.g. `gauge`, `histogram`, `counter` - EventType string `json:"eventType" yaml:"eventType,omitempty" conjure-docs:"Type of event being represented, e.g. \"gauge\", \"histogram\", \"counter\"\n"` - // Observations, measurements and context associated with the event - Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the event\n"` + // Dot-delimited name for the structure of the params block, e.g. `compass.SearchEvent.v1` + EventType string `json:"eventType" yaml:"eventType,omitempty" conjure-docs:"Dot-delimited name for the structure of the params block, e.g. \"compass.SearchEvent.v1\"\n"` + // Name of the application that created the log + AppName string `json:"appName" yaml:"appName,omitempty" conjure-docs:"Name of the application that created the log\n"` + // Version of the application that created the log + AppVersion string `json:"appVersion" yaml:"appVersion,omitempty" conjure-docs:"Version of the application that created the log\n"` + // Known-safe parameters (redaction may be used to make params knowably safe, but is not required) + Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Known-safe parameters (redaction may be used to make params knowably safe, but is not required)\n"` + // Browser identifier (if available) + BrowserId *string `json:"browserId" yaml:"browserId,omitempty" conjure-docs:"Browser identifier (if available)\n"` // User id (if available) Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` // Session id (if available) Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` - // API token id (if available) - TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` - // Unsafe metadata describing the event - UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unsafe metadata describing the event\n"` + // Zipkin trace id (if available) + TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` + // Unredacted parameters + UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters\n"` } -func (o EventLogV1) MarshalJSON() ([]byte, error) { - if o.Values == nil { - o.Values = make(map[string]interface{}, 0) +func (o BeaconLogV1) MarshalJSON() ([]byte, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type EventLogV1Alias EventLogV1 - return json.Marshal(EventLogV1Alias(o)) + type BeaconLogV1Alias BeaconLogV1 + return json.Marshal(BeaconLogV1Alias(o)) } -func (o *EventLogV1) UnmarshalJSON(data []byte) error { - type EventLogV1Alias EventLogV1 - var rawEventLogV1 EventLogV1Alias - if err := json.Unmarshal(data, &rawEventLogV1); err != nil { +func (o *BeaconLogV1) UnmarshalJSON(data []byte) error { + type BeaconLogV1Alias BeaconLogV1 + var rawBeaconLogV1 BeaconLogV1Alias + if err := json.Unmarshal(data, &rawBeaconLogV1); err != nil { return err } - if rawEventLogV1.Values == nil { - rawEventLogV1.Values = make(map[string]interface{}, 0) + if rawBeaconLogV1.Params == nil { + rawBeaconLogV1.Params = make(map[string]interface{}, 0) } - if rawEventLogV1.UnsafeParams == nil { - rawEventLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawBeaconLogV1.UnsafeParams == nil { + rawBeaconLogV1.UnsafeParams = make(map[string]interface{}, 0) } - *o = EventLogV1(rawEventLogV1) + *o = BeaconLogV1(rawBeaconLogV1) return nil } -func (o EventLogV1) MarshalYAML() (interface{}, error) { - if o.Values == nil { - o.Values = make(map[string]interface{}, 0) +func (o BeaconLogV1) MarshalYAML() (interface{}, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type EventLogV1Alias EventLogV1 - return EventLogV1Alias(o), nil + type BeaconLogV1Alias BeaconLogV1 + return BeaconLogV1Alias(o), nil } -func (o *EventLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type EventLogV1Alias EventLogV1 - var rawEventLogV1 EventLogV1Alias - if err := unmarshal(&rawEventLogV1); err != nil { +func (o *BeaconLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type BeaconLogV1Alias BeaconLogV1 + var rawBeaconLogV1 BeaconLogV1Alias + if err := unmarshal(&rawBeaconLogV1); err != nil { return err } - if rawEventLogV1.Values == nil { - rawEventLogV1.Values = make(map[string]interface{}, 0) + if rawBeaconLogV1.Params == nil { + rawBeaconLogV1.Params = make(map[string]interface{}, 0) } - if rawEventLogV1.UnsafeParams == nil { - rawEventLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawBeaconLogV1.UnsafeParams == nil { + rawBeaconLogV1.UnsafeParams = make(map[string]interface{}, 0) } - *o = EventLogV1(rawEventLogV1) + *o = BeaconLogV1(rawBeaconLogV1) return nil } -// Definition of the event.2 format. -type EventLogV2 struct { - Type string `json:"type" yaml:"type,omitempty"` - Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures` - EventName string `json:"eventName" yaml:"eventName,omitempty" conjure-docs:"Dot-delimited name of event, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` - // Observations, measurements and context associated with the event - Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the event\n"` - // User id (if available) - Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` - // Session id (if available) - Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` - // API token id (if available) - TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` - // Zipkin trace id (if available) - TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` - // Unsafe metadata describing the event - UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unsafe metadata describing the event\n"` - // Additional dimensions that describe the instance of the log event - Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the log event"` +// Wraps a log entry with entity information. +type WrappedLogV1 struct { + // "wrapped.1" + Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"wrapped.1\""` + Payload WrappedLogV1Payload `json:"payload" yaml:"payload,omitempty"` + // Artifact part of entity's maven coordinate + EntityName string `json:"entityName" yaml:"entityName,omitempty" conjure-docs:"Artifact part of entity's maven coordinate"` + EntityVersion string `json:"entityVersion" yaml:"entityVersion,omitempty"` } -func (o EventLogV2) MarshalJSON() ([]byte, error) { - if o.Values == nil { - o.Values = make(map[string]interface{}, 0) - } - if o.UnsafeParams == nil { - o.UnsafeParams = make(map[string]interface{}, 0) - } - if o.Tags == nil { - o.Tags = make(map[string]string, 0) +type ThreadDumpV1 struct { + // Information about each of the threads in the thread dump. "Thread" may refer to a userland thread such as a goroutine, or an OS-level thread. + Threads []ThreadInfoV1 `json:"threads" yaml:"threads,omitempty" conjure-docs:"Information about each of the threads in the thread dump. \"Thread\" may refer to a userland thread such as a goroutine, or an OS-level thread.\n"` +} + +func (o ThreadDumpV1) MarshalJSON() ([]byte, error) { + if o.Threads == nil { + o.Threads = make([]ThreadInfoV1, 0) } - type EventLogV2Alias EventLogV2 - return json.Marshal(EventLogV2Alias(o)) + type ThreadDumpV1Alias ThreadDumpV1 + return json.Marshal(ThreadDumpV1Alias(o)) } -func (o *EventLogV2) UnmarshalJSON(data []byte) error { - type EventLogV2Alias EventLogV2 - var rawEventLogV2 EventLogV2Alias - if err := json.Unmarshal(data, &rawEventLogV2); err != nil { +func (o *ThreadDumpV1) UnmarshalJSON(data []byte) error { + type ThreadDumpV1Alias ThreadDumpV1 + var rawThreadDumpV1 ThreadDumpV1Alias + if err := json.Unmarshal(data, &rawThreadDumpV1); err != nil { return err } - if rawEventLogV2.Values == nil { - rawEventLogV2.Values = make(map[string]interface{}, 0) - } - if rawEventLogV2.UnsafeParams == nil { - rawEventLogV2.UnsafeParams = make(map[string]interface{}, 0) - } - if rawEventLogV2.Tags == nil { - rawEventLogV2.Tags = make(map[string]string, 0) + if rawThreadDumpV1.Threads == nil { + rawThreadDumpV1.Threads = make([]ThreadInfoV1, 0) } - *o = EventLogV2(rawEventLogV2) + *o = ThreadDumpV1(rawThreadDumpV1) return nil } -func (o EventLogV2) MarshalYAML() (interface{}, error) { - if o.Values == nil { - o.Values = make(map[string]interface{}, 0) - } - if o.UnsafeParams == nil { - o.UnsafeParams = make(map[string]interface{}, 0) - } - if o.Tags == nil { - o.Tags = make(map[string]string, 0) +func (o ThreadDumpV1) MarshalYAML() (interface{}, error) { + if o.Threads == nil { + o.Threads = make([]ThreadInfoV1, 0) } - type EventLogV2Alias EventLogV2 - return EventLogV2Alias(o), nil + type ThreadDumpV1Alias ThreadDumpV1 + return ThreadDumpV1Alias(o), nil } -func (o *EventLogV2) UnmarshalYAML(unmarshal func(interface{}) error) error { - type EventLogV2Alias EventLogV2 - var rawEventLogV2 EventLogV2Alias - if err := unmarshal(&rawEventLogV2); err != nil { +func (o *ThreadDumpV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type ThreadDumpV1Alias ThreadDumpV1 + var rawThreadDumpV1 ThreadDumpV1Alias + if err := unmarshal(&rawThreadDumpV1); err != nil { return err } - if rawEventLogV2.Values == nil { - rawEventLogV2.Values = make(map[string]interface{}, 0) - } - if rawEventLogV2.UnsafeParams == nil { - rawEventLogV2.UnsafeParams = make(map[string]interface{}, 0) - } - if rawEventLogV2.Tags == nil { - rawEventLogV2.Tags = make(map[string]string, 0) + if rawThreadDumpV1.Threads == nil { + rawThreadDumpV1.Threads = make([]ThreadInfoV1, 0) } - *o = EventLogV2(rawEventLogV2) + *o = ThreadDumpV1(rawThreadDumpV1) return nil } -// Definition of the metric.1 format. -type MetricLogV1 struct { +// A Zipkin-compatible Annotation object. +type Annotation struct { + // Time annotation was created (epoch microsecond value) + Timestamp conjuretype.SafeLong `json:"timestamp" yaml:"timestamp,omitempty" conjure-docs:"Time annotation was created (epoch microsecond value)\n"` + // Value encapsulated by this annotation + Value string `json:"value" yaml:"value,omitempty" conjure-docs:"Value encapsulated by this annotation\n"` + Endpoint Endpoint `json:"endpoint" yaml:"endpoint,omitempty"` +} + +// Definition of the event.1 format. +type EventLogV1 struct { Type string `json:"type" yaml:"type,omitempty"` Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // Dot-delimited name of metric, e.g. `com.foundry.compass.api.Compass.http.ping.failures` - MetricName string `json:"metricName" yaml:"metricName,omitempty" conjure-docs:"Dot-delimited name of metric, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` - // Type of metric being represented, e.g. `gauge`, `histogram`, `counter` - MetricType string `json:"metricType" yaml:"metricType,omitempty" conjure-docs:"Type of metric being represented, e.g. \"gauge\", \"histogram\", \"counter\"\n"` - // Observations, measurements and context associated with the metric - Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the metric\n"` - // Additional dimensions that describe the instance of the metric - Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the metric\n"` + // Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures` + EventName string `json:"eventName" yaml:"eventName,omitempty" conjure-docs:"Dot-delimited name of event, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` + // Type of event being represented, e.g. `gauge`, `histogram`, `counter` + EventType string `json:"eventType" yaml:"eventType,omitempty" conjure-docs:"Type of event being represented, e.g. \"gauge\", \"histogram\", \"counter\"\n"` + // Observations, measurements and context associated with the event + Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the event\n"` // User id (if available) Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` // Session id (if available) @@ -644,241 +591,380 @@ type MetricLogV1 struct { UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unsafe metadata describing the event\n"` } -func (o MetricLogV1) MarshalJSON() ([]byte, error) { +func (o EventLogV1) MarshalJSON() ([]byte, error) { if o.Values == nil { o.Values = make(map[string]interface{}, 0) } - if o.Tags == nil { - o.Tags = make(map[string]string, 0) - } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type MetricLogV1Alias MetricLogV1 - return json.Marshal(MetricLogV1Alias(o)) + type EventLogV1Alias EventLogV1 + return json.Marshal(EventLogV1Alias(o)) } -func (o *MetricLogV1) UnmarshalJSON(data []byte) error { - type MetricLogV1Alias MetricLogV1 - var rawMetricLogV1 MetricLogV1Alias - if err := json.Unmarshal(data, &rawMetricLogV1); err != nil { +func (o *EventLogV1) UnmarshalJSON(data []byte) error { + type EventLogV1Alias EventLogV1 + var rawEventLogV1 EventLogV1Alias + if err := json.Unmarshal(data, &rawEventLogV1); err != nil { return err } - if rawMetricLogV1.Values == nil { - rawMetricLogV1.Values = make(map[string]interface{}, 0) - } - if rawMetricLogV1.Tags == nil { - rawMetricLogV1.Tags = make(map[string]string, 0) + if rawEventLogV1.Values == nil { + rawEventLogV1.Values = make(map[string]interface{}, 0) } - if rawMetricLogV1.UnsafeParams == nil { - rawMetricLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawEventLogV1.UnsafeParams == nil { + rawEventLogV1.UnsafeParams = make(map[string]interface{}, 0) } - *o = MetricLogV1(rawMetricLogV1) + *o = EventLogV1(rawEventLogV1) return nil } -func (o MetricLogV1) MarshalYAML() (interface{}, error) { +func (o EventLogV1) MarshalYAML() (interface{}, error) { if o.Values == nil { o.Values = make(map[string]interface{}, 0) } - if o.Tags == nil { - o.Tags = make(map[string]string, 0) - } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type MetricLogV1Alias MetricLogV1 - return MetricLogV1Alias(o), nil + type EventLogV1Alias EventLogV1 + return EventLogV1Alias(o), nil } -func (o *MetricLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type MetricLogV1Alias MetricLogV1 - var rawMetricLogV1 MetricLogV1Alias - if err := unmarshal(&rawMetricLogV1); err != nil { +func (o *EventLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type EventLogV1Alias EventLogV1 + var rawEventLogV1 EventLogV1Alias + if err := unmarshal(&rawEventLogV1); err != nil { return err } - if rawMetricLogV1.Values == nil { - rawMetricLogV1.Values = make(map[string]interface{}, 0) - } - if rawMetricLogV1.Tags == nil { - rawMetricLogV1.Tags = make(map[string]string, 0) + if rawEventLogV1.Values == nil { + rawEventLogV1.Values = make(map[string]interface{}, 0) } - if rawMetricLogV1.UnsafeParams == nil { - rawMetricLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawEventLogV1.UnsafeParams == nil { + rawEventLogV1.UnsafeParams = make(map[string]interface{}, 0) } - *o = MetricLogV1(rawMetricLogV1) + *o = EventLogV1(rawEventLogV1) return nil } -// Definition of the beacon.1 format. -type BeaconLogV1 struct { - Type string `json:"type" yaml:"type,omitempty"` - Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // Dot-delimited name for the structure of the params block, e.g. `compass.SearchEvent.v1` - EventType string `json:"eventType" yaml:"eventType,omitempty" conjure-docs:"Dot-delimited name for the structure of the params block, e.g. \"compass.SearchEvent.v1\"\n"` - // Name of the application that created the log - AppName string `json:"appName" yaml:"appName,omitempty" conjure-docs:"Name of the application that created the log\n"` - // Version of the application that created the log - AppVersion string `json:"appVersion" yaml:"appVersion,omitempty" conjure-docs:"Version of the application that created the log\n"` - // Known-safe parameters (redaction may be used to make params knowably safe, but is not required) - Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Known-safe parameters (redaction may be used to make params knowably safe, but is not required)\n"` - // Browser identifier (if available) - BrowserId *string `json:"browserId" yaml:"browserId,omitempty" conjure-docs:"Browser identifier (if available)\n"` +type StackFrameV1 struct { + // The address of the execution point of this stack frame. This is a string because a safelong can't represent the full 64 bit address space. + Address *string `json:"address" yaml:"address,omitempty" conjure-docs:"The address of the execution point of this stack frame. This is a string because a safelong can't represent the full 64 bit address space.\n"` + // The identifier of the procedure containing the execution point of this stack frame. This is a fully qualified method name in Java and a demangled symbol name in native code, for example. Note that procedure names may include unsafe information if a service is, for exmaple, running user-defined code. It must be safely redacted. + Procedure *string `json:"procedure" yaml:"procedure,omitempty" conjure-docs:"The identifier of the procedure containing the execution point of this stack frame. This is a fully qualified method name in Java and a demangled symbol name in native code, for example. Note that procedure names may include unsafe information if a service is, for exmaple, running user-defined code. It must be safely redacted.\n"` + // The name of the file containing the source location of the execution point of this stack frame. Note that file names may include unsafe information if a service is, for example, running user-defined code. It must be safely redacted. + File *string `json:"file" yaml:"file,omitempty" conjure-docs:"The name of the file containing the source location of the execution point of this stack frame. Note that file names may include unsafe information if a service is, for example, running user-defined code. It must be safely redacted.\n"` + // The line number of the source location of the execution point of this stack frame. + Line *int `json:"line" yaml:"line,omitempty" conjure-docs:"The line number of the source location of the execution point of this stack frame.\n"` + // Other frame-level information. + Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Other frame-level information."` +} + +func (o StackFrameV1) MarshalJSON() ([]byte, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) + } + type StackFrameV1Alias StackFrameV1 + return json.Marshal(StackFrameV1Alias(o)) +} + +func (o *StackFrameV1) UnmarshalJSON(data []byte) error { + type StackFrameV1Alias StackFrameV1 + var rawStackFrameV1 StackFrameV1Alias + if err := json.Unmarshal(data, &rawStackFrameV1); err != nil { + return err + } + if rawStackFrameV1.Params == nil { + rawStackFrameV1.Params = make(map[string]interface{}, 0) + } + *o = StackFrameV1(rawStackFrameV1) + return nil +} + +func (o StackFrameV1) MarshalYAML() (interface{}, error) { + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) + } + type StackFrameV1Alias StackFrameV1 + return StackFrameV1Alias(o), nil +} + +func (o *StackFrameV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type StackFrameV1Alias StackFrameV1 + var rawStackFrameV1 StackFrameV1Alias + if err := unmarshal(&rawStackFrameV1); err != nil { + return err + } + if rawStackFrameV1.Params == nil { + rawStackFrameV1.Params = make(map[string]interface{}, 0) + } + *o = StackFrameV1(rawStackFrameV1) + return nil +} + +type GenericDiagnostic struct { + // An identifier for the type of diagnostic represented. + DiagnosticType string `json:"diagnosticType" yaml:"diagnosticType,omitempty" conjure-docs:"An identifier for the type of diagnostic represented."` + // Observations, measurements and context associated with the diagnostic. + Value interface{} `json:"value" yaml:"value,omitempty" conjure-docs:"Observations, measurements and context associated with the diagnostic."` +} + +// Definition of the request.1 format. +type RequestLogV1 struct { + Type string `json:"type" yaml:"type,omitempty"` + Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` + // HTTP method of request + Method *string `json:"method" yaml:"method,omitempty" conjure-docs:"HTTP method of request\n"` + // Protocol, e.g. `HTTP/1.1`, `HTTP/2` + Protocol string `json:"protocol" yaml:"protocol,omitempty" conjure-docs:"Protocol, e.g. \"HTTP/1.1\", \"HTTP/2\"\n"` + // Path of request. If templated, the unrendered path, e.g.: `/catalog/dataset/{datasetId}`, `/{rid}/paths/contents/{path:.*}`. + Path string `json:"path" yaml:"path,omitempty" conjure-docs:"Path of request. If templated, the unrendered path, e.g.: \"/catalog/dataset/{datasetId}\", \"/{rid}/paths/contents/{path:.*}\".\n"` + // Known-safe path parameters + PathParams map[string]interface{} `json:"pathParams" yaml:"pathParams,omitempty" conjure-docs:"Known-safe path parameters\n"` + // Known-safe query parameters + QueryParams map[string]interface{} `json:"queryParams" yaml:"queryParams,omitempty" conjure-docs:"Known-safe query parameters\n"` + // Known-safe header parameters + HeaderParams map[string]interface{} `json:"headerParams" yaml:"headerParams,omitempty" conjure-docs:"Known-safe header parameters\n"` + // Known-safe body parameters + BodyParams map[string]interface{} `json:"bodyParams" yaml:"bodyParams,omitempty" conjure-docs:"Known-safe body parameters\n"` + // HTTP status code of response + Status int `json:"status" yaml:"status,omitempty" conjure-docs:"HTTP status code of response\n"` + // Size of request (bytes). string to allow large numbers. + RequestSize string `json:"requestSize" yaml:"requestSize,omitempty" conjure-docs:"Size of request (bytes). string to allow large numbers.\n"` + // Size of response (bytes). string to allow large numbers. + ResponseSize string `json:"responseSize" yaml:"responseSize,omitempty" conjure-docs:"Size of response (bytes). string to allow large numbers.\n"` + // Amount of time spent handling request (microseconds) + Duration int `json:"duration" yaml:"duration,omitempty" conjure-docs:"Amount of time spent handling request (microseconds)\n"` // User id (if available) Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` // Session id (if available) Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` + // API token id (if available) + TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` // Zipkin trace id (if available) TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` - // Unredacted parameters - UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters\n"` + // Unredacted parameters such as path, query and header parameters + UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unredacted parameters such as path, query and header parameters\n"` } -func (o BeaconLogV1) MarshalJSON() ([]byte, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) +func (o RequestLogV1) MarshalJSON() ([]byte, error) { + if o.PathParams == nil { + o.PathParams = make(map[string]interface{}, 0) + } + if o.QueryParams == nil { + o.QueryParams = make(map[string]interface{}, 0) + } + if o.HeaderParams == nil { + o.HeaderParams = make(map[string]interface{}, 0) + } + if o.BodyParams == nil { + o.BodyParams = make(map[string]interface{}, 0) } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type BeaconLogV1Alias BeaconLogV1 - return json.Marshal(BeaconLogV1Alias(o)) + type RequestLogV1Alias RequestLogV1 + return json.Marshal(RequestLogV1Alias(o)) } -func (o *BeaconLogV1) UnmarshalJSON(data []byte) error { - type BeaconLogV1Alias BeaconLogV1 - var rawBeaconLogV1 BeaconLogV1Alias - if err := json.Unmarshal(data, &rawBeaconLogV1); err != nil { +func (o *RequestLogV1) UnmarshalJSON(data []byte) error { + type RequestLogV1Alias RequestLogV1 + var rawRequestLogV1 RequestLogV1Alias + if err := json.Unmarshal(data, &rawRequestLogV1); err != nil { return err } - if rawBeaconLogV1.Params == nil { - rawBeaconLogV1.Params = make(map[string]interface{}, 0) + if rawRequestLogV1.PathParams == nil { + rawRequestLogV1.PathParams = make(map[string]interface{}, 0) } - if rawBeaconLogV1.UnsafeParams == nil { - rawBeaconLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawRequestLogV1.QueryParams == nil { + rawRequestLogV1.QueryParams = make(map[string]interface{}, 0) } - *o = BeaconLogV1(rawBeaconLogV1) + if rawRequestLogV1.HeaderParams == nil { + rawRequestLogV1.HeaderParams = make(map[string]interface{}, 0) + } + if rawRequestLogV1.BodyParams == nil { + rawRequestLogV1.BodyParams = make(map[string]interface{}, 0) + } + if rawRequestLogV1.UnsafeParams == nil { + rawRequestLogV1.UnsafeParams = make(map[string]interface{}, 0) + } + *o = RequestLogV1(rawRequestLogV1) return nil } -func (o BeaconLogV1) MarshalYAML() (interface{}, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) +func (o RequestLogV1) MarshalYAML() (interface{}, error) { + if o.PathParams == nil { + o.PathParams = make(map[string]interface{}, 0) + } + if o.QueryParams == nil { + o.QueryParams = make(map[string]interface{}, 0) + } + if o.HeaderParams == nil { + o.HeaderParams = make(map[string]interface{}, 0) + } + if o.BodyParams == nil { + o.BodyParams = make(map[string]interface{}, 0) } if o.UnsafeParams == nil { o.UnsafeParams = make(map[string]interface{}, 0) } - type BeaconLogV1Alias BeaconLogV1 - return BeaconLogV1Alias(o), nil + type RequestLogV1Alias RequestLogV1 + return RequestLogV1Alias(o), nil } -func (o *BeaconLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type BeaconLogV1Alias BeaconLogV1 - var rawBeaconLogV1 BeaconLogV1Alias - if err := unmarshal(&rawBeaconLogV1); err != nil { +func (o *RequestLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type RequestLogV1Alias RequestLogV1 + var rawRequestLogV1 RequestLogV1Alias + if err := unmarshal(&rawRequestLogV1); err != nil { return err } - if rawBeaconLogV1.Params == nil { - rawBeaconLogV1.Params = make(map[string]interface{}, 0) + if rawRequestLogV1.PathParams == nil { + rawRequestLogV1.PathParams = make(map[string]interface{}, 0) } - if rawBeaconLogV1.UnsafeParams == nil { - rawBeaconLogV1.UnsafeParams = make(map[string]interface{}, 0) + if rawRequestLogV1.QueryParams == nil { + rawRequestLogV1.QueryParams = make(map[string]interface{}, 0) } - *o = BeaconLogV1(rawBeaconLogV1) + if rawRequestLogV1.HeaderParams == nil { + rawRequestLogV1.HeaderParams = make(map[string]interface{}, 0) + } + if rawRequestLogV1.BodyParams == nil { + rawRequestLogV1.BodyParams = make(map[string]interface{}, 0) + } + if rawRequestLogV1.UnsafeParams == nil { + rawRequestLogV1.UnsafeParams = make(map[string]interface{}, 0) + } + *o = RequestLogV1(rawRequestLogV1) return nil } -// Definition of the audit.2 format. -type AuditLogV2 struct { - // "audit.2" - Type string `json:"type" yaml:"type,omitempty" conjure-docs:"\"audit.2\""` - Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` - // User id (if available). This is the most downstream caller. - Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available). This is the most downstream caller.\n"` - // Session id (if available) - Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` - // API token id (if available) - TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` - // Zipkin trace id (if available) - TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` - // All users upstream of the user currently taking an action. The first element in this list is the uid of the most upstream caller. This list does not include the `uid`. - OtherUids []UserId `json:"otherUids" yaml:"otherUids,omitempty" conjure-docs:"All users upstream of the user currently taking an action. The first element in this list is the uid of the most upstream caller. This list does not include the \"uid\".\n"` - // Best-effort identifier of the originating machine, e.g. an IP address, a Kubernetes node identifier, - // or similar - Origin *string `json:"origin" yaml:"origin,omitempty" conjure-docs:"Best-effort identifier of the originating machine, e.g. an IP address, a Kubernetes node identifier,\nor similar\n"` - // Name of the audit event, e.g. PUT_FILE - Name string `json:"name" yaml:"name,omitempty" conjure-docs:"Name of the audit event, e.g. PUT_FILE\n"` - // Indicates whether the request was successful or the type of failure, e.g. ERROR or UNAUTHORIZED - Result AuditResult `json:"result" yaml:"result,omitempty" conjure-docs:"Indicates whether the request was successful or the type of failure, e.g. ERROR or UNAUTHORIZED\n"` - // The parameters known at method invocation time. - RequestParams map[string]interface{} `json:"requestParams" yaml:"requestParams,omitempty" conjure-docs:"The parameters known at method invocation time.\n"` - // Information derived within a method, commonly parts of the return value. - ResultParams map[string]interface{} `json:"resultParams" yaml:"resultParams,omitempty" conjure-docs:"Information derived within a method, commonly parts of the return value.\n"` +type ThreadInfoV1 struct { + // The ID of the thread. + Id *conjuretype.SafeLong `json:"id" yaml:"id,omitempty" conjure-docs:"The ID of the thread."` + // The name of the thread. Note that thread names may include unsafe information such as the path of the HTTP request being processed. It must be safely redacted. + Name *string `json:"name" yaml:"name,omitempty" conjure-docs:"The name of the thread. Note that thread names may include unsafe information such as the path of the HTTP request being processed. It must be safely redacted.\n"` + // A list of stack frames for the thread, ordered with the current frame first. + StackTrace []StackFrameV1 `json:"stackTrace" yaml:"stackTrace,omitempty" conjure-docs:"A list of stack frames for the thread, ordered with the current frame first.\n"` + // Other thread-level information. + Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Other thread-level information."` } -func (o AuditLogV2) MarshalJSON() ([]byte, error) { - if o.OtherUids == nil { - o.OtherUids = make([]UserId, 0) +func (o ThreadInfoV1) MarshalJSON() ([]byte, error) { + if o.StackTrace == nil { + o.StackTrace = make([]StackFrameV1, 0) } - if o.RequestParams == nil { - o.RequestParams = make(map[string]interface{}, 0) + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) } - if o.ResultParams == nil { - o.ResultParams = make(map[string]interface{}, 0) + type ThreadInfoV1Alias ThreadInfoV1 + return json.Marshal(ThreadInfoV1Alias(o)) +} + +func (o *ThreadInfoV1) UnmarshalJSON(data []byte) error { + type ThreadInfoV1Alias ThreadInfoV1 + var rawThreadInfoV1 ThreadInfoV1Alias + if err := json.Unmarshal(data, &rawThreadInfoV1); err != nil { + return err } - type AuditLogV2Alias AuditLogV2 - return json.Marshal(AuditLogV2Alias(o)) + if rawThreadInfoV1.StackTrace == nil { + rawThreadInfoV1.StackTrace = make([]StackFrameV1, 0) + } + if rawThreadInfoV1.Params == nil { + rawThreadInfoV1.Params = make(map[string]interface{}, 0) + } + *o = ThreadInfoV1(rawThreadInfoV1) + return nil } -func (o *AuditLogV2) UnmarshalJSON(data []byte) error { - type AuditLogV2Alias AuditLogV2 - var rawAuditLogV2 AuditLogV2Alias - if err := json.Unmarshal(data, &rawAuditLogV2); err != nil { +func (o ThreadInfoV1) MarshalYAML() (interface{}, error) { + if o.StackTrace == nil { + o.StackTrace = make([]StackFrameV1, 0) + } + if o.Params == nil { + o.Params = make(map[string]interface{}, 0) + } + type ThreadInfoV1Alias ThreadInfoV1 + return ThreadInfoV1Alias(o), nil +} + +func (o *ThreadInfoV1) UnmarshalYAML(unmarshal func(interface{}) error) error { + type ThreadInfoV1Alias ThreadInfoV1 + var rawThreadInfoV1 ThreadInfoV1Alias + if err := unmarshal(&rawThreadInfoV1); err != nil { + return err + } + if rawThreadInfoV1.StackTrace == nil { + rawThreadInfoV1.StackTrace = make([]StackFrameV1, 0) + } + if rawThreadInfoV1.Params == nil { + rawThreadInfoV1.Params = make(map[string]interface{}, 0) + } + *o = ThreadInfoV1(rawThreadInfoV1) + return nil +} + +type Endpoint struct { + // Name of the service that generated the annotation + ServiceName string `json:"serviceName" yaml:"serviceName,omitempty" conjure-docs:"Name of the service that generated the annotation\n"` + // IPv4 address of the machine that generated this annotation (`xxx.xxx.xxx.xxx`) + Ipv4 *string `json:"ipv4" yaml:"ipv4,omitempty" conjure-docs:"IPv4 address of the machine that generated this annotation (\"xxx.xxx.xxx.xxx\")\n"` + // IPv6 address of the machine that generated this annotation (standard hextet form) + Ipv6 *string `json:"ipv6" yaml:"ipv6,omitempty" conjure-docs:"IPv6 address of the machine that generated this annotation (standard hextet form)\n"` +} + +// A Zipkin-compatible Span object. +type Span struct { + // 16-digit hex trace identifier + TraceId string `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"16-digit hex trace identifier\n"` + // 16-digit hex span identifier + Id string `json:"id" yaml:"id,omitempty" conjure-docs:"16-digit hex span identifier\n"` + // Name of the span (typically the operation/RPC/method name for corresponding to this span) + Name string `json:"name" yaml:"name,omitempty" conjure-docs:"Name of the span (typically the operation/RPC/method name for corresponding to this span)\n"` + // 16-digit hex identifer of the parent span + ParentId *string `json:"parentId" yaml:"parentId,omitempty" conjure-docs:"16-digit hex identifer of the parent span\n"` + // Timestamp of the start of this span (epoch microsecond value) + Timestamp conjuretype.SafeLong `json:"timestamp" yaml:"timestamp,omitempty" conjure-docs:"Timestamp of the start of this span (epoch microsecond value)\n"` + // Duration of this span (microseconds) + Duration conjuretype.SafeLong `json:"duration" yaml:"duration,omitempty" conjure-docs:"Duration of this span (microseconds)\n"` + Annotations []Annotation `json:"annotations" yaml:"annotations,omitempty"` +} + +func (o Span) MarshalJSON() ([]byte, error) { + if o.Annotations == nil { + o.Annotations = make([]Annotation, 0) + } + type SpanAlias Span + return json.Marshal(SpanAlias(o)) +} + +func (o *Span) UnmarshalJSON(data []byte) error { + type SpanAlias Span + var rawSpan SpanAlias + if err := json.Unmarshal(data, &rawSpan); err != nil { return err } - if rawAuditLogV2.OtherUids == nil { - rawAuditLogV2.OtherUids = make([]UserId, 0) - } - if rawAuditLogV2.RequestParams == nil { - rawAuditLogV2.RequestParams = make(map[string]interface{}, 0) - } - if rawAuditLogV2.ResultParams == nil { - rawAuditLogV2.ResultParams = make(map[string]interface{}, 0) + if rawSpan.Annotations == nil { + rawSpan.Annotations = make([]Annotation, 0) } - *o = AuditLogV2(rawAuditLogV2) + *o = Span(rawSpan) return nil } -func (o AuditLogV2) MarshalYAML() (interface{}, error) { - if o.OtherUids == nil { - o.OtherUids = make([]UserId, 0) - } - if o.RequestParams == nil { - o.RequestParams = make(map[string]interface{}, 0) - } - if o.ResultParams == nil { - o.ResultParams = make(map[string]interface{}, 0) +func (o Span) MarshalYAML() (interface{}, error) { + if o.Annotations == nil { + o.Annotations = make([]Annotation, 0) } - type AuditLogV2Alias AuditLogV2 - return AuditLogV2Alias(o), nil + type SpanAlias Span + return SpanAlias(o), nil } -func (o *AuditLogV2) UnmarshalYAML(unmarshal func(interface{}) error) error { - type AuditLogV2Alias AuditLogV2 - var rawAuditLogV2 AuditLogV2Alias - if err := unmarshal(&rawAuditLogV2); err != nil { +func (o *Span) UnmarshalYAML(unmarshal func(interface{}) error) error { + type SpanAlias Span + var rawSpan SpanAlias + if err := unmarshal(&rawSpan); err != nil { return err } - if rawAuditLogV2.OtherUids == nil { - rawAuditLogV2.OtherUids = make([]UserId, 0) - } - if rawAuditLogV2.RequestParams == nil { - rawAuditLogV2.RequestParams = make(map[string]interface{}, 0) - } - if rawAuditLogV2.ResultParams == nil { - rawAuditLogV2.ResultParams = make(map[string]interface{}, 0) + if rawSpan.Annotations == nil { + rawSpan.Annotations = make([]Annotation, 0) } - *o = AuditLogV2(rawAuditLogV2) + *o = Span(rawSpan) return nil } @@ -935,176 +1021,90 @@ func (o *DiagnosticLogV1) UnmarshalYAML(unmarshal func(interface{}) error) error return nil } -type GenericDiagnostic struct { - // An identifier for the type of diagnostic represented. - DiagnosticType string `json:"diagnosticType" yaml:"diagnosticType,omitempty" conjure-docs:"An identifier for the type of diagnostic represented."` - // Observations, measurements and context associated with the diagnostic. - Value interface{} `json:"value" yaml:"value,omitempty" conjure-docs:"Observations, measurements and context associated with the diagnostic."` -} - -type ThreadDumpV1 struct { - // Information about each of the threads in the thread dump. "Thread" may refer to a userland thread such as a goroutine, or an OS-level thread. - Threads []ThreadInfoV1 `json:"threads" yaml:"threads,omitempty" conjure-docs:"Information about each of the threads in the thread dump. \"Thread\" may refer to a userland thread such as a goroutine, or an OS-level thread.\n"` -} - -func (o ThreadDumpV1) MarshalJSON() ([]byte, error) { - if o.Threads == nil { - o.Threads = make([]ThreadInfoV1, 0) - } - type ThreadDumpV1Alias ThreadDumpV1 - return json.Marshal(ThreadDumpV1Alias(o)) +// Definition of the event.2 format. +type EventLogV2 struct { + Type string `json:"type" yaml:"type,omitempty"` + Time conjuretype.DateTime `json:"time" yaml:"time,omitempty"` + // Dot-delimited name of event, e.g. `com.foundry.compass.api.Compass.http.ping.failures` + EventName string `json:"eventName" yaml:"eventName,omitempty" conjure-docs:"Dot-delimited name of event, e.g. \"com.foundry.compass.api.Compass.http.ping.failures\"\n"` + // Observations, measurements and context associated with the event + Values map[string]interface{} `json:"values" yaml:"values,omitempty" conjure-docs:"Observations, measurements and context associated with the event\n"` + // User id (if available) + Uid *UserId `json:"uid" yaml:"uid,omitempty" conjure-docs:"User id (if available)\n"` + // Session id (if available) + Sid *SessionId `json:"sid" yaml:"sid,omitempty" conjure-docs:"Session id (if available)\n"` + // API token id (if available) + TokenId *TokenId `json:"tokenId" yaml:"tokenId,omitempty" conjure-docs:"API token id (if available)\n"` + // Zipkin trace id (if available) + TraceId *TraceId `json:"traceId" yaml:"traceId,omitempty" conjure-docs:"Zipkin trace id (if available)\n"` + // Unsafe metadata describing the event + UnsafeParams map[string]interface{} `json:"unsafeParams" yaml:"unsafeParams,omitempty" conjure-docs:"Unsafe metadata describing the event\n"` + // Additional dimensions that describe the instance of the log event + Tags map[string]string `json:"tags" yaml:"tags,omitempty" conjure-docs:"Additional dimensions that describe the instance of the log event"` } -func (o *ThreadDumpV1) UnmarshalJSON(data []byte) error { - type ThreadDumpV1Alias ThreadDumpV1 - var rawThreadDumpV1 ThreadDumpV1Alias - if err := json.Unmarshal(data, &rawThreadDumpV1); err != nil { - return err +func (o EventLogV2) MarshalJSON() ([]byte, error) { + if o.Values == nil { + o.Values = make(map[string]interface{}, 0) } - if rawThreadDumpV1.Threads == nil { - rawThreadDumpV1.Threads = make([]ThreadInfoV1, 0) + if o.UnsafeParams == nil { + o.UnsafeParams = make(map[string]interface{}, 0) } - *o = ThreadDumpV1(rawThreadDumpV1) - return nil -} - -func (o ThreadDumpV1) MarshalYAML() (interface{}, error) { - if o.Threads == nil { - o.Threads = make([]ThreadInfoV1, 0) + if o.Tags == nil { + o.Tags = make(map[string]string, 0) } - type ThreadDumpV1Alias ThreadDumpV1 - return ThreadDumpV1Alias(o), nil + type EventLogV2Alias EventLogV2 + return json.Marshal(EventLogV2Alias(o)) } -func (o *ThreadDumpV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type ThreadDumpV1Alias ThreadDumpV1 - var rawThreadDumpV1 ThreadDumpV1Alias - if err := unmarshal(&rawThreadDumpV1); err != nil { +func (o *EventLogV2) UnmarshalJSON(data []byte) error { + type EventLogV2Alias EventLogV2 + var rawEventLogV2 EventLogV2Alias + if err := json.Unmarshal(data, &rawEventLogV2); err != nil { return err } - if rawThreadDumpV1.Threads == nil { - rawThreadDumpV1.Threads = make([]ThreadInfoV1, 0) - } - *o = ThreadDumpV1(rawThreadDumpV1) - return nil -} - -type ThreadInfoV1 struct { - // The ID of the thread. - Id *conjuretype.SafeLong `json:"id" yaml:"id,omitempty" conjure-docs:"The ID of the thread."` - // The name of the thread. Note that thread names may include unsafe information such as the path of the HTTP request being processed. It must be safely redacted. - Name *string `json:"name" yaml:"name,omitempty" conjure-docs:"The name of the thread. Note that thread names may include unsafe information such as the path of the HTTP request being processed. It must be safely redacted.\n"` - // A list of stack frames for the thread, ordered with the current frame first. - StackTrace []StackFrameV1 `json:"stackTrace" yaml:"stackTrace,omitempty" conjure-docs:"A list of stack frames for the thread, ordered with the current frame first.\n"` - // Other thread-level information. - Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Other thread-level information."` -} - -func (o ThreadInfoV1) MarshalJSON() ([]byte, error) { - if o.StackTrace == nil { - o.StackTrace = make([]StackFrameV1, 0) - } - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) - } - type ThreadInfoV1Alias ThreadInfoV1 - return json.Marshal(ThreadInfoV1Alias(o)) -} - -func (o *ThreadInfoV1) UnmarshalJSON(data []byte) error { - type ThreadInfoV1Alias ThreadInfoV1 - var rawThreadInfoV1 ThreadInfoV1Alias - if err := json.Unmarshal(data, &rawThreadInfoV1); err != nil { - return err + if rawEventLogV2.Values == nil { + rawEventLogV2.Values = make(map[string]interface{}, 0) } - if rawThreadInfoV1.StackTrace == nil { - rawThreadInfoV1.StackTrace = make([]StackFrameV1, 0) + if rawEventLogV2.UnsafeParams == nil { + rawEventLogV2.UnsafeParams = make(map[string]interface{}, 0) } - if rawThreadInfoV1.Params == nil { - rawThreadInfoV1.Params = make(map[string]interface{}, 0) + if rawEventLogV2.Tags == nil { + rawEventLogV2.Tags = make(map[string]string, 0) } - *o = ThreadInfoV1(rawThreadInfoV1) + *o = EventLogV2(rawEventLogV2) return nil } -func (o ThreadInfoV1) MarshalYAML() (interface{}, error) { - if o.StackTrace == nil { - o.StackTrace = make([]StackFrameV1, 0) - } - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) - } - type ThreadInfoV1Alias ThreadInfoV1 - return ThreadInfoV1Alias(o), nil -} - -func (o *ThreadInfoV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type ThreadInfoV1Alias ThreadInfoV1 - var rawThreadInfoV1 ThreadInfoV1Alias - if err := unmarshal(&rawThreadInfoV1); err != nil { - return err - } - if rawThreadInfoV1.StackTrace == nil { - rawThreadInfoV1.StackTrace = make([]StackFrameV1, 0) +func (o EventLogV2) MarshalYAML() (interface{}, error) { + if o.Values == nil { + o.Values = make(map[string]interface{}, 0) } - if rawThreadInfoV1.Params == nil { - rawThreadInfoV1.Params = make(map[string]interface{}, 0) + if o.UnsafeParams == nil { + o.UnsafeParams = make(map[string]interface{}, 0) } - *o = ThreadInfoV1(rawThreadInfoV1) - return nil -} - -type StackFrameV1 struct { - // The address of the execution point of this stack frame. This is a string because a safelong can't represent the full 64 bit address space. - Address *string `json:"address" yaml:"address,omitempty" conjure-docs:"The address of the execution point of this stack frame. This is a string because a safelong can't represent the full 64 bit address space.\n"` - // The identifier of the procedure containing the execution point of this stack frame. This is a fully qualified method name in Java and a demangled symbol name in native code, for example. Note that procedure names may include unsafe information if a service is, for exmaple, running user-defined code. It must be safely redacted. - Procedure *string `json:"procedure" yaml:"procedure,omitempty" conjure-docs:"The identifier of the procedure containing the execution point of this stack frame. This is a fully qualified method name in Java and a demangled symbol name in native code, for example. Note that procedure names may include unsafe information if a service is, for exmaple, running user-defined code. It must be safely redacted.\n"` - // The name of the file containing the source location of the execution point of this stack frame. Note that file names may include unsafe information if a service is, for example, running user-defined code. It must be safely redacted. - File *string `json:"file" yaml:"file,omitempty" conjure-docs:"The name of the file containing the source location of the execution point of this stack frame. Note that file names may include unsafe information if a service is, for example, running user-defined code. It must be safely redacted.\n"` - // The line number of the source location of the execution point of this stack frame. - Line *int `json:"line" yaml:"line,omitempty" conjure-docs:"The line number of the source location of the execution point of this stack frame.\n"` - // Other frame-level information. - Params map[string]interface{} `json:"params" yaml:"params,omitempty" conjure-docs:"Other frame-level information."` -} - -func (o StackFrameV1) MarshalJSON() ([]byte, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) + if o.Tags == nil { + o.Tags = make(map[string]string, 0) } - type StackFrameV1Alias StackFrameV1 - return json.Marshal(StackFrameV1Alias(o)) + type EventLogV2Alias EventLogV2 + return EventLogV2Alias(o), nil } -func (o *StackFrameV1) UnmarshalJSON(data []byte) error { - type StackFrameV1Alias StackFrameV1 - var rawStackFrameV1 StackFrameV1Alias - if err := json.Unmarshal(data, &rawStackFrameV1); err != nil { +func (o *EventLogV2) UnmarshalYAML(unmarshal func(interface{}) error) error { + type EventLogV2Alias EventLogV2 + var rawEventLogV2 EventLogV2Alias + if err := unmarshal(&rawEventLogV2); err != nil { return err } - if rawStackFrameV1.Params == nil { - rawStackFrameV1.Params = make(map[string]interface{}, 0) - } - *o = StackFrameV1(rawStackFrameV1) - return nil -} - -func (o StackFrameV1) MarshalYAML() (interface{}, error) { - if o.Params == nil { - o.Params = make(map[string]interface{}, 0) + if rawEventLogV2.Values == nil { + rawEventLogV2.Values = make(map[string]interface{}, 0) } - type StackFrameV1Alias StackFrameV1 - return StackFrameV1Alias(o), nil -} - -func (o *StackFrameV1) UnmarshalYAML(unmarshal func(interface{}) error) error { - type StackFrameV1Alias StackFrameV1 - var rawStackFrameV1 StackFrameV1Alias - if err := unmarshal(&rawStackFrameV1); err != nil { - return err + if rawEventLogV2.UnsafeParams == nil { + rawEventLogV2.UnsafeParams = make(map[string]interface{}, 0) } - if rawStackFrameV1.Params == nil { - rawStackFrameV1.Params = make(map[string]interface{}, 0) + if rawEventLogV2.Tags == nil { + rawEventLogV2.Tags = make(map[string]string, 0) } - *o = StackFrameV1(rawStackFrameV1) + *o = EventLogV2(rawEventLogV2) return nil } diff --git a/conjure/witchcraft/spec/logging/unions.conjure.go b/conjure/witchcraft/api/logging/unions.conjure.go similarity index 100% rename from conjure/witchcraft/spec/logging/unions.conjure.go rename to conjure/witchcraft/api/logging/unions.conjure.go index 65ae0cc6..61c1b28e 100644 --- a/conjure/witchcraft/spec/logging/unions.conjure.go +++ b/conjure/witchcraft/api/logging/unions.conjure.go @@ -7,6 +7,112 @@ import ( "fmt" ) +// Union type containing log types that are logged to event.log. +type UnionEventLog struct { + typ string + eventLog *EventLogV1 + eventLogV2 *EventLogV2 + beaconLog *BeaconLogV1 +} + +type unionEventLogDeserializer struct { + Type string `json:"type" yaml:"type"` + EventLog *EventLogV1 `json:"eventLog" yaml:"eventLog"` + EventLogV2 *EventLogV2 `json:"eventLogV2" yaml:"eventLogV2"` + BeaconLog *BeaconLogV1 `json:"beaconLog" yaml:"beaconLog"` +} + +func (u *unionEventLogDeserializer) toStruct() UnionEventLog { + return UnionEventLog{typ: u.Type, eventLog: u.EventLog, eventLogV2: u.EventLogV2, beaconLog: u.BeaconLog} +} + +func (u *UnionEventLog) toSerializer() (interface{}, error) { + switch u.typ { + default: + return nil, fmt.Errorf("unknown type %s", u.typ) + case "eventLog": + return struct { + Type string `json:"type" yaml:"type"` + EventLog EventLogV1 `json:"eventLog" yaml:"eventLog"` + }{Type: "eventLog", EventLog: *u.eventLog}, nil + case "eventLogV2": + return struct { + Type string `json:"type" yaml:"type"` + EventLogV2 EventLogV2 `json:"eventLogV2" yaml:"eventLogV2"` + }{Type: "eventLogV2", EventLogV2: *u.eventLogV2}, nil + case "beaconLog": + return struct { + Type string `json:"type" yaml:"type"` + BeaconLog BeaconLogV1 `json:"beaconLog" yaml:"beaconLog"` + }{Type: "beaconLog", BeaconLog: *u.beaconLog}, nil + } +} + +func (u UnionEventLog) MarshalJSON() ([]byte, error) { + ser, err := u.toSerializer() + if err != nil { + return nil, err + } + return json.Marshal(ser) +} + +func (u *UnionEventLog) UnmarshalJSON(data []byte) error { + var deser unionEventLogDeserializer + if err := json.Unmarshal(data, &deser); err != nil { + return err + } + *u = deser.toStruct() + return nil +} + +func (u UnionEventLog) MarshalYAML() (interface{}, error) { + return u.toSerializer() +} + +func (u *UnionEventLog) UnmarshalYAML(unmarshal func(interface{}) error) error { + var deser unionEventLogDeserializer + if err := unmarshal(&deser); err != nil { + return err + } + *u = deser.toStruct() + return nil +} + +func (u *UnionEventLog) Accept(v UnionEventLogVisitor) error { + switch u.typ { + default: + if u.typ == "" { + return fmt.Errorf("invalid value in union type") + } + return v.VisitUnknown(u.typ) + case "eventLog": + return v.VisitEventLog(*u.eventLog) + case "eventLogV2": + return v.VisitEventLogV2(*u.eventLogV2) + case "beaconLog": + return v.VisitBeaconLog(*u.beaconLog) + } +} + +type UnionEventLogVisitor interface { + VisitEventLog(v EventLogV1) error + VisitEventLogV2(v EventLogV2) error + VisitBeaconLog(v BeaconLogV1) error + VisitUnknown(typeName string) error +} + +func NewUnionEventLogFromEventLog(v EventLogV1) UnionEventLog { + return UnionEventLog{typ: "eventLog", eventLog: &v} +} + +func NewUnionEventLogFromEventLogV2(v EventLogV2) UnionEventLog { + return UnionEventLog{typ: "eventLogV2", eventLogV2: &v} +} + +func NewUnionEventLogFromBeaconLog(v BeaconLogV1) UnionEventLog { + return UnionEventLog{typ: "beaconLog", beaconLog: &v} +} + type WrappedLogV1Payload struct { typ string serviceLogV1 *ServiceLogV1 @@ -168,97 +274,6 @@ func NewWrappedLogV1PayloadFromDiagnosticLogV1(v DiagnosticLogV1) WrappedLogV1Pa return WrappedLogV1Payload{typ: "diagnosticLogV1", diagnosticLogV1: &v} } -type RequestLog struct { - typ string - v1 *RequestLogV1 - v2 *RequestLogV2 -} - -type requestLogDeserializer struct { - Type string `json:"type" yaml:"type"` - V1 *RequestLogV1 `json:"v1" yaml:"v1"` - V2 *RequestLogV2 `json:"v2" yaml:"v2"` -} - -func (u *requestLogDeserializer) toStruct() RequestLog { - return RequestLog{typ: u.Type, v1: u.V1, v2: u.V2} -} - -func (u *RequestLog) toSerializer() (interface{}, error) { - switch u.typ { - default: - return nil, fmt.Errorf("unknown type %s", u.typ) - case "v1": - return struct { - Type string `json:"type" yaml:"type"` - V1 RequestLogV1 `json:"v1" yaml:"v1"` - }{Type: "v1", V1: *u.v1}, nil - case "v2": - return struct { - Type string `json:"type" yaml:"type"` - V2 RequestLogV2 `json:"v2" yaml:"v2"` - }{Type: "v2", V2: *u.v2}, nil - } -} - -func (u RequestLog) MarshalJSON() ([]byte, error) { - ser, err := u.toSerializer() - if err != nil { - return nil, err - } - return json.Marshal(ser) -} - -func (u *RequestLog) UnmarshalJSON(data []byte) error { - var deser requestLogDeserializer - if err := json.Unmarshal(data, &deser); err != nil { - return err - } - *u = deser.toStruct() - return nil -} - -func (u RequestLog) MarshalYAML() (interface{}, error) { - return u.toSerializer() -} - -func (u *RequestLog) UnmarshalYAML(unmarshal func(interface{}) error) error { - var deser requestLogDeserializer - if err := unmarshal(&deser); err != nil { - return err - } - *u = deser.toStruct() - return nil -} - -func (u *RequestLog) Accept(v RequestLogVisitor) error { - switch u.typ { - default: - if u.typ == "" { - return fmt.Errorf("invalid value in union type") - } - return v.VisitUnknown(u.typ) - case "v1": - return v.VisitV1(*u.v1) - case "v2": - return v.VisitV2(*u.v2) - } -} - -type RequestLogVisitor interface { - VisitV1(v RequestLogV1) error - VisitV2(v RequestLogV2) error - VisitUnknown(typeName string) error -} - -func NewRequestLogFromV1(v RequestLogV1) RequestLog { - return RequestLog{typ: "v1", v1: &v} -} - -func NewRequestLogFromV2(v RequestLogV2) RequestLog { - return RequestLog{typ: "v2", v2: &v} -} - type Diagnostic struct { typ string generic *GenericDiagnostic @@ -350,48 +365,40 @@ func NewDiagnosticFromThreadDump(v ThreadDumpV1) Diagnostic { return Diagnostic{typ: "threadDump", threadDump: &v} } -// Union type containing log types that are logged to event.log. -type UnionEventLog struct { - typ string - eventLog *EventLogV1 - eventLogV2 *EventLogV2 - beaconLog *BeaconLogV1 +type RequestLog struct { + typ string + v1 *RequestLogV1 + v2 *RequestLogV2 } -type unionEventLogDeserializer struct { - Type string `json:"type" yaml:"type"` - EventLog *EventLogV1 `json:"eventLog" yaml:"eventLog"` - EventLogV2 *EventLogV2 `json:"eventLogV2" yaml:"eventLogV2"` - BeaconLog *BeaconLogV1 `json:"beaconLog" yaml:"beaconLog"` +type requestLogDeserializer struct { + Type string `json:"type" yaml:"type"` + V1 *RequestLogV1 `json:"v1" yaml:"v1"` + V2 *RequestLogV2 `json:"v2" yaml:"v2"` } -func (u *unionEventLogDeserializer) toStruct() UnionEventLog { - return UnionEventLog{typ: u.Type, eventLog: u.EventLog, eventLogV2: u.EventLogV2, beaconLog: u.BeaconLog} +func (u *requestLogDeserializer) toStruct() RequestLog { + return RequestLog{typ: u.Type, v1: u.V1, v2: u.V2} } -func (u *UnionEventLog) toSerializer() (interface{}, error) { +func (u *RequestLog) toSerializer() (interface{}, error) { switch u.typ { default: return nil, fmt.Errorf("unknown type %s", u.typ) - case "eventLog": - return struct { - Type string `json:"type" yaml:"type"` - EventLog EventLogV1 `json:"eventLog" yaml:"eventLog"` - }{Type: "eventLog", EventLog: *u.eventLog}, nil - case "eventLogV2": + case "v1": return struct { - Type string `json:"type" yaml:"type"` - EventLogV2 EventLogV2 `json:"eventLogV2" yaml:"eventLogV2"` - }{Type: "eventLogV2", EventLogV2: *u.eventLogV2}, nil - case "beaconLog": + Type string `json:"type" yaml:"type"` + V1 RequestLogV1 `json:"v1" yaml:"v1"` + }{Type: "v1", V1: *u.v1}, nil + case "v2": return struct { - Type string `json:"type" yaml:"type"` - BeaconLog BeaconLogV1 `json:"beaconLog" yaml:"beaconLog"` - }{Type: "beaconLog", BeaconLog: *u.beaconLog}, nil + Type string `json:"type" yaml:"type"` + V2 RequestLogV2 `json:"v2" yaml:"v2"` + }{Type: "v2", V2: *u.v2}, nil } } -func (u UnionEventLog) MarshalJSON() ([]byte, error) { +func (u RequestLog) MarshalJSON() ([]byte, error) { ser, err := u.toSerializer() if err != nil { return nil, err @@ -399,8 +406,8 @@ func (u UnionEventLog) MarshalJSON() ([]byte, error) { return json.Marshal(ser) } -func (u *UnionEventLog) UnmarshalJSON(data []byte) error { - var deser unionEventLogDeserializer +func (u *RequestLog) UnmarshalJSON(data []byte) error { + var deser requestLogDeserializer if err := json.Unmarshal(data, &deser); err != nil { return err } @@ -408,12 +415,12 @@ func (u *UnionEventLog) UnmarshalJSON(data []byte) error { return nil } -func (u UnionEventLog) MarshalYAML() (interface{}, error) { +func (u RequestLog) MarshalYAML() (interface{}, error) { return u.toSerializer() } -func (u *UnionEventLog) UnmarshalYAML(unmarshal func(interface{}) error) error { - var deser unionEventLogDeserializer +func (u *RequestLog) UnmarshalYAML(unmarshal func(interface{}) error) error { + var deser requestLogDeserializer if err := unmarshal(&deser); err != nil { return err } @@ -421,37 +428,30 @@ func (u *UnionEventLog) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -func (u *UnionEventLog) Accept(v UnionEventLogVisitor) error { +func (u *RequestLog) Accept(v RequestLogVisitor) error { switch u.typ { default: if u.typ == "" { return fmt.Errorf("invalid value in union type") } return v.VisitUnknown(u.typ) - case "eventLog": - return v.VisitEventLog(*u.eventLog) - case "eventLogV2": - return v.VisitEventLogV2(*u.eventLogV2) - case "beaconLog": - return v.VisitBeaconLog(*u.beaconLog) + case "v1": + return v.VisitV1(*u.v1) + case "v2": + return v.VisitV2(*u.v2) } } -type UnionEventLogVisitor interface { - VisitEventLog(v EventLogV1) error - VisitEventLogV2(v EventLogV2) error - VisitBeaconLog(v BeaconLogV1) error +type RequestLogVisitor interface { + VisitV1(v RequestLogV1) error + VisitV2(v RequestLogV2) error VisitUnknown(typeName string) error } -func NewUnionEventLogFromEventLog(v EventLogV1) UnionEventLog { - return UnionEventLog{typ: "eventLog", eventLog: &v} -} - -func NewUnionEventLogFromEventLogV2(v EventLogV2) UnionEventLog { - return UnionEventLog{typ: "eventLogV2", eventLogV2: &v} +func NewRequestLogFromV1(v RequestLogV1) RequestLog { + return RequestLog{typ: "v1", v1: &v} } -func NewUnionEventLogFromBeaconLog(v BeaconLogV1) UnionEventLog { - return UnionEventLog{typ: "beaconLog", beaconLog: &v} +func NewRequestLogFromV2(v RequestLogV2) RequestLog { + return RequestLog{typ: "v2", v2: &v} } diff --git a/godel/config/conjure-plugin.yml b/godel/config/conjure-plugin.yml index 4aeba60b..38b6520c 100644 --- a/godel/config/conjure-plugin.yml +++ b/godel/config/conjure-plugin.yml @@ -2,4 +2,4 @@ version: 1 projects: conjure: output-dir: ./conjure - ir-locator: ./conjure/defs/witchcraft-logging-api-3.2.0.json + ir-locator: https://palantir.bintray.com/releases/com/palantir/witchcraft/api/witchcraft-logging-api/1.0.0/witchcraft-logging-api-1.0.0.conjure.json diff --git a/wlog-glog/internal/marshalers/logging_diagnostic.go b/wlog-glog/internal/marshalers/logging_diagnostic.go index 127c267a..c464ede7 100644 --- a/wlog-glog/internal/marshalers/logging_diagnostic.go +++ b/wlog-glog/internal/marshalers/logging_diagnostic.go @@ -19,7 +19,7 @@ import ( "fmt" "strconv" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" ) func marshalLoggingDiagnostic(key string, val interface{}) string { diff --git a/wlog-glog/internal/marshalers/marshalers.go b/wlog-glog/internal/marshalers/marshalers.go index d49bca2f..82cd57b7 100644 --- a/wlog-glog/internal/marshalers/marshalers.go +++ b/wlog-glog/internal/marshalers/marshalers.go @@ -17,7 +17,7 @@ package marshalers import ( "reflect" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-tracing/wtracing" ) diff --git a/wlog-zap/internal/marshalers/logging_diagnostic.go b/wlog-zap/internal/marshalers/logging_diagnostic.go index 57703924..4ba63aca 100644 --- a/wlog-zap/internal/marshalers/logging_diagnostic.go +++ b/wlog-zap/internal/marshalers/logging_diagnostic.go @@ -17,7 +17,7 @@ package marshalers import ( "fmt" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/wlog-zap/internal/marshalers/marshalers.go b/wlog-zap/internal/marshalers/marshalers.go index 52bc2881..229c7ffc 100644 --- a/wlog-zap/internal/marshalers/marshalers.go +++ b/wlog-zap/internal/marshalers/marshalers.go @@ -17,7 +17,7 @@ package marshalers import ( "reflect" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-tracing/wtracing" "go.uber.org/zap/zapcore" ) diff --git a/wlog-zerolog/internal/marshalers/logging_diagnostic.go b/wlog-zerolog/internal/marshalers/logging_diagnostic.go index 9759e3f8..a13b784e 100644 --- a/wlog-zerolog/internal/marshalers/logging_diagnostic.go +++ b/wlog-zerolog/internal/marshalers/logging_diagnostic.go @@ -17,7 +17,7 @@ package marshalers import ( "fmt" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/rs/zerolog" ) diff --git a/wlog-zerolog/internal/marshalers/marshalers.go b/wlog-zerolog/internal/marshalers/marshalers.go index b855dcb3..1ef80b22 100644 --- a/wlog-zerolog/internal/marshalers/marshalers.go +++ b/wlog-zerolog/internal/marshalers/marshalers.go @@ -17,7 +17,7 @@ package marshalers import ( "reflect" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-tracing/wtracing" "github.com/rs/zerolog" ) diff --git a/wlog/context_default_test.go b/wlog/context_default_test.go index ea6e83c8..a3980339 100644 --- a/wlog/context_default_test.go +++ b/wlog/context_default_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/nmiyake/pkg/dirs" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog" "github.com/palantir/witchcraft-go-logging/wlog/auditlog/audit2log" "github.com/palantir/witchcraft-go-logging/wlog/evtlog/evt2log" diff --git a/wlog/diaglog/diag1log/diag1logtests/tests.go b/wlog/diaglog/diag1log/diag1logtests/tests.go index 7fe7bb4d..e185f16e 100644 --- a/wlog/diaglog/diag1log/diag1logtests/tests.go +++ b/wlog/diaglog/diag1log/diag1logtests/tests.go @@ -23,7 +23,7 @@ import ( "github.com/palantir/conjure-go/conjure/types/conjuretype" "github.com/palantir/pkg/objmatcher" "github.com/palantir/pkg/safejson" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog/diaglog/diag1log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wlog/diaglog/diag1log/logger.go b/wlog/diaglog/diag1log/logger.go index 5fb4ca31..79a4d7b3 100644 --- a/wlog/diaglog/diag1log/logger.go +++ b/wlog/diaglog/diag1log/logger.go @@ -17,7 +17,7 @@ package diag1log import ( "io" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog" ) diff --git a/wlog/diaglog/diag1log/logger_default.go b/wlog/diaglog/diag1log/logger_default.go index 5ba3d14c..f3201b4f 100644 --- a/wlog/diaglog/diag1log/logger_default.go +++ b/wlog/diaglog/diag1log/logger_default.go @@ -15,7 +15,7 @@ package diag1log import ( - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog" ) diff --git a/wlog/diaglog/diag1log/params.go b/wlog/diaglog/diag1log/params.go index 1d52c70b..44609a7f 100644 --- a/wlog/diaglog/diag1log/params.go +++ b/wlog/diaglog/diag1log/params.go @@ -17,7 +17,7 @@ package diag1log import ( "reflect" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog" ) diff --git a/wlog/diaglog/diag1log/thread_dump.go b/wlog/diaglog/diag1log/thread_dump.go index 75a608d4..82131414 100644 --- a/wlog/diaglog/diag1log/thread_dump.go +++ b/wlog/diaglog/diag1log/thread_dump.go @@ -21,7 +21,7 @@ import ( "strings" "github.com/palantir/conjure-go/conjure/types/conjuretype" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/internal/gopath" ) diff --git a/wlog/diaglog/diag1log/thread_dump_test.go b/wlog/diaglog/diag1log/thread_dump_test.go index d78c1636..2689a30b 100644 --- a/wlog/diaglog/diag1log/thread_dump_test.go +++ b/wlog/diaglog/diag1log/thread_dump_test.go @@ -18,7 +18,7 @@ import ( "testing" "github.com/palantir/conjure-go/conjure/types/conjuretype" - "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/spec/logging" + "github.com/palantir/witchcraft-go-logging/conjure/witchcraft/api/logging" "github.com/palantir/witchcraft-go-logging/wlog/diaglog/diag1log" "github.com/stretchr/testify/require" )