# DiagnosticEventCollector.DiagnosticEventCollector(string[])

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/) | [Constructors](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/constructors/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Diagnostics/DiagnosticEventCollector.cs)

```csharp
public DiagnosticEventCollector(params string[] listenerPrefixes)
```

Creates a new diagnostic event collector that subscribes to listeners with names starting with any of the specified prefixes.

### Parameters

- `listenerPrefixes` (`string[]`): Prefixes of listener names to subscribe to (e.g., "Orleans." to capture all Orleans events). If empty, subscribes to all listeners.
