---
title: "emitEvent(_:id:)"
framework: os
role: symbol
role_heading: Instance Method
path: "os/ossignposter/emitevent(_:id:)"
---

# emitEvent(_:id:)

Marks a point of interest in time.

## Declaration

```swift
func emitEvent(_ name: StaticString, id: OSSignpostID = .exclusive)
```

## Parameters

- `name`: The event’s name.
- `id`: The event’s identifier. The default value is doc://com.apple.os/documentation/os/OSSignpostID/exclusive.

## Mentioned in

Recording Performance Data

## Discussion

Discussion You can use the makeSignpostID() and makeSignpostID(from:) methods to generate an identifier for the event, as the following example shows: // Create a signposter using the default subsystem. let signposter = OSSignposter()          // Generate a signpost ID to associate with the event. let signpostID = signposter.makeSignpostID()          // Emit a named event using the signpost ID. signposter.emitEvent("Example Event", id: signpostID)

## See Also

### Emitting Individual Signposts

- [emitEvent(_:id:_:)](os/ossignposter/emitevent(_:id:_:).md)
