# WithSpanCallback

**Kind**: type alias | **Module**: [Insights](https://docs.interop.io/desktop/reference/javascript/insights/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/insights/withspancallback/index.html

Callback executed during a span. See `withSpan`

```ts
type WithSpanCallback = (tracingState: TracingState) => T
```

**Parameters**

- **`tracingState`** (`TracingState`, required)

**Returns**: `T`

## Related types

- [TracingState](https://docs.interop.io/desktop/reference/javascript/insights/tracingstate/index.md)
