# Telemetry

Doddle emits certain events when certain actions happen in the system. You can subscribe to these events.

### Events

| Event                 | Description                                              |
| --------------------- | -------------------------------------------------------- |
| JobCompletedEvent     | Fired when a job is executed successfully                |
| JobCreatedEvent       | Fired when a job has been created                        |
| JobEnqueuedEvent      | Fired when a job has been enqueued ready to be processed |
| JobExceptionEvent     | Fired when a job throws an exception                     |
| JobExecutingEvent     | Fired when a job starts executing                        |
| JobFailedEvent        | Fired when a job fails                                   |
| JobSelectedEvent      | Fired when a job has been picked                         |
| CronJobCreatedEvent   | Fired when a job is created                              |
| CronJobScheduledEvent | Fired when a cron job is scheduled                       |
| CronJobUpdatedEvent   | Fired when a cron job is updated                         |
| QueueCreatedEvent     | Fired when a queue is created                            |
| QueueUpdatedEvent     | Fired when a queue is updated                            |

### Configuration

During the client configuration bootstrapping stage, subscribe to telemetry events like follows:

```java
builder.telemetry(new TelemetrySubscriber() {
    @Override
    public void handle(final TelemetryEvent event) {
        logger.info("Received telemetry event: {}", event.name());
    }

    /**
     * Only subscribe to the events you want to receive
     */
    @Override
    public boolean supports(final String name) {
        return asList("job.selected", "job.created").contains(name);
    }
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jamhall.gitbook.io/doddle/concepts/telemetry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
