Skip to content

Commit

Permalink
Merge pull request #187 from DataDog/olivierg/add-exception-handler-t…
Browse files Browse the repository at this point in the history
…o-DogStatsd

Add the exception handler in the method `DogStatsd.Configure`
  • Loading branch information
ogaca-dd authored Oct 26, 2022
2 parents 2a289bd + 9221d23 commit a126d7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/StatsdClient/Dogstatsd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ public static class DogStatsd
/// Must be called before any other methods.
/// </summary>
/// <param name="config">The value of the config.</param>
public static void Configure(StatsdConfig config) => _dogStatsdService.Configure(config);
/// <param name="optionalExceptionHandler">The handler called when an error occurs."</param>
/// <returns>Return true if the operation succeed, false otherwise. If this function fails,
/// other methods in this class do nothing and an error is reported to <paramref name="optionalExceptionHandler"/>.</returns>
public static bool Configure(StatsdConfig config, Action<Exception> optionalExceptionHandler = null)
{
return _dogStatsdService.Configure(config, optionalExceptionHandler);
}

/// <summary>
/// Records an event.
Expand Down

0 comments on commit a126d7a

Please sign in to comment.