We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
Our team use this sink and I notice that current version has not fignerprint support. Will you add this support in next releases?
I tried to add this support into sink by myself but solution is not convenient and seems dirty - combination of custom enricher and some logic in sink
class FingerprintEnricher : ILogEventEnricher { public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) { if (logEvent.MessageTemplate.Text.StartsWith("test"))//some logic to check { logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty( "Fingerprint", new[] { "Source: some source" })); } } }
in SerilogSink.Emit
var fingerPrints = logEvent.Properties.Where(pair => pair.Key == "Fingerprint").Select(e => e.Value).ToArray(); foreach (var fingerPrint in fingerPrints) { sentryEvent.Fingerprint.Add(fingerPrint.ToString()); }
On the other side we have new sentry sdk with static call
SentrySdk.ConfigureScope(scope => { scope.SetFingerprint(new[] { "my-view-function" }); });
It may be more sense to rewrite current sink to new sdk.
The text was updated successfully, but these errors were encountered:
Another variant to add in sink
var fingerPrint = logEvent.Properties .Where(e =>string.Equals(e.Key, "fingerprint", StringComparison.OrdinalIgnoreCase)) .Select(e => e.Value) .FirstOrDefault(); if (fingerPrint != null && !string.IsNullOrEmpty(fingerPrint.ToString())) { sentryEvent.Fingerprint.Add(fingerPrint.ToString()); }
Use case: logger.Log("{fingerprint} Some Message {some other parametr}", exception, fingerprint, param1)
logger.Log("{fingerprint} Some Message {some other parametr}", exception, fingerprint, param1)
Sorry, something went wrong.
No branches or pull requests
Hi
Our team use this sink and I notice that current version has not fignerprint support. Will you add this support in next releases?
I tried to add this support into sink by myself but solution is not convenient and seems dirty - combination of custom enricher and some logic in sink
in SerilogSink.Emit
On the other side we have new sentry sdk with static call
It may be more sense to rewrite current sink to new sdk.
The text was updated successfully, but these errors were encountered: