Sentry Static and thread safe wrapper around NullabilityInfoContext. Returns the maximum value in a generic sequence according to a specified key selector function. The type of the elements of . The type of key to compare elements by. A sequence of values to determine the maximum value of. A function to extract the key for each element. The value with the maximum key in the sequence. is . No key extracted from implements the or interface. If is a reference type and the source sequence is empty or contains only values that are , this method returns . Returns the maximum value in a generic sequence according to a specified key selector function. The type of the elements of . The type of key to compare elements by. A sequence of values to determine the maximum value of. A function to extract the key for each element. The to compare keys. The value with the maximum key in the sequence. is . No key extracted from implements the or interface. If is a reference type and the source sequence is empty or contains only values that are , this method returns . Returns the minimum value in a generic sequence according to a specified key selector function. The type of the elements of . The type of key to compare elements by. A sequence of values to determine the minby value of. A function to extract the key for each element. The value with the minimum key in the sequence. is . No key extracted from implements the or interface. If is a reference type and the source sequence is empty or contains only values that are , this method returns . Returns the minimum value in a generic sequence according to a specified key selector function. The type of the elements of . The type of key to compare elements by. A sequence of values to determine the minimum value of. A function to extract the key for each element. The to compare keys. The value with the minimum key in the sequence. is . No key extracted from implements the or interface. If is a reference type and the source sequence is empty or contains only values that are , this method returns . Gets the nanosecond component of the time represented by the current object. Gets the nanosecond component of the time represented by the current object. Gets the nanosecond component of the time represented by the current object. Gets the microsecond component of the time represented by the current object. Gets the microsecond component of the time represented by the current object. Gets the microsecond component of the time represented by the current object. Returns a new object that adds a specified number of microseconds to the value of this instance.. Returns a new object that adds a specified number of microseconds to the value of this instance.. Tries to format the value of the current instance into the provided span of characters. Tries to format the value of the current instance into the provided span of characters. Gets a value that indicates whether the current Type represents a type parameter in the definition of a generic method. Baggage Header for dynamic sampling. Creates the baggage header string based on the members of this instance. The baggage header string. Parses a baggage header string. The string to parse. When false, the resulting object includes all list members present in the baggage header string. When true, the resulting object includes only members prefixed with "sentry-". An object representing the members baggage header, or null if there are no members parsed. Controls blocking detection suppression Suppresses blocking detection for a particular code block using (new SuppressBlockingDetection()) { Task.Delay(10).Wait(); // Will not trigger a blocking detection event due to suppression } Reinstates previous blocking detection behavior For testing only Contains representations of the subset of properties in SentryOptions that can be set from ConfigurationBindings. Note that all of these properties are nullable, so that if they are not present in configuration, the values from the type being bound to will be preserved. Series of application events. A timestamp representing when the breadcrumb occurred. This can be either an ISO datetime string, or a Unix timestamp. If a message is provided, it’s rendered as text and the whitespace is preserved. Very long text might be abbreviated in the UI. The type of breadcrumb. The default type is default which indicates no specific handling. Other types are currently http for HTTP requests and navigation for navigation events. Data associated with this breadcrumb. Contains a sub-object whose contents depend on the breadcrumb type. Additional parameters that are unsupported by the type are rendered as a key/value table. Dotted strings that indicate what the crumb is or where it comes from. Typically it’s a module name or a descriptive string. For instance aspnet.mvc.filter could be used to indicate that it came from an Action Filter. The level of the event. Levels are used in the UI to emphasize and de-emphasize the crumb. Initializes a new instance of the class. The message. The type. The data. The category. The level. Initializes a new instance of the class. The message. The type. The data. The category. The level. Parses from JSON. The level of the Breadcrumb. Debug level. Information level. This is value 0, hence, default. Warning breadcrumb level. Error breadcrumb level. Critical breadcrumb level. Well known values for built in metrics that can be configured for Matches the built in Microsoft.AspNetCore.Hosting metrics Pattern:
^Microsoft\\.AspNetCore\\.Hosting$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.Hosting".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.Routing metrics Pattern:
^Microsoft\\.AspNetCore\\.Routing$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.Routing".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.Diagnostics metrics Pattern:
^Microsoft\\.AspNetCore\\.Diagnostics$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.Diagnostics".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.RateLimiting metrics Pattern:
^Microsoft\\.AspNetCore\\.RateLimiting$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.RateLimiting".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.HeaderParsing metrics Pattern:
^Microsoft\\.AspNetCore\\.HeaderParsing$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.HeaderParsing".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.Server.Kestrel metrics Pattern:
^Microsoft\\.AspNetCore\\.Server\\.Kestrel$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.Server.Kestrel".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.AspNetCore.Http.Connections metrics Pattern:
^Microsoft\\.AspNetCore\\.Http\\.Connections$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.AspNetCore.Http.Connections".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.Extensions.Diagnostics.HealthChecks metrics Pattern:
^Microsoft\\.Extensions\\.Diagnostics\\.HealthChecks$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.Extensions.Diagnostics.HealthChecks".
○ Match if at the end of the string or if before an ending newline.
Matches the built in Microsoft.Extensions.Diagnostics.ResourceMonitoring metrics Pattern:
^Microsoft\\.Extensions\\.Diagnostics\\.ResourceMonitoring$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "Microsoft.Extensions.Diagnostics.ResourceMonitoring".
○ Match if at the end of the string or if before an ending newline.
Matches the built in System.Net.NameResolution metrics Pattern:
^OpenTelemetry\\.Instrumentation\\.Runtime$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "OpenTelemetry.Instrumentation.Runtime".
○ Match if at the end of the string or if before an ending newline.
Matches the built in System.Net.NameResolution metrics Pattern:
^System\\.Net\\.NameResolution$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "System.Net.NameResolution".
○ Match if at the end of the string or if before an ending newline.
Matches the built in metrics Pattern:
^System\\.Net\\.Http$
Options:
RegexOptions.Compiled
Explanation:
○ Match if at the beginning of the string.
○ Match the string "System.Net.Http".
○ Match if at the end of the string or if before an ending newline.
Matches all built in metrics Attachment sourced from a provided byte array. Creates a new instance of . A type of application crash. Used exclusively by . A managed will be thrown from .NET. A managed will be thrown from .NET on a background thread. A native operation that will crash the application will be performed by a C library. Possible modes of dropping events that are detected to be duplicates. Same event instance. Assumes no object reuse/pooling. An exception that was captured twice. An exception already captured exists as an inner exception. An exception already captured is part of the aggregate exception. All modes combined. Defines the logic for applying state onto a scope. Applies state onto a scope. The Data Source Name of a given project in Sentry. Source DSN string. The project ID which the authenticated user is bound to. An optional path of which Sentry is hosted. The optional secret key to authenticate the SDK. The required public key to authenticate the SDK. Sentry API's base URI. A way to configure the DSN via attribute defined at the entry-assembly. The string DSN or empty string to turn the SDK off. Creates a new instance of . Provides the Dynamic Sampling Context for a transaction. Gets an empty that can be used to "freeze" the DSC on a transaction. Settings for the experimental Metrics feature. This feature is preview only and will very likely change in the future without a major version bump... so use at your own risk. Determines whether code locations should be recorded for Metrics A list of Substrings or Regular Expressions. Any `System.Diagnostics.Metrics.Instrument` whose name matches one of the items in this list will be collected and reported to Sentry. These can be either custom Instruments that you have created or any of the built in metrics that are available. See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics for more information. A list of Substrings or Regular Expressions. Instruments for any `System.Diagnostics.Metrics.Meter` whose name matches one of the items in this list will be collected and reported to Sentry. These can be either custom Instruments that you have created or any of the built in metrics that are available. See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics for more information. Base type for payload extraction. Extract the payload of the . Whether this implementation supports the . The extraction that gets called in case is true. Default request payload extractor that will read the body as a string. Whether the is supported. Extracts the request body of the as a string. The generic overloads avoid boxing in case logging is disabled for that level Calls to this class verify the level before calling the overload with object params. Log an internal SDK message. Log a debug message. Log a debug message. Log a debug message. Log a debug message. Log a debug message. Log a debug message. Log a debug message. Log a info message. Log a info message. Log a info message. Log a info message. Log a info message. Log a info message. Log a info message. Log a info message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a warning message. Log a error message. Log an exception with an error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log a error message. Log an error message. Log an error message. Log a warning message. Log an exception with a warning message. Log a warning message. Log an exception with a warning message. Disabled Hub. The singleton instance. Always disabled. No-Op. No-Op. No-Op. No-Op. Returns a dummy transaction. No-Op. Returns null. Returns null. Returns null. Returns sampled out transaction context. Returns sampled out transaction context. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op. No-Op No-Op. Disabled Metrics Aggregator (all methods are no-op). No-Op. No-Op. No-Op. Form based request extractor. Supports with content type application/x-www-form-urlencoded. Extracts the request form data as a dictionary. An implementation of which forwards any call to . Allows testing classes which otherwise would need to depend on static by having them depend on instead, which can be mocked. The single instance which forwards all calls to Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to . Forwards the call to Forwards the call to A worker that queues envelopes synchronously and flushes async. Attempts to enqueue the envelope with the worker. The envelope to enqueue. True of queueing was successful. Otherwise, false. Flushes envelopes asynchronously. How long to wait for flush to finish. A task to await for the flush operation. Current count of items queued up. Abstraction for internal logging. Whether the logger is enabled or not to the specified . Log an internal SDK message. The level. The message. An optional Exception. Optional arguments for string template. A filter to be applied to an exception instance. Whether to filter out or not the exception. The exception about to be captured. true if [the event should be filtered out]; otherwise, false. Provides a mechanism to convey network status. Used internally by some integrations. Not intended for public usage. This must be public because we use it in Sentry.Maui, which can't use InternalsVisibleTo because MAUI assemblies are not strong-named. Gets a value that indicates whether the network is online. Asynchronously waits for the network to come online. A token which cancels waiting. A request body extractor. Extracts the payload of the provided . The HTTP Request object. The extracted payload. Process exceptions and augments the event with its data. Process the exception and augments the event with its data. The exception to process. The event to add data to. Process a SentryEvent during the prepare phase. Process the The event to process The processed event or null if the event was dropped. The event returned can be the same instance received or a new one. Returning null will stop the processing pipeline. Meaning the event should no longer be processed nor send. Process a SentryEvent during the prepare phase. Process the The event to process A with context that may be useful prior to sending the event The processed event or null if the event was dropped. The event returned can be the same instance received or a new one. Returning null will stop the processing pipeline so that the event will neither be processed by additional event processors or sent to Sentry. An abstraction to an HTTP Request. The content length. The content type. The request body. Represents the parsed form values sent with the HttpRequest. Factory to from an . Creates a from the optional . The exception to create the stacktrace from. A Sentry stack trace. Process a during the prepare phase. Process the The Transaction to process The transaction returned can be the same instance received or a new one. Returning null will stop the processing pipeline. Meaning the transaction should no longer be processed nor send. Process a during the prepare phase. Process the The Transaction to process A with context that may be useful prior to sending the transaction The transaction returned can be the same instance received or a new one. Returning null will stop the processing pipeline. Meaning the transaction should no longer be processed nor send. An abstraction to the transport of the event. Sends the to Sentry asynchronously. The envelope to send to Sentry. The cancellation token. Dispatches request body extractions if enabled and within limits. Creates a new instance of . Extractors to use. Sentry Options. The max request size to capture. Extract the payload using the provided extractors. The request. A serializable representation of the payload. The size allowed when extracting a request body in a web application. No request payload is extracted This is the default value. Opt-in is required. A small payload is extracted. A medium payload is extracted. The SDK will always capture the request body. Sentry might truncate or reject the event if too large. Process an exception type and augments the event with its data. The type of the exception to process. Process the exception and event. The exception to process. The event to process. Default factory to from an . Creates an instance of . Creates a from the optional . The exception to create the stacktrace from. A Sentry stack trace. Attachment sourced from the file system. Creates a new instance of . The path to the file to attach. Creates a new instance of . The path to the file to attach. Whether to use async file I/O to read the file. Implementation of CRC-32. This class supports several convenient static methods returning the CRC as UInt32. Initializes a new instance of the class. Initializes a new instance of the class. Should return bytes result as big endian or little endian Computes CRC-32 from multiple buffers. Call this method multiple times to chain multiple buffers. Initial CRC value for the algorithm. It is zero for the first buffer. Subsequent buffers should have their initial value set to CRC value returned by previous call to this method. Input buffer with data to be checksummed. Offset of the input data within the buffer. Length of the input data in the buffer. Accumulated CRC-32 of all buffers processed so far. Computes CRC-32 from multiple buffers. Call this method multiple times to chain multiple buffers. Initial CRC value for the algorithm. It is zero for the first buffer. Subsequent buffers should have their initial value set to CRC value returned by previous call to this method. Input buffer containing data to be checksummed. Accumulated CRC-32 of all buffers processed so far. Computes CRC-32 from input buffer. Input buffer with data to be checksummed. Offset of the input data within the buffer. Length of the input data in the buffer. CRC-32 of the data in the buffer. Computes CRC-32 from input buffer. Input buffer containing data to be checksummed. CRC-32 of the buffer. Computes CRC-32 from input buffer and writes it after end of data (buffer should have 4 bytes reserved space for it). Can be used in conjunction with Input buffer with data to be checksummed. Offset of the input data within the buffer. Length of the input data in the buffer. CRC-32 of the data in the buffer. Computes CRC-32 from input buffer - 4 bytes and writes it as last 4 bytes of buffer. Can be used in conjunction with Input buffer with data to be checksummed. CRC-32 of the data in the buffer. Validates correctness of CRC-32 data in source buffer with assumption that CRC-32 data located at end of buffer in reverse bytes order. Can be used in conjunction with Input buffer with data to be checksummed. Offset of the input data within the buffer. Length of the input data in the buffer with CRC-32 bytes. Is checksum valid. Validates correctness of CRC-32 data in source buffer with assumption that CRC-32 data located at end of buffer in reverse bytes order. Can be used in conjunction with Input buffer with data to be checksummed. Is checksum valid. Resets internal state of the algorithm. Used internally. Appends CRC-32 from given buffer Computes CRC-32 from Document containing GraphQL to execute. It can be null for automatic persisted queries, in which case a SHA-256 hash of the query would be sent in the Extensions. See https://www.apollographql.com/docs/apollo-server/performance/apq/ for details. Returns the OperationName if present or "graphql" otherwise. Returns the OperationType if present or "graphql.operation" otherwise. Constants used to name Hints generated by the Sentry SDK Used for HttpResponseMessage hints Provides a base class for Sentry HTTP transports. Used internally by the Sentry SDK, but also allows for higher-level SDKs (such as Unity) to implement their own transport. Constructor for this class. The Sentry options. An optional method used to read environment variables. An optional system clock - used for testing. Processes an envelope before sending. Repackages the original envelope discarding items that don't fit the rate limit. The envelope to process. The processed envelope, ready to be sent. Creates an HTTP request message from an envelope. The envelope. An HTTP request message, with the proper headers and body set. Throws if the DSN is not set in the options. Synchronously handles the response message after it is received, extracting any information from the response such as rate limits, or error messages. The response message received from Sentry. The envelope that was being sent. Asynchronously handles the response message after it is received, extracting any information from the response such as rate limits, or error messages. The response message received from Sentry. The envelope that was being sent. A cancellation token. Reads a stream from an HTTP content object. The HTTP content object to read from. A stream of the content. This is a helper method that allows higher-level APIs to serialize content synchronously without exposing our custom type. Sentry factory. Creates an HttpClient using the specified options. The options. . Holds a fully-inclusive range of HTTP status codes. e.g. Start = 500, End = 599 represents the range 500-599. The inclusive start of the range. The inclusive end of the range. Creates a range that will only match a single value. The value in the range. Creates a range that will match all values between and . The inclusive start of the range. The inclusive end of the range. Thrown if is greater than . Implicitly converts a tuple of ints to a . A tuple of ints to convert. Implicitly converts an int to a . An int to convert. Implicitly converts an to a . A status code to convert. Implicitly converts a tuple of to a . A tuple of status codes to convert. Checks if a given status code is contained in the range. Status code to check. True if the range contains the given status code. Checks if a given status code is contained in the range. Status code to check. True if the range contains the given status code. Extension methods for . Starts a transaction. Starts a transaction. Starts a transaction. Starts a transaction from the specified trace header. Adds a breadcrumb to the current scope. The Hub which holds the scope stack. The message. Category. Breadcrumb type. Additional data. Breadcrumb level. Adds a breadcrumb using a custom which allows better testability. The Hub which holds the scope stack. The system clock. The message. Category. Breadcrumb type. Additional data. Breadcrumb level. This method is to be used by integrations to allow testing. Adds a breadcrumb to the current scope. The Hub which holds the scope stack. The breadcrumb to add An hint provided with the breadcrumb in the BeforeBreadcrumb callback Pushes a new scope while locking it which stop new scope creation. Lock the scope so subsequent don't create new scopes. This is useful to stop following scope creation by other integrations like Loggers which guarantee log messages are not lost. Unlocks the current scope to allow subsequent calls to create new scopes. Captures the exception with a configurable scope callback. The Sentry hub. The exception. The callback to configure the scope. The Id of the event Captures a message with a configurable scope callback. The Sentry hub. The message to send. The callback to configure the scope. The message level. The Id of the event Attachment content. Gets the stream that represents attachment content. Models members common between types that represent event-like data. A trail of events which happened prior to an issue. Adds a breadcrumb. The release distribution of the application. Sentry level. Gets or sets the HTTP. The HTTP. Gets the structured Sentry context. The contexts. Gets the user information. The user. The release version of the application. The environment name, such as 'production' or 'staging'. Requires Sentry 8.0 or higher. The name of the transaction in which there was an event. A transaction should only be defined when it can be well defined. On a Web framework, for example, a transaction is the route template rather than the actual request path. That is so GET /user/10 and /user/20 (which have route template /user/{id}) are identified as the same transaction. SDK information. New in Sentry version: 8.4 A list of strings used to dictate the deduplication of this event. A value of {{ default }} will be replaced with the built-in behavior, thus allowing you to extend it, or completely replace it. New in version Protocol: version '7' { "fingerprint": ["myrpc", "POST", "/foo.bar"] } { "fingerprint": ["{{ default }}", "http://example.com/my.url"] } Extensions for . Adds a breadcrumb to the object. The object. The message. The category. The type. The data key-value pair. The level. Adds a breadcrumb to the object. The object. The message. The category. The type. The data. The level. Adds a breadcrumb to the object. This overload is used for testing. The object. The timestamp The message. The category. The type. The data The level. Whether a has been set to the object with any of its fields non null. Sets the fingerprint to the object. Sets the fingerprint to the object. Implemented by objects that contain a map of untyped extra data. An arbitrary mapping of additional metadata to store with the event. Sets an extra. Extensions for . Sets the extra key-value pairs to the object. Implemented by objects that contain a map of tags. Arbitrary key-value for this event. Sets a tag. Removes a tag. Extensions for . Set all items as tags. SDK API contract which combines a client and scope management. The contract of which exposes statically. This interface exist to allow better testability of integrations which otherwise would require dependency to the static . Last event id recorded in the current scope. Starts a transaction. Binds specified exception the specified span. This method is used internally and is not meant for public use. Gets the currently ongoing (not finished) span or null if none available. Gets the Sentry trace header that allows tracing across services Gets the Sentry baggage header that allows tracing across services Continues a trace based on HTTP header values provided as strings. If no "sentry-trace" header is provided a random trace ID and span ID is created. Continues a trace based on HTTP header values. If no "sentry-trace" header is provided a random trace ID and span ID is created. Starts a new session. Pauses an active session. Resumes an active session. If the session has been paused for longer than the duration of time specified in then the paused session is ended and a new one is started instead. Ends the currently active session. Captures an event with a configurable scope. This allows modifying a scope without affecting other events. The event to be captured. The callback to configure the scope. Captures an event with a configurable scope. This allows modifying a scope without affecting other events. The event to be captured. An optional hint to be provided with the event The callback to configure the scope. Exposes EXPERIMENTAL capability to emit metrics. This API is subject to change without major version bumps so use with caution. We advise disabling in production at the moment. Emits a Counter metric A unique key identifying the metric The value to be added An optional Optional Tags to associate with the metric The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided. Optional number of stacks levels to ignore when determining the code location Emits a Gauge metric A unique key identifying the metric The value to be added An optional Optional Tags to associate with the metric The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided. Optional number of stacks levels to ignore when determining the code location Emits a Distribution metric A unique key identifying the metric The value to be added An optional Optional Tags to associate with the metric The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided. Optional number of stacks levels to ignore when determining the code location Emits a Set metric A unique key identifying the metric The value to be added An optional Optional Tags to associate with the metric The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided. Optional number of stacks levels to ignore when determining the code location Emits a Set metric a A unique key identifying the metric The value to be added An optional Optional Tags to associate with the metric The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided. Optional number of stacks levels to ignore when determining the code location Emits a distribution with the time it takes to run a given code block. A unique key identifying the metric The value to be added An optional . Defaults to Optional Tags to associate with the metric The time when the metric was emitted Optional number of stacks levels to ignore when determining the code location Measures the time it takes to run a given code block and emits this as a metric. using (SentrySdk.Metrics.StartTimer("my-operation")) { ... } Flushes any flushable metrics and/or code locations. If is true then the cutoff is ignored and all metrics are flushed. Forces all buckets to be flushed, ignoring the cutoff A False if a shutdown is requested during flush, true otherwise Captures one or more metrics to be sent to Sentry. Captures one or more to be sent to Sentry. Starts a child span for the current transaction or, if there is no active transaction, starts a new transaction. Console logger used by the SDK to report its internal logging. The default logger, usually replaced by a higher level logging adapter like Microsoft.Extensions.Logging. Creates a new instance of . Base class for diagnostic loggers. Creates a new instance of . Whether the logger is enabled to the defined level. Log message with level, exception and parameters. Writes a formatted message to the log. The complete message, ready to be logged. File logger used by the SDK to report its internal logging to a file. Primarily used to capture debug information to troubleshoot the SDK itself. Creates a new instance of . The path to the file to write logs to. Will overwrite any existing file. If true, will write to the console as well as the file. Creates a new instance of . The path to the file to write logs to. Will overwrite any existing file. The minimal level to log. If true, will write to the console as well as the file. An abstraction to the system clock. Agree to disagree with closing this: https://github.com/aspnet/Common/issues/151 Gets the current time in UTC. Implementation of to help testability. Constructs a SystemClock instance. This constructor should have been private originally. It will be removed in a future major version. System clock singleton. Gets the current time in UTC. Used for testability, calls: DateTimeOffset.UtcNow Trace logger used by the SDK to report its internal logging. Logger available when hooked to an IDE. It's useful when debugging apps running under IIS which have no output to Console logger. Creates a new instance of . Describes which approach is used to create spans. Spans are instrumented via the Sentry SDK. Spans are instrumented via OpenTelemetry. An SDK Integration. Registers this integration with the hub. This method is invoked when the Hub is created. The hub. The options. Overload for testing purposes This method uses reflection to hook up an UnhandledExceptionHandler. When IsTrimmed is true, users will have follow our guidance to perform this initialization manually. Attempts to enqueue the envelope with the worker. The envelope to enqueue. Whether to process the next item in the queue after enqueuing this item, which may or may not be the item being enqueued. The default is true. Pass false for testing, when you want to add items to the queue without unblocking the worker. After items are enqueued, use to unblock the worker to process the items. Disposing the worker will also unblock the items, which will then be processed until the shutdown timeout is reached or the queue is emptied. True of queueing was successful. Otherwise, false. Processes the number of queued items specified. Used only in testing, after calling when passing process: false. The number of items to process from the queue. Stops the background worker and waits for it to empty the queue until 'shutdownTimeout' is reached Parses from . A minimal replacement for We're using this due to a memory leak that happens when using ConcurrentQueue in the BackgroundWorker. See https://github.com/getsentry/sentry-dotnet/issues/2516 Internal Constant Values. Sentry DSN environment variable. Sentry release environment variable. Sentry environment, environment variable. Default Sentry environment setting. Best Sentry practice is to always try and have a value for this setting. Allows synchronizing Context from .NET to native layers. We're providing a single method that the implementations should override. They can choose to either have the single method directly in native using p/invoke, or use a more fine-grained interface, whatever is best for the platform. WriteScope() is called in a new Task (background thread from a pool). It's also only used once. For changes in the scope done during the execution, ScopeObserver is used Sentry Stacktrace with debug images. Creates an enumerator of from a . Native AOT implementation of CreateFrame. Native frames have only limited method information at runtime (and even that can be disabled). We try to parse that and also add addresses for server-side symbolication. Default the implementation of CreateFrame. Create a from a . Clean up function and module names produced from `async` state machine calls. When the Microsoft cs.exe compiler compiles some modern C# features, such as async/await calls, it can create synthetic function names that do not match the function names in the original source code. Here we reverse some of these transformations, so that the function and module names that appears in the Sentry UI will match the function and module names in the original source-code. Clean up function names for anonymous lambda calls. Remove return type from module in a Task with a Lambda with a return value. This was seen in Unity, see https://github.com/getsentry/sentry-unity/issues/845 Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type. The default associated with a default instance. The source-generated options associated with this context. Determines whether an object is null. This method exists so that we can test for null in situations where a method might be called from code that ignores nullability warnings. (It prevents us having to have two different resharper ignore comments depending on target framework.) The subset of information about a DebugImage that we can obtain from a PE file. This rest of the information is obtained from the Module. Returns null if is null or contains only whitespace. Otherwise, returns . A GrowableArray that can be used as a key in a Dictionary. Note: it must be Seal()-ed before used as a key and can't be changed afterwards. Seal this array so that it cannot be changed anymore and can be hashed. Trims the size of the array so that no more than 'maxWaste' slots are wasted. You can call this even on Seal()'ed array because it doesn't affect the content and thus the hash code. A cheap version of List(T). The idea is to make it as cheap as if you did it 'by hand' using an array and an int which represents the logical charCount. It is a struct to avoid an extra pointer dereference, so this is really meant to be embedded in other structures. Adapted to null-safety from the original version licensed under MIT and located at: https://github.com/microsoft/perfview/blob/050c303943e74ff51ce584b2717e578d96684e85/src/FastSerialization/GrowableArray.cs Create a growable array with the given initial size it will grow as needed. Fetch the element at the given index which must be lower than `Count`. The number of elements in the array Remove all elements in the array. Add an item at the end of the array, growing as necessary. Add all items 'items' to the end of the array, growing as necessary. Insert 'item' directly at 'index', shifting all items >= index up. 'index' can be code:Count in which case the item is appended to the end. Larger indexes are not allowed. Remove 'count' elements starting at 'index' Returns true if there are no elements in the array. Trims the size of the array so that no more than 'maxWaste' slots are wasted. Useful when you know that the array has stopped growing. Returns true if the Growable array was initialized by the default constructor which has no capacity (and thus will cause growth on the first addition). This method allows you to lazily set the compacity of your GrowableArray by testing if it is of EmtpyCapacity, and if so set it to some useful capacity. This avoids unnecessary reallocs to get to a reasonable capacity. A string representing the array. Only intended for debugging. Executes 'func' for each element in the GrowableArray and returns a GrowableArray for the result. Perform a linear search starting at 'startIndex'. If found return true and the index in 'index'. It is legal that 'startIndex' is greater than the charCount, in which case, the search returns false immediately. This allows a nice loop to find all items matching a pattern. Returns the underlying array. Should not be used most of the time! IEnumerator implementation. Adapted from https://github.com/graphql-dotnet/graphql-dotnet/blob/42a299e77748ec588bf34c33334e985098563298/src/GraphQL.SystemTextJson/GraphQLRequestJsonConverter.cs#L64 Name for the operation name parameter. See https://github.com/graphql/graphql-over-http/blob/master/spec/GraphQLOverHTTP.md#request-parameters Name for the query parameter. See https://github.com/graphql/graphql-over-http/blob/master/spec/GraphQLOverHTTP.md#request-parameters A transport that caches envelopes to disk and sends them in the background. Note although this class has a method, it doesn't implement as this caused a dependency issue with Log4Net in some situations. See https://github.com/getsentry/sentry-dotnet/issues/3178 Default Sentry HttpClientFactory Creates an configure to call Sentry for the specified The HTTP options. Compresses the body of an HTTP request with GZIP while buffering the result. This handler doesn't use 'Content-Encoding: chunked' as it sets the 'Content-Length' of the request. Creates a new instance of . The actual handler which handles the request. The compression level to use. Constructing this type with of value is an invalid operation. Compresses the request body and sends a request with a buffered stream. The HTTP request to compress. The cancellation token. Compresses the body of an HTTP request with GZIP. Creates a new instance of . The actual handler which handles the request. The compression level to use. Constructing this type with of value is an invalid operation. Sends the request while compressing its payload. The HTTP request to compress. The cancellation token. Sends an envelope over this transport. The envelope to send. A cancellation token. This method implements the overarching workflow, but all features are implemented in the base class such that they can be shared with higher-level SDKs (such as Unity) that may implement their own method for performing HTTP transport. Retry After Handler which short-circuit requests following an HTTP 429. Initializes a new instance of the class. The inner handler which is responsible for processing the HTTP response messages. Sends an HTTP request to the inner handler while verifying the Response status code for HTTP 429. The HTTP request message to send to the server. A cancellation token to cancel operation. The task object representing the asynchronous operation. Records one count of a discarded event, with the given and . The reason for the event being discarded. The data category of the event being discarded. Generates a containing counts of discarded events that have been recorded. Also resets those counts to zero at the same time the report is generated. The , as long as there is something to report. Returns null if there were no discarded events recorded since the previous call to this method. Loads the current instance with the events from the provided . Useful when recovering from failures while sending client reports. The client report to load. Adapted from the LoadedPackage.FromBundle method in ILSpy: https://github.com/icsharpcode/ILSpy/blob/311658c7109c3872e020cba2525b1b3a371d5813/ICSharpCode.ILSpyX/LoadedPackage.cs#L111 commit a929fcb5202824e3c061f4824c7fc9ba867d55af Load a .NET single-file bundle. Adapted from BundleEntryDebugData.TryOpenStream in ILSpy: https://github.com/icsharpcode/ILSpy/blob/311658c7109c3872e020cba2525b1b3a371d5813/ICSharpCode.ILSpyX/LoadedPackage.cs#L208 commit a929fcb5202824e3c061f4824c7fc9ba867d55af Class for dealing with .NET 5 single-file bundles. Based on code from Microsoft.NET.HostModel. Check if the memory-mapped data is a single-file bundle FileType: Identifies the type of file embedded into the bundle. The bundler differentiates a few kinds of files via the manifest, with respect to the way in which they'll be used by the runtime. Reads the manifest header from the memory mapping. Reads the manifest header from the stream. Factory to create/attach profilers when a transaction starts. Called during transaction start to start a new profiler, if applicable. A profiler collecting ProfileInfo for a given transaction. Called when the transaction ends - this should stop profile samples collection. Process and collect the profile. The collected profile. A converter that removes dangerous classes from being serialized, and, also formats some classes like Exception and Type. The Module.Name for Modules that are embedded in SingleFileApps will be null or <Unknown>, in that case we can use Module.ScopeName instead A Module instance module.Name, if this is available. module.ScopeName otherwise Span class to use when we can't return null but a request to create a span couldn't be completed. Transaction class to use when we can't return null but a request to create a transaction couldn't be completed. Copied/Modified from https://github.com/mentaldesk/fuse/blob/91af00dc9bc7e1deb2f11ab679c536194f85dd4a/MentalDesk.Fuse/ObjectExtensions.cs Constants for semantic attribute names outlined by the OpenTelemetry specifications. and . Defines well-known span attribute keys. Extensions to help redact data that might contain Personally Identifiable Information (PII) before sending it to Sentry. Searches for URLs in text data and redacts any PII data from these, as required. The data to be searched The data, if no PII data is present or a copy of the data with PII data redacted otherwise When the code was initialized. When the device was initialized. Scope Observer wrapper for the common behaviour accross platforms. This is a struct-based alternative to . It avoids unnecessary allocations and includes realtime clock values. Exposes settings that are read from multiple places, such as environment variables, options, attributes, or defaults. Mockable variant of the Diagnostics.StackFrame. This is necessary to test NativeAOT code that relies on extensions from StackFrameExtensions. Returns a pointer to the base address of the native image that this stack frame is executing. A pointer to the base address of the native image or System.IntPtr.Zero if you're targeting the .NET Framework. Gets an interface pointer to the start of the native code for the method that is being executed. An interface pointer to the start of the native code for the method that is being executed or System.IntPtr.Zero if you're targeting the .NET Framework. Indicates whether the native image is available for the specified stack frame. true if a native image is available for this stack frame; otherwise, false. Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file column number, or 0 (zero) if the file column number cannot be determined. Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file line number, or 0 (zero) if the file line number cannot be determined. Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file name, or null if the file name cannot be determined. Gets the offset from the start of the Microsoft intermediate language (MSIL) code for the method that is executing. This offset might be an approximation depending on whether or not the just-in-time (JIT) compiler is generating debugging code. The generation of this debugging information is controlled by the System.Diagnostics.DebuggableAttribute. The offset from the start of the MSIL code for the method that is executing. Gets the method in which the frame is executing. The method in which the frame is executing. Builds a readable representation of the stack trace. A readable representation of the stack trace. Stores either a plain string or a Regular Expression, typically to match against filters in the SentryOptions Constructs a instance. The prefix or regular expression pattern to match on. Constructs a instance. Use this constructor when you want the match to be performed using a regular expression. Implicitly converts a to a . Implicitly converts a to a . Overload for testing purposes - allows us to supply a mock IMetricAggregator Provides a keyed set of counters that can be incremented, read, and reset atomically. The type of the key. Atomically adds to a counter based on the key provided, creating the counter if necessary. The key of the counter to increment. The amount to add to the counter. Atomically increments a counter based on the key provided, creating the counter if necessary. The key of the counter to increment. Gets a single counter's value while atomically resetting it to zero. The key to the counter. The previous value of the counter. If no counter with the given key has been set, this returns zero. Gets the keys and values of all of the counters while atomically resetting them to zero. A read-only dictionary containing the key and the previous value for each counter. Gets an enumerator over the keys and values of the counters. An enumerator. Gets the number of counters currently being tracked. Tests whether or not a counter with the given key exists. The key to check. True if the counter exists, false otherwise. Gets the current value of the counter specified. The key of the counter. The value of the counter, or zero if the counter does not yet exist. Returns true in all cases. Gets the current value of the counter specified, returning zero if the counter does not yet exist. The key of the counter. Gets all of the current counter keys. Gets all of the current counter values. Useless, but required by the IReadOnlyDictionary interface. Open Telemetry Keys https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md Keys specific to the SqlClient listener Keys specific to the Entity Framework listener Mapping of Database Providers to known Open Telemetry db.system https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#notes-and-well-known-identifiers-for-dbsystem EF Connections are often pooled. If we see the same connection multiple times, we reuse the span so that it shows as a single connection in the resulting waterfall chart on Sentry. Get the Query with error message and remove the unneeded values. Compiling query model: EF initialize...\r\nEF Query... becomes: EF Query... the query to be parsed value the filtered query We don't have a correlation id for compiled query events. We just return the first unfinished query compile span. Class that subscribes to specific listeners from DiagnosticListener. Class that consumes Entity Framework Core events. Used for EF Core 2.X and 3.X. Used for EF Core 2.X and 3.X. Observer for the sync. of Scopes across SDKs. Adds a breadcrumb. Sets an extra. Sets a tag. Removes a tag. Sets the user information. Sentry Client interface. Whether the client is enabled or not. Capture an envelope and queue it. The envelope. true if the enveloped was queued, false otherwise. Capture the event The event to be captured. An optional scope to be applied to the event. An optional hint providing high level context for the source of the event The Id of the event. Captures a user feedback. The user feedback to send to Sentry. Captures a transaction. Note: this method is NOT meant to be called from user code! Instead, call on the transaction. The transaction. Captures a transaction. Note: this method is NOT meant to be called from user code! Instead, call on the transaction. The transaction. The scope to be applied to the transaction A hint providing extra context. This will be available in callbacks prior to processing the transaction. Captures a session update. Note: this method is NOT meant to be called from user code! It will be called automatically by the SDK. The update to send to Sentry. Captures a Checkin. Flushes the queue of captured events until the timeout is reached. The amount of time allowed for flushing. A task to await for the flush operation. Sentry JsonSerializable. Writes the object as JSON. Note: this method is meant only for internal use and is exposed due to a language limitation. Avoid relying on this method in user code. Scope management. An implementation shall create new scopes and allow consumers modify the current scope. Configures the current scope. The configure scope. Asynchronously configure the current scope. The configure scope. A task that completes when the callback is done or a completed task if the SDK is disabled. Binds the client to the current scope. The client. Pushes a new scope into the stack which is removed upon Dispose. A disposable which removes the scope from the environment when invoked. Pushes a new scope into the stack which is removed upon Dispose. A state to associate with the scope. A disposable which removes the scope from the environment when invoked. Defines the logic for applying state onto a scope. Applies state onto a scope. Session metadata. Session auto-generated ID. Session distinct ID. Session start timestamp. Release. Environment. IP address of the user. User agent. Reported error count. Sentry User Factory Creates a Sentry representing the current principal. The protocol user SpanTracer interface Span description. Span operation. Span status. Starts a child span. Finishes the span. Finishes the span with the specified status. Finishes the span with the specified exception and status. Finishes the span with the specified exception and automatically inferred status. Extensions for . Starts a child span. Gets the transaction that this span belongs to. Gets the parent span for database operations. This is the last active non-database span, which might be the transaction root, or it might be some other child span of the transaction (such as a web request). Used by EF, EF Core, and SQLClient integrations. Immutable data belonging to a span. Start timestamp. End timestamp. Whether the span is finished. Get Sentry trace header. The measurements that have been set on the transaction. Sets a measurement on the transaction. The name of the measurement. The measurement. Extensions for Sets a measurement on the transaction. The transaction. The name of the measurement. The value of the measurement. The optional unit of the measurement. Transaction metadata. Transaction name. Whether the parent transaction of this transaction has been sampled. The source of the transaction name. Immutable data belonging to a transaction. The name of the platform. In most cases, the platform will be "csharp". However, it may differ if the event was generated from another embeded SDK. For example, when targeting net6.0-android, events generated by the Sentry Android SDK will have the platform "java". TransactionTracer interface Transaction name. Whether the parent transaction of this transaction has been sampled. Flat list of spans within this transaction. Gets the last active (not finished) span in this transaction. The unit of measurement of a metric value. A special measurement unit that is used for measurements that have no natural unit. Creates a custom measurement unit. The name of the custom measurement unit. It will be converted to lower case. The custom measurement unit. Returns the string representation of the measurement unit, as it will be sent to Sentry. Returns true if the operands are equal. Returns true if the operands are not equal. A time duration unit Nanosecond unit (10^-9 seconds) Microsecond unit (10^-6 seconds) Millisecond unit (10^-3 seconds) Second unit Minute unit (60 seconds) Hour unit (3,600 seconds) Day unit (86,400 seconds) Week unit (604,800 seconds) Implicitly casts a to a . A fraction unit Floating point fraction of 1. A ratio of 1.0 equals 100%. Ratio expressed as a fraction of 100. 100% equals a ratio of 1.0. Implicitly casts a to a . An information size unit Bit unit (1/8 of byte) Some computer systems may have a different number of bits per byte. Byte unit Kilobyte unit (10^3 bytes) Kibibyte unit (2^10 bytes) Megabyte unit (10^6 bytes) Mebibyte unit (2^20 bytes) Gigabyte unit (10^9 bytes) Gibibyte unit (2^30 bytes) Terabyte unit (10^12 bytes) Tebibyte unit (2^40 bytes) Petabyte unit (10^15 bytes) Pebibyte unit (2^50 bytes) Exabyte unit (10^18 bytes) Exbibyte unit (2^60 bytes) Implicitly casts a to a . Returns the keys for any buckets that are ready to be flushed (i.e. are for periods before the cutoff) Forces all buckets to be flushed, ignoring the cutoff An enumerable containing the keys for any buckets that are ready to be flushed Clear out stale seen locations once a day The aggregator shifts it's flushing by up to an entire rollup window to avoid multiple clients trampling on end of a 10 second window as all the buckets are anchored to multiples of ROLLUP seconds. We randomize this number once per aggregator boot to achieve some level of offsetting across a fleet of deployed SDKs. Relay itself will also apply independent jittering. Internal for testing Pattern:
[^\\w\\-.]+
Options:
RegexOptions.Compiled
Explanation:
○ Match a character in the set [^-.\w] atomically at least once.
Pattern:
[^\\w\\-.\\/]+
Options:
RegexOptions.Compiled
Explanation:
○ Match a character in the set [^--/\w] atomically at least once.
Pattern:
[^\\w]+
Options:
RegexOptions.Compiled
Explanation:
○ Match a character in the set [^\w] atomically at least once.
Information about .NET Framework in the running machine The purpose of this partial class is to expose the API to all targets For netstandard, the call to methods will be a simple no-op. No-op version for netstandard targets The map between release number and version number No-op version for netstandard targets No-op version for netstandard targets A .NET Framework installation Short name v2.0.50727, v3.5, v4.0 Version 2.0.50727.4927, 3.0.30729.4926, 3.5.30729.4926 Service pack number, if any Only relevant prior to .NET 4 Type of Framework profile Only relevant for .NET 3.5 and 4.0 A .NET Framework release key Windows registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release Only applicable when on Windows, with full .NET Framework 4.5 and later. Type of Framework profile Only relevant for .NET 3.5 and 4.0 The .NET Client Profile is a subset of the .NET Framework The full .NET Framework Gets the current runtime. A new instance for the current runtime Details of the runtime Gets the current runtime The current runtime. The name of the runtime .NET Framework, .NET Native, Mono The version of the runtime 4.7.2633.0 The raw value parsed to extract Name and Version This property will contain a value when the underlying API returned Name and Version as a single string which required parsing. The .NET Runtime Identifier of the runtime This property will be populated for .NET 5 and newer, or null otherwise. Creates a new Runtime instance The string representation of the Runtime Compare instances for equality. The instance to compare against. True if the instances are equal by reference or its state. Compare instances for equality. The instance to compare against. True if the instances are equal by reference or its state. Get the hashcode of this instance. The hashcode of the instance. Extension method to the class. Is the runtime instance .NET Framework. The runtime instance to check. True if it's .NET Framework, otherwise false. Is the runtime instance .NET Core (or .NET). The runtime instance to check. True if it's .NET Core (or .NET), otherwise false. Is the runtime instance Mono. The runtime instance to check. True if it's Mono, otherwise false. Is the runtime instance Browser Web Assembly. The runtime instance to check. True if it's Browser WASM, otherwise false. P/Invoke to `sentry-native` functions. Scope Observer for Native through P/Invoke. Sentry SDK entrypoint. This is a facade to the SDK instance. It allows safe static access to a client and scope management. When the SDK is uninitialized, calls to this class result in no-op so no callbacks are invoked. Last event id recorded in the current scope. Initializes the SDK while attempting to locate the DSN. If the DSN is not found, the SDK will not change state. An object that can be disposed to disable the Sentry SDK, if desired. Disposing the result will flush previously-captured events and disable the SDK. In most cases there's no need to dispose the result. There are only a few exceptions where it makes sense to dispose: You have additional work to perform that you don't want Sentry to monitor. You have used . You are integrating Sentry into an environment that has custom application lifetime events. Initializes the SDK with the specified DSN. An empty string is interpreted as a disabled SDK. The dsn. An object that can be disposed to disable the Sentry SDK, if desired. Disposing the result will flush previously-captured events and disable the SDK. In most cases there's no need to dispose the result. There are only a few exceptions where it makes sense to dispose: You have additional work to perform that you don't want Sentry to monitor. You have used . You are integrating Sentry into an environment that has custom application lifetime events. Initializes the SDK with an optional configuration options callback. The configuration options callback. An object that can be disposed to disable the Sentry SDK, if desired. Disposing the result will flush previously-captured events and disable the SDK. In most cases there's no need to dispose the result. There are only a few exceptions where it makes sense to dispose: You have additional work to perform that you don't want Sentry to monitor. You have used . You are integrating Sentry into an environment that has custom application lifetime events. Initializes the SDK with the specified options instance. The options instance Used by integrations which have their own delegates. An object that can be disposed to disable the Sentry SDK, if desired. Disposing the result will flush previously-captured events and disable the SDK. In most cases there's no need to dispose the result. There are only a few exceptions where it makes sense to dispose: You have additional work to perform that you don't want Sentry to monitor. You have used . You are integrating Sentry into an environment that has custom application lifetime events. Flushes the queue of captured events until the timeout set in is reached. Blocks synchronously. Prefer in async code. Flushes the queue of captured events until the timeout is reached. The amount of time allowed for flushing. Blocks synchronously. Prefer in async code. Flushes the queue of captured events until the timeout set in is reached. A task to await for the flush operation. Flushes the queue of captured events until the timeout is reached. The amount of time allowed for flushing. A task to await for the flush operation. Close the SDK. Flushes the events and disables the SDK. This method is mostly used for testing the library since Init returns a IDisposable that can be used to shutdown the SDK. Whether the SDK is enabled or not. Creates a new scope that will terminate when disposed. Pushes a new scope while inheriting the current scope's data. A state object to be added to the scope. A disposable that when disposed, ends the created scope. Creates a new scope that will terminate when disposed. A disposable that when disposed, ends the created scope. Binds the client to the current scope. The client. Adds a breadcrumb to the current Scope. If a message is provided it’s rendered as text and the whitespace is preserved. Very long text might be abbreviated in the UI. Categories are dotted strings that indicate what the crumb is or where it comes from. Typically it’s a module name or a descriptive string. For instance ui.click could be used to indicate that a click happened in the UI or flask could be used to indicate that the event originated in the Flask framework. The type of breadcrumb. The default type is default which indicates no specific handling. Other types are currently http for HTTP requests and navigation for navigation events. Data associated with this breadcrumb. Contains a sub-object whose contents depend on the breadcrumb type. Additional parameters that are unsupported by the type are rendered as a key/value table. Breadcrumb level. Adds a breadcrumb to the current scope. This overload is intended to be used by integrations only. The objective is to allow better testability by allowing control of the timestamp set to the breadcrumb. An optional . The message. The category. The type. The data. The level. Adds a breadcrumb to the current Scope. The breadcrumb to be added A hint providing additional context that can be used in the BeforeBreadcrumb callback Configures the scope through the callback. The configure scope callback. Configures the scope asynchronously. The configure scope callback. The Id of the event. Captures the event, passing a hint, using the specified scope. The event. The scope. a hint for the event. The Id of the event. Captures an event with a configurable scope. This allows modifying a scope without affecting other events. The event. The callback to configure the scope. The Id of the event. Captures an event with a configurable scope. This allows modifying a scope without affecting other events. The event. An optional hint to be provided with the event The callback to configure the scope. The Id of the event. Captures the exception. The exception. The Id of the even.t Captures the exception with a configurable scope. This allows modifying a scope without affecting other events. The exception. The callback to configure the scope. The Id of the even.t Captures the message. The message to send. The message level. The Id of the event. Captures the message with a configurable scope. This allows modifying a scope without affecting other events. The message to send. The callback to configure the scope. The message level. The Id of the event. Captures a user feedback. The user feedback to send to Sentry. Captures a user feedback. The event Id. The user email. The user comments. The optional username. Captures a transaction. Note: this method is NOT meant to be called from user code! Instead, call on the transaction. Captures a transaction. Note: this method is NOT meant to be called from user code! Instead, call on the transaction. Captures a session update. Captures a check-in. Capturing a check-in returns an ID. The ID can be used to update the status. I.e. to update a check-in you captured from `CheckInStatus.InProgress` to `CheckInStatus.Ok`. The monitor slug of the check-in. The status of the check-in. The optional . The optional . The optional duratin of the check-in. The Id of the check-in. Starts a transaction. Starts a transaction. Starts a transaction. Starts a transaction. Starts a transaction. Starts a transaction. Binds specified exception the specified span. This method is used internally and is not meant for public use. Gets the last active span. Gets the Sentry trace header of the parent that allows tracing across services Gets the Sentry "baggage" header that allows tracing across services Continues a trace based on HTTP header values provided as strings. If no "sentry-trace" header is provided a random trace ID and span ID is created. Continues a trace based on HTTP header values. If no "sentry-trace" header is provided a random trace ID and span ID is created. Deliberately crashes an application, which is useful for testing and demonstration purposes. The method is marked obsolete only to discourage accidental misuse. We do not intend to remove it. Describes the application. As opposed to the runtime, this is the actual application that was running and carries meta data about the current session. Tells Sentry which type of context this is. Version-independent application identifier, often a dotted bundle ID. Formatted UTC timestamp when the application was started by the user. Application specific device identifier. String identifying the kind of build, e.g. testflight. Human readable application name, as it appears on the platform. Human readable application version, as it appears on the platform. Internal build identifier, as it appears on the platform. A flag indicating whether the app is in foreground or not. An app is in foreground when it's visible to the user. Clones this instance. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. Carries information about the browser or user agent for web-related errors. This can either be the browser this event occurred in, or the user agent of a web request that triggered the event. Tells Sentry which type of context this is. Display name of the browser application. Version string of the browser. Clones this instance Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. The Sentry Debug Meta Images interface. Type of the debug image. Memory address, at which the image is mounted in the virtual address space of the process. The size of the image in virtual memory. If missing, Sentry will assume that the image spans up to the next image, which might lead to invalid stack traces. Unique debug identifier of the image. Checksum of the companion debug file. Path and name of the debug companion file. Optional identifier of the code file. The absolute path to the dynamic library or executable. This helps to locate the file if it is missing on Sentry. Parses from JSON. The Sentry Debug Meta interface. Parses from JSON. Describes the device that caused the event. This is most appropriate for mobile applications. Tells Sentry which type of context this is. The timezone of the device. Europe/Vienna The name of the device. This is typically a hostname. The manufacturer of the device. The brand of the device. The family of the device. This is normally the common part of model names across generations. iPhone, Samsung Galaxy The model name. Samsung Galaxy S3 An internal hardware revision to identify the device exactly. The CPU architecture. If the device has a battery an integer defining the battery level (in the range 0-100). True if the device is charging. True if the device has a internet connection. This can be a string portrait or landscape to define the orientation of a device. A boolean defining whether this device is a simulator or an actual device. Total system memory available in bytes. Free system memory in bytes. Memory usable for the app in bytes. True, if the device memory is low. Total device storage in bytes. Free device storage in bytes. Total size of an attached external storage in bytes (e.g.: android SDK card). Free size of an attached external storage in bytes (e.g.: android SDK card). The resolution of the screen. 800x600 The logical density of the display. The screen density as dots-per-inch. A formatted UTC timestamp when the system was booted. 2018-02-08T12:52:12Z Number of "logical processors". 8 CPU description. Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz Processor frequency in MHz. Note that the actual CPU frequency might vary depending on current load and power conditions, especially on low-powered devices like phones and laptops. On some platforms it's not possible to query the CPU frequency. Currently such platforms are iOS and WebGL. 2500 Kind of device the application is running on. Unknown, Handheld, Console, Desktop Status of the device's battery. Unknown, Charging, Discharging, NotCharging, Full Unique device identifier. Depends on the running platform. iOS: UIDevice.identifierForVendor (UUID) Android: The generated Installation ID Windows Store Apps: AdvertisingManager::AdvertisingId (possible fallback to HardwareIdentification::GetPackageSpecificToken().Id) Windows Standalone: hash from the concatenation of strings taken from Computer System Hardware Classes TODO: Investigate - Do ALL platforms now return a generated installation ID? See https://github.com/getsentry/sentry-java/pull/1455 Is vibration available on the device? Is accelerometer available on the device? Is gyroscope available on the device? Is audio available on the device? Is the device capable of reporting its location? Clones this instance. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. Defines the orientation of a device. Portrait. Landscape. Represents a task producing an object serializable to JSON format. Source object. Initializes an instance of . Envelope. Header associated with the envelope. Envelope items. Initializes an instance of . Attempts to extract the value of "event_id" header if it's present. Attempts to extract the value of "event_id" header if it's present. Creates an envelope that contains a single event. Creates an envelope that contains a single user feedback. Creates an envelope that contains a single transaction. Creates an envelope that contains one or more Creates an envelope that contains one or more Metrics Creates an envelope that contains a session update. Creates an envelope that contains a check in. Creates an envelope that contains a client report. Deserializes envelope from stream. Creates a new starting from the current one and appends the given. The to append. A new with the same headers and items, including the new . Envelope item. Header associated with this envelope item. Item payload. Initializes an instance of . Tries to get item type. Tries to get payload length. Returns the file name or null if no name exists. The file name or null. Creates an from . Creates an from . Creates an from . Creates an from one or more . Creates an from . Creates an from . Creates an from . Creates an from . Creates an from . Creates an from . Deserializes envelope item from stream. Represents a serializable entity. Serializes the object to a stream asynchronously. Serializes the object to a stream synchronously. Represents an object serializable in JSON format. Source object. Initializes an instance of . Represents an object which is already serialized as a stream. Source stream. Initializes an instance of . Graphics device unit. Tells Sentry which type of context this is. The name of the graphics device. iPod touch: Apple A8 GPU Samsung S7: Mali-T880 The PCI Id of the graphics device. Combined with uniquely identifies the GPU. The PCI vendor Id of the graphics device. Combined with uniquely identifies the GPU. The vendor name reported by the graphic device. Apple, ARM, WebKit Total GPU memory available in mega-bytes. Device type. The low level API used. Metal, Direct3D11, OpenGLES3, PlayStation4, XboxOne Whether the GPU is multi-threaded rendering or not. The Version of the API of the graphics device. iPod touch: Metal Android: OpenGL ES 3.2 v1.r22p0-01rel0.f294e54ceb2cb2d81039204fa4b0402e WebGL Windows: OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium)) OpenGL 2.0, Direct3D 9.0c The Non-Power-Of-Two support level. Full Largest size of a texture that is supported by the graphics hardware. Approximate "shader capability" level of the graphics device. Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown) Is GPU draw call instancing supported? Is ray tracing available on the device? Are compute shaders available on the device? Are geometry shaders available on the device? Clones this instance. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. Trace metadata stored in 'contexts.trace' on an event or transaction. Span ID. Parent ID. Trace ID. Operation. Description. Status. Whether the span or transaction is sampled in (i.e. eligible for sending to Sentry). A measurement, containing a numeric value and a unit. The numeric value of the measurement. The unit of measurement. Parses from JSON. Sentry Exception Mechanism. The exception mechanism is an optional field residing in the Exception Interface. It carries additional information about the way the exception was created on the target system. This includes general exception values obtained from operating system or runtime APIs, as well as mechanism-specific values. Key found inside of Exception.Data to inform if the exception was handled. Key found inside of Exception.Data to inform which mechanism captured the exception. Key found inside of Exception.Data to provide a description of the mechanism. Required unique identifier of this mechanism determining rendering and processing of the mechanism data. Defaults to "generic". If null, empty, or whitespace are set, reverts to the default string "generic". Nullability is for backwards compatibility, and may be removed in a future major version. Optional human readable description of the error mechanism and a possible hint on how to solve this error. An optional value to explain the source of the exception. For chained exceptions, this should be the property name where the exception was retrieved from its parent exception. In .NET, either "" or "InnerExceptions[i]" (where i is replaced with the numeric index within ). Optional fully qualified URL to an online help resource, possible interpolated with error parameters. Optional flag indicating whether the exception has been handled by the user (e.g. via try..catch). Optional flag indicating whether the exception is synthetic. Whether the exception represents an exception group. In .NET, an . A numeric identifier assigned to the exception by the SDK. The SDK should assign a different ID to each exception in an event, starting with the root exception as 0, and incrementing thereafter. This ID can be used with to reconstruct the logical structure of an exception group. When null, Sentry will assume that all exceptions in an event are in a single chain. The parent exception's identifier, or null for the root exception. This ID can be used with to reconstruct the logical structure of an exception group. Optional information from the operating system or runtime on the exception mechanism. The mechanism meta data usually carries error codes reported by the runtime or operating system, along with a platform dependent interpretation of these codes. SDKs can safely omit code names and descriptions for well known error codes, as it will be filled out by Sentry. For proprietary or vendor-specific error codes, adding these values will give additional information to the user. Arbitrary extra data that might help the user understand the error thrown by this mechanism. Parses from JSON. Represents a collection of code locations. Represents a collection of code locations. Uniquely identifies a code location using the number of seconds since the UnixEpoch, as measured at the start of the day when the code location was recorded. Counters track a value that can only be incremented. Distributions track a list of values over time in on which you can perform aggregations like max, min, avg. Gauges track a value that can go up and down. Base class for metric instruments Creates a new instance of . Creates a new instance of . The text key to be used to identify the metric An optional that describes the values being tracked An optional set of key/value paris that can be used to add dimensionality to metrics An optional time when the metric was emitted. Defaults to DateTimeOffset.UtcNow A text key identifying the metric The time when the metric was emitted. A that describes the values being tracked A set of key/value paris providing dimensionality for the metric Adds a value to the metric Serializes metric values to JSON Concrete classes should implement this to return a list of values that should be serialized to statsd Serializes the metric asynchrounously in statsd format to the provided stream Uniquely identifies a metric resource. Uniquely identifies a metric resource. Returns a string representation of the metric resource identifier. The metric instrument type Sets track a set of values on which you can perform aggregations such as count_unique. Represents Sentry's context for OS. Defines the operating system that caused the event. In web contexts, this is the operating system of the browser (normally pulled from the User-Agent string). Tells Sentry which type of context this is. The name of the operating system. The version of the operating system. An optional raw description that Sentry can use in an attempt to normalize OS info. When the system doesn't expose a clear API for and this field can be used to provide a raw system info (e.g: uname) The internal build revision of the operating system. If known, this can be an independent kernel version string. Typically this is something like the entire output of the 'uname' tool. An optional boolean that defines if the OS has been jailbroken or rooted. Clones this instance Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. Profiling context information. Profile's event ID. Sentry Response context interface. { "contexts": { "response": { "cookies": "PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;", "headers": { "content-type": "text/html" /// ... }, "status_code": 500, "body_size": 1000, // in bytes } } } Tells Sentry which type of context this is. Gets or sets the HTTP response body size. Gets or sets (optional) cookie values Submitted data in whatever format makes most sense. This data should not be provided by default as it can get quite large. The request payload. Gets or sets the headers. If a header appears multiple times it needs to be merged according to the HTTP standard for header merging. Gets or sets the HTTP Status response code The HTTP method. Clones this instance. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. This describes a runtime in more detail. Typically this context is used multiple times if multiple runtimes are involved (for instance if you have a JavaScript application running on top of JVM) Tells Sentry which type of context this is. The name of the runtime. The version identifier of the runtime. An optional raw description that Sentry can use in an attempt to normalize Runtime info. When the system doesn't expose a clear API for and this field can be used to provide a raw system info (e.g: .NET Framework 4.7.1). An optional .NET Runtime Identifier string. An optional build number. Clones this instance Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses from JSON. Sentry sampling profiler output profile Timestamp in nanoseconds relative to the profile start. Sentry Exception interface. Exception Type. The exception value. The optional module, or package which the exception type lives in. An optional value which refers to a thread in the threads interface. Stack trace. An optional mechanism that created this exception. Parses from JSON. Trace context data. Tells Sentry which type of context this is. Clones this instance. Updates this instance with data from the properties in the , unless there is already a value in the existing property. Parses trace context from JSON. Extension methods to . Get the assemblies Name and Version. Attempts to read the version from . If not available, falls back to . The assembly to get the name and version from. The SdkVersion. Possible modes for reporting the assemblies. Don't report any assemblies. Report assemblies and use the assembly version to determine the version. Report assemblies and prefer the informational assembly version to determine the version. If the informational assembly version is not available, fall back to the assembly version. Scope data to be sent with the event. Scope data is sent together with any event captured during the lifetime of the scope. Whether the event has already fired. A list of exception processors. A list of event processors. A list of event processors. An event that fires when the scope evaluates. This allows registering an event handler that is invoked in case an event is about to be sent to Sentry. If an event is never sent, this event is never fired and the resources spared. It also allows registration at an early stage of the processing but execution at a later time, when more data is available. Transaction. Attachments. Creates a scope with the specified options. Adds a breadcrumb with a hint. The breadcrumb A hint for use in the BeforeBreadcrumb callback Adds an attachment. Resets all the properties and collections within the scope to their default values. Clear all Attachments. Removes all Breadcrumbs from the scope. Applies the data from this scope to another event-like object. The scope to copy data to. Applies the data of 'from' into 'to'. If data in 'from' is null, 'to' is unmodified. Conflicting keys are not overriden. This is a shallow copy. Applies data from one scope to another. Applies the state object into the scope. The state object to apply. Clones the current . Gets or sets the active span, or null if none available. If a span has been set on this property, it will become the active span until it is finished. Otherwise, the active span is the latest unfinished span on the transaction, presuming a transaction was set on the scope via the property. Invokes all event processor providers available. Invokes all transaction processor providers available. Invokes all exception processor providers available. Add an exception processor. The exception processor. Add the exception processors. The exception processors. Adds an event processor which is invoked when creating a . The event processor. Adds an event processor which is invoked when creating a . The event processor. Adds event processors which are invoked when creating a . The event processors. Adds an transaction processor which is invoked when creating a . The transaction processor. Adds an transaction processor which is invoked when creating a . The transaction processor. Adds transaction processors which are invoked when creating a . The transaction processors. Adds an attachment. Note: the stream must be seekable. Adds an attachment. Adds an attachment. Information about the SDK to be sent with the SentryEvent. Requires Sentry version 8.4 or higher. SDK packages. This property is not required. SDK name. SDK Version. Add a package used to compose the SDK. The package name. The package version. Add an integration used in the SDK. The integrations name. Parses from JSON. Attachment type. Standard attachment without special meaning. Minidump file that creates an error event and is symbolicated. The file should start with the MDMP magic bytes. Apple crash report file that creates an error event and is symbolicated. XML file containing UE4 crash meta data. During event ingestion, event contexts and extra fields are extracted from this file. Plain-text log file obtained from UE4 crashes. During event ingestion, the last logs are extracted into event breadcrumbs. A JSON attachment containing the View Hierarchy Sentry attachment. Attachment type. Attachment content. Attachment file name. Attachment content type. Initializes an instance of . The Checkin Status The Checkin is in progress The Checkin is Ok The Checkin errored Sentry Checkin CheckIn ID The distinct slug of the monitor. The status of the Checkin The duration of the check-in in seconds. Will only take effect if the status is ok or error. The release. The environment. The trace ID Initializes a new instance of . Sentry client used to send events to Sentry. This client captures events by queueing those to its internal background worker which sends events to Sentry. Whether the client is enabled. Creates a new instance of . The configuration for this client. Flushes events asynchronously. How long to wait for flush to finish. A task to await for the flush operation. Disposes this client Extension methods for Captures the exception. The Sentry client. The exception. The Id of the event Captures a message. The Sentry client. The message to send. The message level. The Id of the event Captures a user feedback. The event Id. The user email. The user comments. The optional username. Flushes the queue of captured events until the timeout set in is reached. The Sentry client. Blocks synchronously. Prefer in async code. Flushes the queue of captured events until the timeout is reached. The Sentry client. The amount of time allowed for flushing. Blocks synchronously. Prefer in async code. Flushes the queue of captured events until the timeout set in is reached. The Sentry client. A task to await for the flush operation. Constant values. Empty string disables the SDK. Default maximum number of breadcrumbs to hold in memory. Protocol version. Platform key that defines an events is coming from any .NET implementation. Represents Sentry's structured Context. Describes the application. Describes the browser. Describes the device. Defines the operating system. In web contexts, this is the operating system of the browser (normally pulled from the User-Agent string). Response interface that contains information on any HTTP response related to the event. This describes a runtime in more detail. This describes a GPU of the device. This describes trace information. Initializes an instance of . Creates a deep clone of this context. Copies the items of the context while cloning the known types. Parses from JSON. An event to be sent to Sentry. The used to create this event. The information from this exception is used by the Sentry SDK to add the relevant data to the event prior to sending to Sentry. The unique identifier of this event. Hexadecimal string representing a uuid4 value. The length is exactly 32 characters (no dashes!). Indicates when the event was created. 2018-04-03T17:41:36 Gets the structured message that describes this event. This helps Sentry group events together as the grouping happens on the template message instead of the result string message. SentryMessage will have a template like: 'user {0} logged in' Or structured logging template: '{user} has logged in' Name of the logger (or source) of the event. Identifies the computer from which the event was recorded. The Sentry Exception interface. The Sentry Thread interface. The Sentry Debug Meta Images interface. A list of relevant modules and their versions. Creates a new instance of . Creates a Sentry event with optional Exception details and default values like Id and Timestamp. The exception. Parses from JSON. Special HTTP message handler that can be used to propagate Sentry headers and other contextual information. Constructs an instance of . An inner message handler to delegate calls to. The Sentry hub. A hint that can be provided when capturing a or when adding a . Hints can be used to filter or modify events, transactions, or breadcrumbs before they are sent to Sentry. Creates a new instance of . Creates a new hint containing a single item. The key of the hint item. The value of the hint item. Attachments added to the Hint. This collection represents all of the attachments that will be sent to Sentry with the corresponding event. You can add or remove attachments from this collection as needed. A dictionary of arbitrary items provided with the Hint. These are not sent to Sentry, but rather they are available during processing, such as when using BeforeSend and others. The Java SDK has some logic so that certain Hint types do not copy attachments from the Scope. This provides a location that allows us to do the same in the .NET SDK in the future. The that the attachments should be copied from Takes a path and adds the file as an attachment to the hint. The path to the file to attach. The type of attachment. The content type of the attachment. Adds a 'byte[]' as attachment to the hind. The byte array to be attached The filename for the attachment The type of attachment. The content type of the attachment. Creates a new Hint with one or more attachments. The attachment(s) to add. A Hint having the attachment(s). Creates a new Hint with attachments. The attachments to add. A Hint having the attachments. Special HTTP message handler that can be used to propagate Sentry headers and other contextual information. Constructs an instance of . Constructs an instance of . An inner message handler to delegate calls to. Constructs an instance of . The Sentry hub. Constructs an instance of . An inner message handler to delegate calls to. The Sentry hub. The identifier of an event in Sentry. An empty sentry id. Creates a new instance of a Sentry Id. Sentry Id in the format Sentry recognizes. Default of includes dashes which sentry doesn't expect when searching events. String representation of the event id. Generates a new Sentry ID. Parses from string. Parses from JSON. Equality operator. Equality operator. The from the . A from a . The level of the event sent to Sentry. Debug. Informational. Warning. Error. Fatal. Sentry Message interface. This interface enables support to structured logging. "sentry.interfaces.Message": { "message": "Message for event: {eventId}", "params": [10] } The raw message string (un-interpolated). Must be no more than 1000 characters in length. The optional list of formatting parameters. The formatted message. Coerces into . Parses from JSON. Special HTTP message handler that can be used to propagate Sentry headers and other contextual information. Constructs an instance of . Constructs an instance of . An inner message handler to delegate calls to. Constructs an instance of . The Sentry hub. Constructs an instance of . An inner message handler to delegate calls to. The Sentry hub. Starts a span for a request The The request method (e.g. "GET") The request URL An Provides an opportunity for further processing of the span once a response is received. The The created in The request method (e.g. "GET") The request URL Sentry SDK options If set, the will ignore and use the provided container instead. Used by the ASP.NET (classic) integration. Specifies whether to use global scope management mode. Should be true for client applications and false for server applications. The default is false. The default for Blazor WASM, MAUI, and Mobile apps is true. A scope set outside of Sentry SDK. If set, the global parameters from the SDK's scope will be sent to the observed scope.
NOTE: EnableScopeSync must be set true for the scope to be synced.
If true, the SDK's scope will be synced with the observed scope. This holds a reference to the current transport, when one is active. If set manually before initialization, the provided transport will be used instead of the default transport. If is set, any transport set here will be wrapped in a and used as its inner transport. A list of exception processors A list of transaction processors A list of event processors A list of providers of A list of providers of A list of providers of A list of integrations to be added when the SDK is initialized. List of substrings or regular expression patterns to filter out tags The worker used by the client to pass envelopes. Scope state processor. A list of prefixes or patterns used to filter namespaces that are not considered part of application code Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. 'System.', 'Microsoft.' A list of prefixes or patterns used to filter namespaces that are considered part of application code Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. 'System.CustomNamespace', 'Microsoft.Azure.App' Whether to include default Personal Identifiable information By default PII data like Username and Client IP address are not sent to Sentry. When this flag is turned on, default PII data like Cookies, Claims in Web applications and user data read from the request are sent. Whether to report the as the User affected in the event. This configuration is only relevant if is set to true. In environments like server applications this is set to false in order to not report server account names as user names. Gets or sets the name of the server running the application. When is set to true, is automatically set as ServerName. This property can serve as an override. This is relevant only to server applications. Whether to send the stack trace of a event captured without an exception. As of version 3.22.0, the default is true. Append stack trace of the call to the SDK to capture a message or event without Exception Gets or sets the maximum breadcrumbs. When the number of events reach this configuration value, older breadcrumbs start dropping to make room for new ones. The maximum breadcrumbs per scope. The rate to sample error and crash events. Can be anything between 0.01 (1%) and 1.0 (99.9%) or null (default), to disable it. 0.1 = 10% of events are sent The release information for the application. Can be anything, but generally should be either a semantic version string in the format package@version or package@version+build, or a commit SHA from a version control system. MyApp@1.2.3 MyApp@1.2.3+foo 721e41770371db95eee98ca2707686226b993eda 14.1.16.32451 This value will generally be something along the lines of the git SHA for the given project. If not explicitly defined via configuration or environment variable (SENTRY_RELEASE). It will attempt to read it from: The distribution of the application, associated with the release set in . 22 14G60 Distributions are used to disambiguate build or deployment variants of the same release of an application. For example, it can be the build number of an XCode (iOS) build, or the version code of an Android build. A distribution can be set under any circumstances, and is passed along to Sentry if provided. However, they are generally relevant only for mobile application scenarios. The environment the application is running This value can also be set via environment variable: SENTRY_ENVIRONMENT In some cases you don't need to set this manually since integrations, when possible, automatically fill this value. For ASP.NET Core which can read from IHostingEnvironment Production, Staging The Data Source Name of a given project in Sentry. Configures a callback function to be invoked before sending an event to Sentry The event returned by this callback will be sent to Sentry. This allows the application a chance to inspect and/or modify the event before it's sent. If the event should not be sent at all, return null from the callback. Configures a callback function to be invoked before sending an event to Sentry The event returned by this callback will be sent to Sentry. This allows the application a chance to inspect and/or modify the event before it's sent. If the event should not be sent at all, return null from the callback. Configures a callback to invoke before sending a transaction to Sentry The callback Configures a callback to invoke before sending a transaction to Sentry The callback Sets a callback function to be invoked when a breadcrumb is about to be stored. Gives a chance to inspect and modify the breadcrumb. If null is returned, the breadcrumb will be discarded. Otherwise the result of the callback will be stored. Sets a callback function to be invoked when a breadcrumb is about to be stored. Gives a chance to inspect and modify the breadcrumb. If null is returned, the breadcrumb will be discarded. Otherwise the result of the callback will be stored. The maximum number of events to keep while the worker attempts to send them. The maximum number of events to keep in cache. This option only works if is configured as well. How long to wait for events to be sent before shutdown In case there are events queued when the SDK is closed, upper bound limit to wait for the worker to send the events to Sentry. The SDK is closed while the queue has 1 event queued. The worker takes 50 milliseconds to send an event to Sentry. Even though default settings say 2 seconds, closing the SDK would block for 50ms. How long to wait for flush operations to finish. Defaults to 2 seconds. When using the Sentry.NLog integration, the default is increased to 15 seconds. Decompression methods accepted By default accepts all available compression methods supported by the platform The level of which to compress the before sending to Sentry To disable request body compression, use Whether the body compression is buffered and the request 'Content-Length' known in advance. Without reading through the Gzip stream to have its final size, it's no possible to use 'Content-Length' header value. That means 'Content-Encoding: chunked' has to be used which is sometimes not supported. Sentry on-premise without a reverse-proxy, for example, does not support 'chunked' requests. Whether to send client reports, which contain statistics about discarded events. An optional web proxy Creates the inner most . A callback invoked when a is created. Whether to log diagnostics messages The verbosity can be controlled through and the implementation via . The diagnostics level to be used The flag has to be switched on for this setting to take effect. The implementation of the logger. The flag has to be switched on for this logger to be used at all. When debugging is turned off, this property is made null and any internal logging results in a no-op. What mode to use for reporting referenced assemblies in each event sent to sentry. Defaults to . What modes to use for event automatic deduplication By default will not drop an event solely for including an inner exception that was already captured. Path to the root directory used for storing events locally for resilience. If set to null, caching will not be used. The SDK will only capture HTTP Client errors if it is enabled. can be used to configure which requests will be treated as failed. Also can be used to filter to match only certain request URLs. Defaults to true. The SDK will only capture HTTP Client errors if the HTTP Response status code is within these defined ranges. Defaults to 500-599 (Server error responses only). The SDK will only capture HTTP Client errors if the HTTP Request URL is a match for any of the failedRequestsTargets. Targets may be URLs or Regular expressions. Matches "*." by default. Sets the filesystem instance to use. Defaults to the actual . Used for testing. If set to a positive value, Sentry will attempt to flush existing local event cache when initializing. Set to to disable this feature. This option only works if is configured as well. The trade off here is: Ensure a crash that happens during app start is sent to Sentry even though that might slow down the app start. If set to false, the app might crash too quickly, before Sentry can capture the cached error in the background. Defaults tags to add to all events. (These are indexed by Sentry). If the key already exists in the event, it will not be overwritten by a default tag. Indicates whether the performance feature is enabled, via any combination of , , or . Indicates whether profiling is enabled, via any combination of , , or . Simplified option for enabling or disabling tracing. Value Effect true Tracing is enabled. or will be used if set, or 100% sample rate will be used otherwise. false Tracing is disabled, regardless of or . null The default setting. Tracing is enabled only if or are set. Indicates the percentage of the tracing data that is collected. Value Effect >= 0.0 and <=1.0 A custom sample rate is used unless is false, or unless overriden by a function. Values outside of this range are invalid. null The default setting. The tracing sample rate is determined by the property, unless overriden by a function. Random sampling rate is only applied to transactions that don't already have a sampling decision set by other means, such as through , by inheriting it from an incoming trace header, or by copying it from . The sampling rate for profiling is relative to . Setting to 1.0 will profile 100% of sampled transactions. Value Effect >= 0.0 and <=1.0 A custom sample rate is. Values outside of this range are invalid. Setting to 0.0 will disable profiling. null The default setting. At this time, this is equivalent to 0.0, i.e. disabling profiling, but that may change in the future. Custom delegate that returns sample rate dynamically for a specific transaction context. Returning null signals that the sampler did not reach a sampling decision. In such case, if the transaction already has a sampling decision (for example, if it's started from a trace header) that decision is retained. Otherwise sampling decision is determined by applying the static sampling rate set in . A customizable list of objects, each containing either a substring or regular expression pattern that can be used to control which outgoing HTTP requests will have the sentry-trace and baggage headers propagated, for purposes of distributed tracing. The default value contains a single value of .*, which matches everything. To disable propagation completely, clear this collection or set it to an empty collection. Adding an item to the default list will clear the .* value automatically. ATTENTION: This option will change how issues are grouped in Sentry! Sentry groups events by stack traces. If you change this mode and you have thousands of groups, you'll get thousands of new groups. So use this setting with care. Maximum allowed file size of attachments, in bytes. Attachments above this size will be discarded. Regardless of this setting, attachments are also limited to 20mb (compressed) on Relay. The mode that the SDK should use when attempting to detect the app's and device's startup time. Note that the highest precision value relies on which might not be available. For example on Unity's IL2CPP or WebAssembly. Additionally, "Best" mode is not available on mobile platforms. Determines the duration of time a session can stay paused before it's considered ended. Note: This interval is only taken into account when integrations support Pause and Resume. Whether the SDK should start a session automatically when it's initialized and end the session when it's closed. Note: this is disabled by default in the current version (except for mobile targets and MAUI), but will become enabled by default in the next major version. Currently this only works for release health in client mode (desktop, mobile applications, but not web servers). Whether the SDK should attempt to use asynchronous file I/O. For example, when reading a file to use as an attachment. This option should rarely be disabled, but is necessary in some environments such as Unity WebGL. Delegate which is used to check whether the application crashed during last run. Gets the used to create spans. Defaults to Adds a to be used when serializing or deserializing objects to JSON with this SDK. For example, when custom context data might use a data type that requires custom serialization logic. The to add. This currently modifies a static list, so will affect any instance of the Sentry SDK. If that becomes problematic, we will have to refactor all serialization code to be able to accept an instance of . Configures a custom to be used when serializing or deserializing objects to JSON with this SDK. A builder that takes and returns a This currently modifies a static list, so will affect any instance of the Sentry SDK. If that becomes problematic, we will have to refactor all serialization code to be able to accept an instance of . When true, if an object being serialized to JSON contains references to other objects, and the serialized object graph exceed the maximum allowable depth, the object will instead be serialized using (from System.Text.Json) - which adds $id and $ref metadata to the JSON. When false, an object graph exceeding the maximum depth will be truncated. The default value is true. This option applies only to complex objects being added to Sentry events as contexts or extras, which do not implement . Provides a mechanism to convey network status to the caching transport, so that it does not attempt to send cached events to Sentry when the network is offline. Used internally by some integrations. Not intended for public usage. This must be public because we use it in Sentry.Maui, which can't use InternalsVisibleTo because MAUI assemblies are not strong-named. Allows integrations to provide a custom assembly reader. This is for Sentry use only, and can change without a major version bump. Settings for the EXPERIMENTAL metrics feature. This feature is preview only and subject to change without a major version bump. Currently it's recommended for noodling only - DON'T USE IN PRODUCTION! By default the ExperimentalMetrics Options is null, which means the feature is disabled. If you want to enable Experimental metrics, you must set this property to a non-null value. The Spotlight URL. Defaults to http://localhost:8969/stream Whether to enable Spotlight for local development. Only set this option to `true` while developing, not in production! Controls whether the native SDKs (Android, Cocoa, etc.) will be initialized (when applicable). Should be set false (disabled) only when testing, and then only if the test initializes the managed SDK. Defaults to true (enabled). These callbacks are Called after Hub init and may be used, for example, to synchronize native contexts. This list is cleared after init to avoid duplicate invocations when the same Options object is used again. Creates a new instance of Add an integration The integration. Removes all integrations of type . The type of the integration(s) to remove. Add an exception filter. The exception filter to add. Removes all filters of type The type of filter(s) to remove. Ignore exception of type or derived. The type of the exception to ignore. Add prefix to exclude from 'InApp' stacktrace list. The string used to filter the stacktrace to be excluded from InApp. Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. A is executed 'System.', 'Microsoft.' Add a regex to identify frames that are not 'InApp' in stacktraces. It will usually be more convenient to use the method, however you can use this overload if you want to control the used when constructing the Regular Expression. For performance reasons, it's recommend that you use when creating the regex and unless you have specific reason consider using as well. The regular expression to use to match stacktrace frames. Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. If a frame has not already been determined to be InApp per any of the prefixes or patterns configured in , it will be considered InApp only if it does not match any of the prefixes or patterns in . Add a regex pattern used to identify frames that are not 'InApp' in stacktraces. The regular expression to use to match stacktrace frames Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. If a frame has not already been determined to be InApp per any of the prefixes or patterns configured in , it will be considered InApp only if it does not match any of the prefixes or patterns in . Add prefix to include as in 'InApp' stacktrace. The string used to filter the stacktrace to be included in InApp. Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. A is executed 'System.CustomNamespace', 'Microsoft.Azure.App' Add a regex pattern used to identify 'InApp' frames in stacktraces. It will usually be more convenient to use the method, however you can use this overload if you want to control the used when constructing the Regular Expression. For performance reasons, it's recommend that you use when creating the regex and unless you have specific reason consider using as well. The regular expression to use to match stacktrace frames. Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. Frames from namespaces matching this regular expression will be considered "InApp" Add a regex pattern used to identify 'InApp' frames in stacktraces. A regular expression to use to match stacktrace frames. Sentry by default filters the stacktrace to display only application code. A user can optionally click to see all which will include framework and libraries. Frames from namespaces matching this regular expression will be considered "InApp" Add an exception processor. The exception processor. Add the exception processors. The exception processors. Adds an event processor which is invoked when creating a . The event processor. Adds event processors which are invoked when creating a . The event processors. Removes all event processors of type The type of processor(s) to remove. Adds an event processor provider which is invoked when creating a . The event processor provider. Adds an transaction processor which is invoked when creating a . The transaction processor. Adds transaction processors which are invoked when creating a . The transaction processors. Removes all transaction processors of type The type of processor(s) to remove. Adds an transaction processor provider which is invoked when creating a . The transaction processor provider. Add the exception processor provider. The exception processor provider. Invokes all event processor providers available. Invokes all transaction processor providers available. Invokes all exception processor providers available. Use custom . The stack trace factory. Applies the default tags to an event without resetting existing tags. The event to apply the tags to. Disables the strategy to detect duplicate events. In case a second event is being sent out from the same exception, that event will be discarded. It is possible the second event had in fact more data. In which case it'd be ideal to avoid the first event going out in the first place. Disables the capture of errors through . Disables the integrations with Diagnostic source. Disables the capture of errors through . By default, any queued events (i.e: captures errors) are flushed on . This method disables that behaviour. Disables WinUI exception handler Disables the System.Diagnostics.Metrics integration. Represents a package used to compose the SDK. The name of the package. nuget:Sentry nuget:Sentry.AspNetCore The version of the package. 1.0.0-rc1 Creates a new instance of a . The package name. The package version. Parses from JSON. Sentry HTTP interface. "request": { "url": "http://absolute.uri/foo", "method": "POST", "api_target": "apiType", "data": { "foo": "bar" }, "query_string": "hello=world", "cookies": "foo=bar", "headers": { "Content-Type": "text/html" }, "env": { "REMOTE_ADDR": "192.168.0.1" } } Gets or sets the full request URL, if available. The request URL. Gets or sets the method of the request. The HTTP method. Gets or sets the API target for the request (e.g. "graphql") The API Target. Submitted data in whatever format makes most sense. This data should not be provided by default as it can get quite large. The request payload. Gets or sets the unparsed query string. The query string. Gets or sets the cookies. The cookies. Gets or sets the headers. If a header appears multiple times it needs to be merged according to the HTTP standard for header merging. The headers. Gets or sets the optional environment data. This is where information such as IIS/CGI keys go that are not HTTP headers. The env. Gets or sets some optional other data. The other. Clones this instance. This is a shallow copy. References like could hold a mutable, non-thread-safe object. Parses from JSON. Sentry session. Initializes a new instance of . Reports an error on the session. Transaction span. Initializes an instance of . Initializes an instance of . Parses a span from JSON. A frame of a stacktrace. When serializing a stack frame as part of the Code Location metadata for Metrics, we need to include an additional "type" property in the serialized payload. This flag indicates whether the stack frame is for a code location or not. The relative file path to the call. The name of the function being called. Platform-specific module path. The line number of the call. The column number of the call. The absolute path to filename. Source code in filename at line number. A list of source code lines before context_line (in order) – usually [lineno - 5:lineno]. A list of source code lines after context_line (in order) – usually [lineno + 1:lineno + 5]. Signifies whether this frame is related to the execution of the relevant code in this stacktrace. For example, the frames that might power the framework’s web server of your app are probably not relevant, however calls to the framework’s library once you start handling code likely are. A mapping of variables which were available within this frame (usually context-locals). Which frames were omitted, if any. If the list of frames is large, you can explicitly tell the system that you’ve omitted a range of frames. The frames_omitted must be a single tuple two values: start and end. If you only removed the 8th frame, the value would be (8, 9), meaning it started at the 8th frame, and went until the 9th (the number of frames omitted is end-start). The values should be based on a one-index. The assembly where the code resides. This can override the platform for a single frame. Otherwise the platform of the event is assumed. Optionally an address of the debug image to reference. If this is set and a known image is defined by debug_meta then symbolication can take place. An optional address that points to a symbol. We actually use the instruction address for symbolication but this can be used to calculate an instruction offset automatically. An optional instruction address for symbolication.
If this is set and a known image is defined in the Debug Meta Interface, then symbolication can take place.
Optionally changes the addressing mode. The default value is the same as `"abs"` which means absolute referencing. This can also be set to `"rel:DEBUG_ID"` or `"rel:IMAGE_INDEX"` to make addresses relative to an object referenced by debug id or index. The optional Function Id.
This is derived from the `MetadataToken`, and should be the record id of a `MethodDef`.
Configures based on the and or . The Sentry options. will remain with the same value if previously set. Parses from JSON. Instruction Address Adjustments Symbolicator will use the `"all_but_first"` strategy **unless** the event has a crashing `signal` attribute and the Stack Trace has a `registers` map, and the instruction pointer register (`rip` / `pc`) does not match the first frame. In that case, `"all"` frames will be adjusted. All frames of the stack trace will be adjusted, subtracting one instruction with (or `1`) from the incoming `instruction_addr` before symbolication. All frames but the first (in callee to caller / child to parent direction) should be adjusted. No adjustment will be applied whatsoever. Sentry Stacktrace interface. A stacktrace contains a list of frames, each with various bits (most optional) describing the context of that frame. Frames should be sorted from oldest to newest. The list of frames in the stack. The list of frames should be ordered by the oldest call first. The optional instruction address adjustment. Tells the symbolicator if and what adjustment for is needed. Parses from JSON. A thread running at the time of an event. The Id of the thread. The name of the thread. Whether the crash happened on this thread. An optional flag to indicate that the thread was in the foreground. Stack trace. Parses from JSON. Sentry trace header. Trace ID. Span ID. Whether the trace is sampled. Initializes an instance of . Parses from string. Sentry performance transaction. Transaction's event ID. Flat list of spans within this transaction. Initializes an instance of . Initializes an instance of . Initializes an instance of . Redacts PII from the transaction Parses transaction from JSON. An interface which describes the authenticated User for a request. The unique ID of the user. The username of the user. The email address of the user. The IP address of the user. The segment the user belongs to. Additional information about the user. Clones the current instance. The cloned user. Parses from JSON. Helps serialization of Sentry protocol types which include a values property. The values. Creates an instance from the specified . Terminal state of a session. Session ended normally. Session ended with an unhandled exception. Session ended abnormally (e.g. device lost power). Session update. Whether this is the initial update. Timestamp. Sequence number. Duration of time since the start of the session. Status with which the session was ended. Initializes a new instance of . Initializes a new instance of . Initializes a new instance of . Initializes a new instance of . Parses from JSON. Span metadata used for sampling. Identifies which instrumentation is being used. Initializes an instance of . Sentry span ID. An empty Sentry span ID. Creates a new instance of a Sentry span Id. Creates a new instance of a Sentry span Id. Generates a new Sentry ID. Parses from string. Parses from JSON. Equality operator. Equality operator. The from the . Span status. The operation completed successfully. Deadline expired before operation could complete. 401 Unauthorized (actually does mean unauthenticated according to RFC 7235). 403 Forbidden 404 Not Found. Some requested entity (file or directory) was not found. 429 Too Many Requests Client specified an invalid argument. 4xx. 501 Not Implemented 503 Service Unavailable Other/generic 5xx. Unknown. Any non-standard HTTP status code. The operation was cancelled (typically by the user). Already exists (409). Operation was rejected because the system is not in a state required for the operation. The operation was aborted, typically due to a concurrency issue. Operation was attempted past the valid range. Unrecoverable data loss or corruption Transaction span tracer. Used by the Sentry.OpenTelemetry.SentrySpanProcessor to mark a span as a Sentry request. Ideally we wouldn't create these spans but since we can't avoid doing that, once we detect that it's a Sentry request we mark it as such so that we can filter it when the transaction finishes and the TransactionTracer gets converted into a Transaction. Initializes an instance of . Used to mark a span as unfinished when it was previously marked as finished. This allows us to reuse spans for DB Connections that get reused by the underlying connection pool The mode which the SDK builds the stack trace. Changing this WILL affect issue grouping in Sentry since the format of the frames will change. The default .NET stack trace format. This was the default before Sentry .NET 3.0.0. Includes return type, arguments ref modifiers and more. This mode uses Ben Adams' Demystifier library. The mode of which to attempt to detect the process startup time. Disabled. Best effort approach that can be off by a few seconds or minutes. In this mode, the App startup time is assumed to be the point of which the SDK was initialized. Attempts to detect the startup time with the most precision. This can require starting work on the thread pool due to P/Invoke calls. Attachment sourced from stream. Creates a new instance of . Provides a pattern that can be used to match against other strings as either a substring or regular expression. Constructs a instance. The substring or regular expression pattern to match on. The string comparison type to use when matching. Constructs a instance. Use this constructor when you need to control the regular expression matching options. We recommend setting at least for performance, and (unless you have culture-specific matching needs). The constructor sets these by default. Implicitly converts a to a . Implicitly converts a to a . During configuration binding, .NET 6 and lower used to just call Add on the existing item. .NET 7 changed this to call the setter with an array that already starts with the old value. We have to handle both cases. The List Type The set of values to be assigned A IList of type T that will be consistent even if it has been set via Config Measures the time it takes to run a given code block and emits this as a metric. using (var timing = new Timing("my-operation")) { ... } Creates a new instance. Transaction metadata used for sampling. Whether the parent transaction of this transaction has been sampled. Initializes an instance of . Initializes an instance of . Transaction source. This information is required by dynamic sampling. Contains information about how the name of the transaction was determined. This will be used by the server to decide whether or not to scrub identifiers from the transaction name, or replace the entire name with a placeholder. The source should only be set by integrations and not by developers directly https://develop.sentry.dev/sdk/event-payloads/transaction/#transaction-annotations User-defined name. my_transaction Raw URL, potentially containing identifiers. /auth/login/john123/ GET /auth/login/john123/ Parametrized URL / route /auth/login/:userId/ GET /auth/login/{user}/ Name of the view handling the request. UserListView Named after a software component, such as a function or class name. AuthLogin.login LoginActivity.login_button Name of a background task sentry.tasks.do_something Determines if the is considered "high quality" for purposes of dynamic sampling. Currently, only is considered low quality, and the others are high quality, but this may change in the future. Context information passed into a function, which can be used to determine whether a transaction should be sampled. Transaction context. Custom data used for sampling. Initializes an instance of . Transaction tracer. The sample rate used for this transaction. Used by the Sentry.OpenTelemetry.SentrySpanProcessor to mark a transaction as a Sentry request. Ideally we wouldn't create this transaction but since we can't avoid doing that, once we detect that it's a Sentry request we mark it as such so that we can prevent finishing the transaction tracer when idle timeout elapses and the TransactionTracer gets converted into a Transaction. Initializes an instance of . Initializes an instance of . Initializes an instance of . Sentry User Feedback. The eventId of the event to which the user feedback is associated. The name of the user. The name of the user. Comments of the user about what happened. Initializes an instance of . Parses from JSON. Sentry View Hierarchy. The rendering system this view hierarchy is capturing. The elements or windows within the view hierarchy. Initializes an instance of The rendering system Sentry View Hierarchy attachment. Initializes an instance of . /// The view hierarchy attachment Sentry View Hierarchy Node The type of the element represented by this node. The child nodes Initializes an instance of The type of node Gets automatically called and writes additional properties during Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file column number, or 0 (zero) if the file column number cannot be determined. Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file line number, or 0 (zero) if the file line number cannot be determined. Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. The file name, or null if the file name cannot be determined. Gets the offset from the start of the Microsoft intermediate language (MSIL) code for the method that is executing. This offset might be an approximation depending on whether or not the just-in-time (JIT) compiler is generating debugging code. The generation of this debugging information is controlled by the System.Diagnostics.DebuggableAttribute. The offset from the start of the MSIL code for the method that is executing. Gets the method in which the frame is executing. The method in which the frame is executing. Gets the offset from the start of the native just-in-time (JIT)-compiled code for the method that is being executed. The generation of this debugging information is controlled by the System.Diagnostics.DebuggableAttribute class. The offset from the start of the JIT-compiled code for the method that is being executed. Builds a readable representation of the stack trace. A readable representation of the stack trace. Gets the number of frames in the stack trace. The number of frames in the stack trace. Gets the specified stack frame. The index of the stack frame requested. The specified stack frame. Returns a copy of all stack frames in the current stack trace. An array of type System.Diagnostics.StackFrame representing the function calls in the stack trace. Builds a readable representation of the stack trace. A readable representation of the stack trace. Tries to convert a given to a full path. Returns original value if the conversion isn't possible or a given path is relative. Extension methods to Demystify exveption stack traces Demystifies the given and tracks the original stack traces for the whole exception tree. Gets demystified string representation of the . method mutates the exception instance that can cause issues if a system relies on the stack trace be in the specific form. Unlike this method is pure. It calls first, computes a demystified string representation and then restores the original state of the exception back. A helper class that contains utilities methods for dealing with reflection. Returns true if the is a value tuple type. Pretty print a type name. The . true to print a fully qualified name. true to include generic parameter names. The pretty printed type name. Returns a name of given generic type without '`'. Custom -derived type for the MicrosoftAspNetCoreHostingRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreRoutingRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreDiagnosticsRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreRateLimitingRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreHeaderParsingRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreServerKestrelRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftAspNetCoreHttpConnectionsRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftExtensionsDiagnosticsHealthChecksRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the MicrosoftExtensionsDiagnosticsResourceMonitoringRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the OpenTelemetryInstrumentationRuntimeRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the SystemNetNameResolutionRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the SystemNetHttpRegex method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the InvalidMetricKeyOrNameCharacters method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the InvalidTagKeyCharacters method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Custom -derived type for the InvalidMetricUnitCharacters method. Cached, thread-safe singleton instance. Initializes the instance. Provides a factory for creating instances to be used by methods on . Creates an instance of a used by methods on . Provides the runner that contains the custom logic implementing the specified regular expression. Scan the starting from base.runtextstart for the next match. The text being scanned by the regular expression. Search starting from base.runtextpos for the next location a match could possibly start. The text being scanned by the regular expression. true if a possible match was found; false if no more matches are possible. Determine whether at base.runtextpos is a match for the regular expression. The text being scanned by the regular expression. true if the regular expression matches at the current position; otherwise, false. Helper methods used by generated -derived implementations. Default timeout value set in , or if none was set. Whether is non-infinite. Finds the next index of any character that matches a character in the set [^-.\w]. Finds the next index of any character that matches a character in the set [^\w]. Finds the next index of any character that matches a character in the set [^--/\w]. Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz". Supports searching for characters in or not in "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz". Supports searching for characters in or not in "-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz". Extends Exception with formatted data that can be used by Sentry SDK. Set a tag that will be added to the event when the exception is captured. The exception. The name of the tag. The value of the key. Set context data that will be added to the event when the exception is captured. The exception. The context name. The context data. Set mechanism information that will be included with the exception when it is captured. The exception. A required short string that identifies the mechanism. An optional human-readable description of the mechanism. An optional flag indicating whether the exception was handled by the mechanism.