sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Add optional servername to transaction

Open SimonCropp opened this issue 2 years ago • 3 comments

Same as how it exists on event

https://develop.sentry.dev/sdk/event-payloads/#optional-attributes

SimonCropp avatar Sep 16 '22 22:09 SimonCropp

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.

mattjohnsonpint avatar Sep 16 '22 22:09 mattjohnsonpint

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?

SimonCropp avatar Sep 19 '22 03:09 SimonCropp

De-prioritizing this as it will get picked up on its own with the move to "sending spans only"

bitsandfoxes avatar May 08 '24 13:05 bitsandfoxes