Table of contents
Serilog.Sinks.SentrySDK: Adapting log events to Sentry
Serilog.Sinks.SentrySDK connects a .NET logging pipeline to the Sentry SDK. Its sink converts structured log events for Sentry, so application call sites can keep using Serilog.
- Languages
- 2Code breakdown
- Documented components
- 2Explore modules
- Source documents
- 6Read the instructions
Repository languagesC# 98.04%2
Shares calculated from GitHub Linguist bytes.
| Language | % | Bytes |
|---|---|---|
| C# | 89,769 | |
| PowerShell | 1,795 |
1. Overview
1.1. Why it exists
Production .NET 6+ Serilog sink bridging structured logging and Sentry error telemetry with zero allocation overhead.
1.2. Best fit
Enterprise .NET microservice error observability and distributed trace correlation.
2. Use cases
NuGet Serilog sink for .NET developers that sends logs, exceptions and traces to Sentry, with ASP.NET Core context.
- Configure WriteTo.Sentry
- .NET developer
SentrySinkExtensions.cs adds WriteTo.Sentry with a DSN and options such as environment, release, sampleRate, tags and enableTracing, usable from code or the Serilog section of appsettings.json.
- Send logs and exceptions
- .NET developerSentry
SentrySink.Emit maps the Serilog level, copies properties into scope extras and tags, adds breadcrumbs and calls CaptureMessage or CaptureException.
- Trace each log as a span
- .NET developerSentry
With enableTracing on, Emit starts a transaction named from the message template and a child span through ITransactionService, then finishes both.
- Attach HTTP request context
- .NET developerSentry
The AspNetCore package adds app.AddSentryContext() middleware and HttpContextDestructingPolicy so events carry the user, headers and request data.
- Scrub data before sending
- .NET developer
An optional beforeSend callback is chained after the sink's own handling; the SentryWeb demo also rewrites messages with a Serilog enricher (Scrubbing/DivisionByZeroFilter.cs).
- Publish six NuGet packages
- NuGet.org
.github/workflows/CI.yml packs the main, .6 and .10 package ids for net6.0 and net10.0 and pushes them to NuGet.org when a GitHub release is published.
2.1. Scenario: Report errors from an ASP.NET Core app to Sentry
- Run dotnet add package Serilog.Sinks.SentrySDK and dotnet add package Serilog.Sinks.SentrySDK.AspNetCore.
- Put the project DSN under Serilog, WriteTo, Sentry, Args in appsettings.json.
- Build the logger with ReadFrom.Configuration, Destructure.With<HttpContextDestructingPolicy>() and the CheckIfCaptured filter.
- Call app.AddSentryContext() in Startup.Configure.
- Trigger an error, for example with dotnet run --project demos/SentryWeb/SentryWeb.csproj, and find the event with its request data in Sentry.
Files readREADME.mddemos/README.mdsrc/Serilog.Sinks.SentrySDK/SentrySink.cssrc/Serilog.Sinks.SentrySDK/SentrySinkExtensions.cssrc/Serilog.Sinks.SentrySDK.AspNetCore/SentrySinkContextMiddleware.cssrc/Serilog.Sinks.SentrySDK.AspNetCore/SerilogSentryExtensions.csdemos/SentryWeb/Scrubbing/DivisionByZeroFilter.cs.github/workflows/CI.yml
3. Getting started
These commands come from the repository documentation. They were not run during this review.
dotnet add package Serilog.Sinks.SentrySDK
Install-Package Serilog.Sinks.SentrySDKdotnet restore src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj
dotnet build src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj -c Release
dotnet build src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj -c Release
dotnet test src/Serilog.Sinks.SentrySDK.Tests/Serilog.Sinks.SentrySDK.Tests.csproj
dotnet test src/Serilog.Sinks.SentrySDK.AspNetCore.Tests/Serilog.Sinks.SentrySDK.AspNetCore.Tests.csprojdotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./reports/coverage src/Serilog.Sinks.SentrySDK.Tests/Serilog.Sinks.SentrySDK.Tests.csprojdotnet restore src/Serilog.Sinks.SentrySDK.sln
dotnet format src/Serilog.Sinks.SentrySDK.slndotnet format src/Serilog.Sinks.SentrySDK.sln --verify-no-changes4. Repository references
Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.
Prerequisites and first run
4.1. Installation
README.md
4.2. Build, run tests, and coverage (local development)
README.md
4.3. Installation (PACKAGE_README.md)
src/PACKAGE_README.md
4.4. Getting started
src/PACKAGE_README.md
4.5. Installation (PACKAGE_README_NET6.md)
src/PACKAGE_README_NET6.md
API and integration
4.6. Serilog.Sinks.SentrySDK
README.md
4.7. Sentry SDK
README.md
4.8. Contributing to Serilog.Sinks.SentrySDK
CONTRIBUTING.md
4.9. Serilog.Sinks.SentrySDK (PACKAGE_README.md)
src/PACKAGE_README.md
4.10. Sentry SDK options vs this sink
src/PACKAGE_README.md
Development and contributions
4.11. Tests and coverage
CONTRIBUTING.md
- Run tests locally before pushing:
- CI runs these tests and uploads coverage to Codecov. Prefer new tests for new code paths (e.g. factories, sink behavior, middleware) so coverage does not drop unnecessarily.
4.12. Demos, build, contributing
src/PACKAGE_README.md
- Demos: demos/README.md on GitHub
- Solution and local build/test commands: README — Build, run tests, and coverage
- CONTRIBUTING.md Full documentation (CI, publishing, formatting): README.md on GitHub.
Source documentation
README.mdCONTRIBUTING.mddemos/README.mdsrc/PACKAGE_README.mdsrc/PACKAGE_README_NET6.mdsrc/PACKAGE_README_NET10.md
6 documents read from 6 candidates.
5. Features and components 2
- Sink and SDK boundary
- SentrySink.cs defines an SDK wrapper interface with capture-message, capture-exception and transaction methods. The wrapper delegates to SentrySdk. This boundary gives tests a substitute for the external SDK calls.
- Application context
- The source tree separates the sink package from ASP.NET Core integration and tests. Request and user factories adapt HTTP context. Logging configuration and request enrichment therefore have different responsibilities.
6. Architecture
Expand a component to follow its connections, or explore the full diagram.
Application log event
Serilog pipeline
Sentry sink and context
- From Serilog pipeline
- To SDK wrapper
SDK wrapper
Sentry SDK
- From SDK wrapper
Mermaid Interactive diagram
System overview of the components and connections verified in the repository.

