sentry-dotnet
sentry-dotnet copied to clipboard
Add optional servername to transaction
Same as how it exists on event
https://develop.sentry.dev/sdk/event-payloads/#optional-attributes
Looks like we are applying this in MainSentryEventProcessor
https://github.com/getsentry/sentry-dotnet/blob/7e455257ad1fcd708be847cf2b416a10e7488b0b/src/Sentry/Internal/MainSentryEventProcessor.cs#L75-L86
We may want to add a main transaction processor to cover this. Perhaps there are other things to apply by default to transactions. We may even be able to refactor to share some code between them.
Keep in mind that from Sentry's perspective, all transactions are also events. So anything that is required or optional on events is also required or optional on transactions.
Some things might still make sense to only have on one or the other though. Logger
for example, doesn't make sense for transactions, IMHO.
so (at the .net level) the current things that Event has and Transaction does not are
List<DebugImage>? DebugImages
Exception? Exception
SentryMessage? Message
IDictionary<string, string> Modules
IEnumerable<SentryException>? SentryExceptions
IEnumerable<SentryThread>? SentryThreads
string? ServerName
Which seem to map to the following
- https://develop.sentry.dev/sdk/event-payloads/debugmeta/
- https://develop.sentry.dev/sdk/event-payloads/exception/
- https://develop.sentry.dev/sdk/event-payloads/message/
- modules https://develop.sentry.dev/sdk/event-payloads/#optional-attributes
- https://develop.sentry.dev/sdk/event-payloads/exception/
- https://develop.sentry.dev/sdk/event-payloads/threads/
- ServerName https://develop.sentry.dev/sdk/event-payloads/#optional-attributes
should all of those exist in transaction?
De-prioritizing this as it will get picked up on its own with the move to "sending spans only"