Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #83 from keptn/feature/4306/add-log-event
Browse files Browse the repository at this point in the history
#4306 added sh.keptn.log.error event
  • Loading branch information
bacherfl authored Jun 15, 2021
2 parents e2044b2 + dd9ac93 commit 7a15f56
Showing 1 changed file with 77 additions and 12 deletions.
89 changes: 77 additions & 12 deletions cloudevents.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [Get-SLI](#get-sli)
* [Monitoring](#monitoring)
* [Problem](#problem)
* [Error Log](#error-log)
---
All Keptn events conform to the CloudEvents spec in [version 1.0](https://github.com/cloudevents/spec/blob/v1.0/spec.md). The CloudEvents specification is a vendor-neutral specification for defining the format of event data.

Expand Down Expand Up @@ -264,8 +265,8 @@ sh.keptn.event.project.create.started
"result": "pass",
"message": "a message"
},
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
}
```

Expand Down Expand Up @@ -470,8 +471,8 @@ sh.keptn.event.service.create.started
"result": "pass",
"message": "a message"
},
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
}
```

Expand Down Expand Up @@ -853,8 +854,8 @@ sh.keptn.event.approval.started
"result": "pass",
"message": "a message"
},
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
}
```

Expand Down Expand Up @@ -1745,8 +1746,8 @@ sh.keptn.event.test.started
"result": "pass",
"message": "a message"
},
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
}
```

Expand Down Expand Up @@ -3287,8 +3288,8 @@ sh.keptn.event.get-action.started
"result": "pass",
"message": "a message"
},
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
}
```

Expand Down Expand Up @@ -3652,8 +3653,8 @@ sh.keptn.event.action.started
"result": "pass",
"message": "a message"
},
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1",
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6"
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
}
```

Expand Down Expand Up @@ -4338,3 +4339,67 @@ sh.keptn.events.problem
```

([↑ up to index](#keptn-cloud-events))
### General purpose events
In addition to the task sequence/task events listed above, Keptn also supports the following general-purpose events:
### Logging
For easier debugging of errors that occur either during the execution of a task of a sequence, or while performing any other operation, Keptn integration services can send error log events to the Keptn API via the distributor.
#### Error Log
##### Type
sh.keptn.log.error
##### Data Json Schema

<details><summary>Json Schema of sh.keptn.log.error</summary>
<p>

```json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/ErrorLogEvent",
"definitions": {
"ErrorLogEvent": {
"required": [
"message",
"integrationid",
"task"
],
"properties": {
"message": {
"type": "string"
},
"integrationid": {
"type": "string"
},
"task": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
}
}
}
```
</p>
</details>

##### Example Cloud Event

```json
{
"specversion": "1.0",
"id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53",
"source": "source-service",
"type": "sh.keptn.log.error",
"datacontenttype": "application/json",
"data": {
"message": "an unexpected error occurred",
"integrationid": "2b4b199c-cdaf-11eb-b8bc-0242ac130003",
"task": "deployment"
},
"triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6",
"shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1"
}
```

([&uarr; up to index](#keptn-cloud-events))

0 comments on commit 7a15f56

Please sign in to comment.