-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Filter to HangfireInstrumentationOptions (#1440)
- Loading branch information
Showing
7 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/OpenTelemetry.Instrumentation.Hangfire/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/OpenTelemetry.Instrumentation.Hangfire.Tests/ProcessorMock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System; | ||
|
||
namespace OpenTelemetry.Instrumentation.Hangfire.Tests; | ||
|
||
public class ProcessorMock<T> : BaseProcessor<T> | ||
{ | ||
private readonly Action<T>? onStart; | ||
private readonly Action<T>? onEnd; | ||
|
||
public ProcessorMock(Action<T>? onStart = null, Action<T>? onEnd = null) | ||
{ | ||
this.onStart = onStart; | ||
this.onEnd = onEnd; | ||
} | ||
|
||
public override void OnStart(T data) | ||
{ | ||
this.onStart?.Invoke(data); | ||
} | ||
|
||
public override void OnEnd(T data) | ||
{ | ||
this.onEnd?.Invoke(data); | ||
} | ||
} |