flowchart LR
node_app(("Application"))
node_serilog["Serilog pipeline"]
node_sentryservice(("Sentry service"))
subgraph group_sentry["Sentry event delivery"]
node_requestfactory["Request factory"]
node_userfactory["User factory"]
node_sentrysdk["Sentry SDK"]
end
subgraph group_logging["Serilog integration"]
node_sinkconfig["Sink registration"]
node_sink["Event sink<br/>[SentrySink.cs]"]
end
subgraph group_web["ASP.NET Core context"]
node_contextadapter["HTTP adapter"]
node_middleware["Request middleware"]
node_destructure["Context destructuring"]
node_contextcontract["HTTP context contract"]
end
node_app -->|"writes events"| node_serilog
node_serilog -->|"configures sink"| node_sinkconfig
node_sinkconfig -->|"creates sink"| node_sink
node_sentrysdk -.->|"sends telemetry"| node_sentryservice
node_middleware -->|"pushes context"| node_contextadapter
node_middleware -->|"logs exceptions"| node_serilog
node_contextadapter -->|"implements"| node_contextcontract
node_destructure -->|"recognizes context"| node_contextcontract
node_requestfactory -->|"reads request data"| node_contextcontract
node_userfactory -->|"reads user data"| node_contextcontract
group_logging --> group_sentry
class node_sinkconfig,node_sink toneBlue
class node_requestfactory,node_userfactory,node_sentrysdk toneAmber
class node_contextadapter,node_middleware,node_destructure,node_contextcontract toneMint
class node_app,node_serilog,node_sentryservice toneIndigo
A Serilog sink that configures the Sentry SDK and maps log events to messages, exceptions, breadcrumbs and optional traces. The ASP.NET Core package adds request and user context through an HTTP-context adapter.
- Components
- 12
- Connections
- 13
- Evidence-backed links
- 10/13
Text version of the diagram
The diagram merges parallel links between groups, so it shows 11 of 13. Full list:
- Application → Serilog pipeline (writes events)
- Serilog pipeline → Sink registration (configures sink)
- Sink registration → Event sink (creates sink)
- Event sink → Sentry SDK (captures events)
- Sentry SDK → Sentry service (sends telemetry)
- Request middleware → HTTP adapter (pushes context)
- Request middleware → Serilog pipeline (logs exceptions)
- HTTP adapter → HTTP context contract (implements)
- Context destructuring → HTTP context contract (recognizes context)
- Request factory → HTTP context contract (reads request data)
- User factory → HTTP context contract (reads user data)
- Event sink → Request factory (uses request context)
- Event sink → User factory (uses user context)
Follow one path through the code
Follow an exception-bearing log through the sink and compare it with a message-only event. The wrapper exposes separate capture operations, so a useful test checks the chosen operation and its event data, not only that a call occurred.
7. Technical dossier
Built from the source at commit d0b5c25 (45 files). Each item comes from a pattern match in the code, so open the linked file before relying on it.
7.1. Layers and modules
Folders are sorted into layers by name, from the user interface down to data access. Because the sorting uses names only, the diagram says nothing about calls between layers.
Mermaid Layered view
flowchart TB
subgraph L_presentation["Presentation"]
direction TB
presentation_0["Serilog.Sinks.SentrySDK.AspNetCore.Tests/reports<br/>1 file"]
presentation_1["Serilog.Sinks.SentrySDK.Tests/reports<br/>1 file"]
presentation_2["demos/SentryWeb<br/>1 file"]
end
subgraph L_interface["Entry points and API"]
direction TB
interface_0["demos/SentryWeb<br/>1 file"]
end
subgraph L_domain["Domain and business rules"]
direction TB
domain_0["demos/SentryWeb<br/>1 file"]
end
subgraph L_infrastructure["Data and infrastructure"]
direction TB
infrastructure_0["Serilog.Sinks.SentrySDK.AspNetCore<br/>1 file"]
infrastructure_1["demos/SentryWeb<br/>1 file"]
end
subgraph L_core["Core source"]
direction TB
core_0["Serilog.Sinks.SentrySDK<br/>6 files"]
core_1["Serilog.Sinks.SentrySDK.AspNetCore<br/>4 files"]
core_2["demos/SentryWeb<br/>4 files"]
core_3["(root)<br/>1 file"]
core_more["+1"]
end
subgraph L_tests["Tests"]
direction TB
tests_0["Serilog.Sinks.SentrySDK.Tests<br/>6 files"]
tests_1["Serilog.Sinks.SentrySDK.AspNetCore.Tests<br/>5 files"]
end
subgraph L_hosting["Build, CI and hosting"]
direction TB
hosting_0[".github<br/>10 files"]
end
L_presentation ~~~ L_interface
L_interface ~~~ L_domain
L_domain ~~~ L_infrastructure
L_infrastructure ~~~ L_core
L_core ~~~ L_tests
L_core ~~~ L_hosting
| Module | Layer | Files | Types | Extensions |
|---|---|---|---|---|
demos/SentryWeb | Core source | 8 | 5 | .cs .js .css |
Serilog.Sinks.SentrySDK | Core source | 6 | 14 | .cs |
Serilog.Sinks.SentrySDK.AspNetCore | Core source | 5 | 5 | .cs |
(root) | Core source | 1 | 0 | .ps1 |
Serilog.Sinks.SentrySDK.AspNetCore.Tests/reports | Presentation | 1 | 0 | .xml |
Serilog.Sinks.SentrySDK.Tests/reports | Presentation | 1 | 0 | .xml |
demos/SentryConsole | Core source | 1 | 1 | .cs |
7.2. C4 model
From system context to code declarations. Each level reflects the available source evidence.
UML 1 · System context
The widest C4 view: who uses the project and which outside systems and data stores it relies on. Rendered with uml-mcp.
PlantUML source
@startuml
!include <C4/C4_Context>
LAYOUT_LEFT_RIGHT()
System(SYS, "Serilog.Sinks.SentrySDK", "Serilog.Sinks.SentrySDK connects a .NET logging pipeline to the Sentr…")
System_Ext(E0, "Sentry")
Rel(SYS, E0, "Calls")
@enduml
UML 2 · Containers
One level closer: the parts that run separately inside the project, their main language and how calls flow between them. Rendered with uml-mcp.
PlantUML source
@startuml
!include <C4/C4_Container>
LAYOUT_LEFT_RIGHT()
System_Boundary(SYS, "Serilog.Sinks.SentrySDK") {
Container(APP, "Serilog.Sinks.SentrySDK", "C#")
}
System_Ext(E0, "Sentry")
Rel(APP, E0, "Calls")
@enduml
UML 3 · Components and layers
Modules grouped by source-layer classification. Boundaries show organization, not runtime isolation or call relationships. Rendered with uml-mcp.
PlantUML source
@startuml
!include <C4/C4_Component>
LAYOUT_TOP_DOWN()
System_Boundary(SYS, "Serilog.Sinks.SentrySDK") {
Boundary(L0, "Presentation", "layer") {
Component(M0_0, "demos/SentryWeb", ".css", "6 files")
Component(M0_1, "Serilog.Sinks.SentrySDK.AspNetCore.Tests/reports", ".xml", "1 files")
Component(M0_2, "Serilog.Sinks.SentrySDK.Tests/reports", ".xml", "1 files")
}
Boundary(L1, "Entry points and API", "layer") {
Component(M1_0, "demos/SentryWeb", "C#", "1 files")
}
Boundary(L2, "Domain and business rules", "layer") {
Component(M2_0, "demos/SentryWeb", "C#", "1 files")
}
Boundary(L3, "Data and infrastructure", "layer") {
Component(M3_0, "demos/SentryWeb", "JavaScript", "11 files")
Component(M3_1, "Serilog.Sinks.SentrySDK.AspNetCore", "C#", "1 files")
}
Boundary(L4, "Core source", "layer") {
Component(M4_0, "Serilog.Sinks.SentrySDK", "C#", "6 files")
Component(M4_1, "demos/SentryWeb", "C#, JavaScript", "5 files")
Component(M4_2, "Serilog.Sinks.SentrySDK.AspNetCore", "C#", "4 files")
Component(M4_3, "(root)", ".ps1", "1 files")
Component(M4_4, "demos/SentryConsole", "C#", "1 files")
}
Boundary(L5, "Tests", "layer") {
Component(M5_0, "Serilog.Sinks.SentrySDK.Tests", "C#", "6 files")
Component(M5_1, "Serilog.Sinks.SentrySDK.AspNetCore.Tests", "C#", "5 files")
}
Boundary(L6, "Build, CI and hosting", "layer") {
Component(M6_0, ".github", ".yml, .md", "10 files")
}
}
@enduml
UML 4 · Code
Selected declarations, fields and methods grouped by source file. No inheritance or call edges are inferred. Rendered with uml-mcp.
PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
top to bottom direction
hide empty members
package "Serilog.Sinks.SentrySDK" {
package "src/Serilog.Sinks.SentrySDK/SentrySink.cs" as F0 {
class "SentrySink" as T0_0 {
Emit()
EmitWithoutTracing()
GetBreadcrumbLevel()
GetSentryLevel()
ExceptionDataToScopeExtrasDictionary()
RenderPropertyValuesToStringDictionary()
}
class "ISentrySdkWrapper" as T0_1 {
CaptureMessage()
CaptureException()
StartTransaction()
}
}
package "demos/SentryConsole/Program.cs" as F1 {
class "Program" as T1_0 {
Main()
ThrowDivideByZeroSecondTier()
DivByZero()
ThrowParseExceptionSecondTier()
ConvertToInt()
}
}
package "demos/SentryWeb/Startup.cs" as F2 {
class "Startup" as T2_0 {
ConfigureLogging()
ConfigureServices()
Configure()
}
}
package "src/Serilog.Sinks.SentrySDK.AspNetCore/ExceptionExtensions.cs" as F3 {
class "ExceptionExtensions" as T3_0 {
CheckIfCaptured()
SetCaptured()
}
}
package "demos/SentryWeb/Models/ErrorViewModel.cs" as F4 {
class "ErrorViewModel" as T4_0 {
RequestId
}
}
}
@enduml
7.3. Data flow
The calls from the GitDiagram graph, in the order you meet them from the entry points. GitDiagram generates the graph with AI; the file paths it cites were checked against the repository tree.
Mermaid Sequence diagram
sequenceDiagram
autonumber
participant P0 as Request middleware
participant P1 as HTTP adapter
participant P2 as Serilog pipeline
participant P3 as Context destructuring
participant P4 as HTTP context contract
participant P5 as Application
participant P6 as Sink registration
participant P7 as Event sink
participant P8 as Sentry SDK
participant P9 as Request factory
participant P10 as User factory
participant P11 as Sentry service
P0->>P1: pushes context
P0->>P2: logs exceptions
P3->>P4: recognizes context
P5->>P2: writes events
P1->>P4: implements
P2->>P6: configures sink
P6->>P7: creates sink
P7->>P8: captures events
P7--)P9: uses request context
P7--)P10: uses user context
P8--)P11: sends telemetry
P9->>P4: reads request data
P10->>P4: reads user data
Steps as text
- Request middleware to HTTP adapter pushes context
- Request middleware to Serilog pipeline logs exceptions
- Context destructuring to HTTP context contract recognizes context
- Application to Serilog pipeline writes events
- HTTP adapter to HTTP context contract implements
- Serilog pipeline to Sink registration configures sink
- Sink registration to Event sink creates sink
- Event sink to Sentry SDK captures events
- Event sink to Request factory uses request context
- Event sink to User factory uses user context
- Sentry SDK to Sentry service sends telemetry
- Request factory to HTTP context contract reads request data
- User factory to HTTP context contract reads user data
7.4. Public interface
Outside code can use everything listed here. The project also declares 25 public types.
Entry points
demos/SentryConsole/Program.csentry filedemos/SentryWeb/Program.csentry file
7.5. Private interface
These names are internal by the language’s conventions: a leading underscore, private, static or pub(crate).
- private / internal method
- 3
ConfigureLoggingdemos/SentryWeb/Startup.cs:24EmitWithoutTracingsrc/Serilog.Sinks.SentrySDK/SentrySink.cs:464GetBreadcrumbLevelsrc/Serilog.Sinks.SentrySDK/SentrySink.cs:520
7.6. Services
Service 2
ITransactionServiceStartChildTransactionServiceStartChild
Controller 1
HomeControllerIndex, About, Contact and 2 more
Adapter 1
AspCoreHttpContextAdapterGetRequestBody, GetRequestBodyAsync
7.7. Entities and data model 1
| Entity | Kind | First fields |
|---|---|---|
ErrorViewModel | Record or interface | RequestId |
7.8. Business logic
Once UI code and the services and entities above are set aside, these classes have the most methods.
SentrySinkCore source, 10 methodsEmit, EmitWithoutTracing, GetBreadcrumbLevel, GetSentryLevel, ExceptionDataToScopeExtrasDictionary, RenderPropertyValuesToStringDictionaryProgramCore source, 5 methodsMain, ThrowDivideByZeroSecondTier, DivByZero, ThrowParseExceptionSecondTier, ConvertToIntISentrySdkWrapperCore source, 3 methodsCaptureMessage, CaptureException, StartTransactionStartupCore source, 3 methodsConfigureLogging, ConfigureServices, ConfigureExceptionExtensionsCore source, 2 methodsCheckIfCaptured, SetCaptured
7.9. External integrations
7.10. Stack and dependencies
.NET src/Serilog.Sinks.SentrySDK.AspNetCore.Tests/Serilog.Sinks.SentrySDK.AspNetCore.Tests.csproj 17 runtime
Target net10.0
.NET src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj 4 runtime
Target net6.0;net10.0 Target net6.0 Target net10.0
.NET src/Serilog.Sinks.SentrySDK.Tests/Serilog.Sinks.SentrySDK.Tests.csproj 19 runtime
Target net10.0
.NET src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj 10 runtime
Target net6.0;net10.0 Target net6.0 Target net10.0
External dependencies
22 declared packages (22 runtime, 0 development) in demos/SentryConsole/SentryConsole.csproj, src/Serilog.Sinks.SentrySDK.AspNetCore.Tests/Serilog.Sinks.SentrySDK.AspNetCore.Tests.csproj, src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj, src/Serilog.Sinks.SentrySDK.Tests/Serilog.Sinks.SentrySDK.Tests.csproj, src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj.
Package table 22
| Package | Version | Scope | Purpose | Registry |
|---|---|---|---|---|
Newtonsoft.Json | 13.0.4 | runtime | — | nuget.org |
Serilog | 4.3.1 | runtime | Logging and observability | nuget.org |
Serilog.Exceptions | 8.4.0 | runtime | Logging and observability | nuget.org |
Serilog.Sinks.File | 7.0.0 | runtime | Logging and observability | nuget.org |
Sentry.Serilog | 6.4.1 | runtime | Logging and observability | nuget.org |
Microsoft.Extensions.Configuration.Json | 10.0.13 | runtime | — | nuget.org |
Microsoft.Extensions.Configuration.Binder | 10.0.13 | runtime | — | nuget.org |
xunit | 2.9.3 | runtime | Testing | nuget.org |
Moq | 4.20.72 | runtime | Testing | nuget.org |
Castle.Core | 5.2.1 | runtime | — | nuget.org |
xunit.runner.visualstudio | 3.1.5 | runtime | Testing | nuget.org |
Microsoft.NET.Test.Sdk | 18.5.1 | runtime | Testing | nuget.org |
coverlet.collector | 10.0.0 | runtime | — | nuget.org |
FluentAssertions | 8.9.0 | runtime | — | nuget.org |
coverlet.msbuild | 10.0.0 | runtime | Build tooling | nuget.org |
Sentry | 6.4.1 | runtime | Logging and observability | nuget.org |
Serilog.Settings.Configuration | 10.0.0 | runtime | Logging and observability | nuget.org |
Serilog.Sinks.Console | 6.1.1 | runtime | Logging and observability | nuget.org |
Serilog.Sinks.Sentry | 2.4.3 | runtime | Logging and observability | nuget.org |
Microsoft.SourceLink.GitHub | 10.0.402 | runtime | — | nuget.org |
Microsoft.AspNetCore.Http.Abstractions | 2.3.13 | runtime | Web framework | nuget.org |
Serilog.Sinks.TestCorrelator | 4.0.0 | runtime | Testing | nuget.org |
7.11. CI/CD pipeline
4 GitHub Actions workflows, 11 jobs. Each box is a job; double-bordered boxes publish or deploy, and arrows follow needs.
Mermaid Pipeline flow
flowchart LR
subgraph wf0[".NET Core CI"]
direction LR
wf0_build["build<br/>ubuntu-latest"]
wf0_test["test<br/>ubuntu-latest"]
wf0_package["package<br/>ubuntu-latest"]
wf0_push[["push<br/>ubuntu-latest"]]
end
subgraph wf1["CodeQL"]
direction LR
wf1_analyze["Analyze<br/>ubuntu-latest"]
end
subgraph wf2["Publish NuGet (.6 and .10 lines)"]
direction LR
wf2_publish_alternate_tfm_packages[["publish-alternate-tfm-packages<br/>ubuntu-latest"]]
end
subgraph wf3[".NET Core Test"]
direction LR
wf3_format["format<br/>ubuntu-latest"]
wf3_restore["restore<br/>ubuntu-latest"]
wf3_build["build<br/>ubuntu-latest"]
wf3_test[["test<br/>ubuntu-latest"]]
wf3_coverage["coverage"]
end
t0(["release · manual run"])
t1(["push · pull request · schedule"])
t2(["manual run"])
t3(["push · pull request"])
d0[("NuGet")]
t0 --> wf0_build
wf0_build --> wf0_test
wf0_test --> wf0_package
wf0_package --> wf0_push
wf0_push -.-> d0
t1 --> wf1_analyze
t2 --> wf2_publish_alternate_tfm_packages
wf2_publish_alternate_tfm_packages -.-> d0
t3 --> wf3_format
wf3_format --> wf3_restore
wf3_restore --> wf3_build
wf3_build --> wf3_test
t3 --> wf3_coverage
| Workflow | Triggers | Jobs | Publishes to |
|---|---|---|---|
.NET Core CI.github/workflows/CI.yml | release, manual run |
| NuGet |
CodeQL.github/workflows/codeql.yml | push, pull request, schedule |
| — |
Publish NuGet (.6 and .10 lines).github/workflows/publish-nuget-net6.yml | manual run |
| NuGet |
.NET Core Test.github/workflows/tests.yml | push, pull request |
| — |
7.12. Deployment
Mermaid Deployment diagram
flowchart LR
repo[("GitHub repository")]
ci[["GitHub Actions<br/>4 workflows"]]
pub_NuGet[("NuGet")]
repo -->|"push or pull request"| ci
ci -->|"publishes"| pub_NuGet
Where it runs
Published to
7.13. Monitoring
What the code logs, measures and exposes to tell whether it is working.
7.14. Security
Supply chain
Environment variables 1
The page lists names without their values and underlines the ones that look like secrets.
7.15. Testing
- Test files
- 11
- Source files
- 23
- Test cases, about
- 50
- Unit tests
- 11
Code coverage
No measured coverage report in the analyzed sources.
Where the tests are
src/Serilog.Sinks.SentrySDK.Tests 6 src/Serilog.Sinks.SentrySDK.AspNetCore.Tests 5
Continuous integration
- .NET Core CI
dotnet test- CodeQL
codeql- Publish NuGet (.6 and .10 lines)
dotnet test- .NET Core Test
dotnet test
UML CI pipeline
The main GitHub Actions workflow runs these steps. Jobs that run in parallel sit side by side. Rendered with uml-mcp.
PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
title .NET Core CI
start
partition "build" {
:Checkout code;
:Setup .NET Core;
:Install dependencies - Serilog.Sinks.Sentry…;
:Install dependencies - Serilog.Sinks.Sentry…;
:Build - Serilog.Sinks.SentrySDK;
:Build - Serilog.Sinks.SentrySDK.AspNetCore;
}
partition "test" {
:actions/checkout;
:Setup .NET Core;
:Restore and test;
}
partition "package" {
:actions/checkout;
:Setup .NET Core;
:Pack Serilog.Sinks.SentrySDK (net6 + net10);
:Pack Serilog.Sinks.SentrySDK.AspNetCore (ne…;
:Pack Serilog.Sinks.SentrySDK.6 (net6 only);
:Pack Serilog.Sinks.SentrySDK.AspNetCore.6 (…;
:Pack Serilog.Sinks.SentrySDK.10 (net10 only);
:Pack Serilog.Sinks.SentrySDK.AspNetCore.10 …;
}
partition "push" {
:actions/checkout;
:Setup .NET Core;
:Download NuGet packages;
:Push all NuGet packages (main, .6 net6-only…;
:Upload packages to GitHub Release;
}
stop
@enduml
Nothing found for: Database.
8. Types and file structure
38 declared types, with 12 in the base-relationship overview.
Type diagram
classDiagram
direction TB
class ta0f4fc6d8b31["ISentryRequestFactory"] {
<<interface>>
Create()
}
class tab0f434b248f["SentryRequestFactory"] {
SentryRequestFactory()
Create()
}
class t94a164d611c8["ISentryRequest"] {
<<interface>>
}
class t66938c58944a["SentryRequest"] {
}
class td9dd9f1be134["ISentrySdkWrapper"] {
<<interface>>
CaptureMessage()
CaptureException()
StartTransaction()
}
class t436d77520181["SentrySdkWrapper"] {
SentrySdkWrapper()
CaptureMessage()
CaptureException()
StartTransaction()
}
class t9aa877270a99["ITransactionService"] {
<<interface>>
StartChild()
}
class t7f1535817357["TransactionService"] {
StartChild()
}
class t53092b4cd27d["SentrySink"] {
SentrySink()
Emit()
EmitWithoutTracing()
GetBreadcrumbLevel()
}
class t3bef4532763b["SentrySinkExtensions"] {
Sentry()
}
class t6b344cd3bb4d["Program"] {
Main()
ThrowDivideByZeroSecondTier()
DivByZero()
ThrowParseExceptionSecondTier()
}
class t0108ee6641d7["HomeController"] {
Index()
About()
Contact()
Error()
}
ta0f4fc6d8b31 <|.. tab0f434b248f
t94a164d611c8 <|.. t66938c58944a
td9dd9f1be134 <|.. t436d77520181
t9aa877270a99 <|.. t7f1535817357
class bc2d528bdb08a["ILogEventSink"] {
<<unresolved_base>>
}
t53092b4cd27d ..> bc2d528bdb08a : declared base
class b06fa01e7e2b1["IDisposable"] {
<<unresolved_base>>
}
t53092b4cd27d ..> b06fa01e7e2b1 : declared base
class bd8f3faa41a98["Controller"] {
<<unresolved_base>>
}
t0108ee6641d7 ..> bd8f3faa41a98 : declared base
Unresolved bases remain labelled; full signatures are not reconstructed.
9. Reference
32 / 32 eligible files read (117 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.
What the scan covers
Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.
Linguist statistics cover the whole repository and may include other languages.
11. Files to read 3
12. Glossary
Repository
The versioned source files, configuration, and history of a project.
README
The repository’s entry document, usually covering its purpose and initial setup.
Dependency
A library, tool, or service that another component needs to build or run.
HTTP
A request-and-response protocol used by browsers and web services. A method, path, headers, and optional body describe a request.
CLI
A text interface in which commands and arguments select operations. Exit codes let scripts detect success or failure.
Continuous integration
Automated checks that run when source changes, such as building, testing, and linting. Passing checks cover only what those checks exercise.
13. References
- antoinebou12. (2026, November 5). Serilog.Sinks.SentrySDK. [Software repository] github.com.
- antoinebou12. (2026, November 5). Serilog.Sinks.SentrySDK: README. [Repository documentation] github.com.
- antoinebou12. (2026, November 5). src/Serilog.Sinks.SentrySDK/SentrySink.cs. [Source file] github.com.
- antoinebou12. (2026, November 5). src/Serilog.Sinks.SentrySDK/AspNetCoreSentryRequestFactory.cs. [Source file] github.com.
- antoinebou12. (2026, November 5). src/Serilog.Sinks.SentrySDK/SentrySinkExtensions.cs. [Source file] github.com.
- Boucher, A. (2026, October 20). Serilog.Sinks.SentrySDK: connecting structured logs to error reporting. [Project article] antoineboucher.info.
- Boucher, A. (2021, September 6). Serilog.Sinks.SentrySDK. [Project article] antoineboucher.info.
- Boucher, A. (2026, October 23). Serilog.Sinks.SentrySDK: Adapting log events to Sentry. [Project article] antoineboucher.info.
Sources without a publication date show the date they were last checked, November 5, 2026. File links retain the inspected revision where available.