Skip to content

Add Hint support to beforeSend and Event processors #1469

@lawrence-laz

Description

@lawrence-laz

Hi, Sentry is great!
I am however missing a way to add an attachment to an outgoing event in the BeforeSend callback.
For example:

using var host = Host.CreateDefaultBuilder()
    .ConfigureLogging((context, builder) =>
    {
        builder.AddSentry(options =>
        {
            options.BeforeSend = sentryEvent =>
            {
                sentryEvent.AddBreadcrumb("Hello"); // I can do this
                sentryEvent.AddAttachment("Foo.txt"); // But I cannot do this
                return sentryEvent;
            };
        };
    })
    .Build();

Am I missing something, or this is a missing feature?

Metadata

Metadata

Labels

FeatureNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions