# muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry architecture

> Architecture diagram of the GitHub repository muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry
- Repository: https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry

## Overview

This is a .NET ingest proxy that accepts Sentry envelopes from obfuscated client apps, resolves tenant-specific .nrmap symbols, and forwards the envelopes to the real Sentry project. The workflow authenticates and transforms the envelope, resolves the event’s product/release, retrieves a cached mapping or loads one from disk, deobfuscates frames, then forwards the result. README documents additional health, cache-occupancy, and Prometheus endpoints. Edges reflect shown calls or explicit README documentation; unsampled controller and host wiring is not expanded beyond supported relationships.

Main entry points: [`Sentry Crashes Deobfuscator/Repositories/TenantMappingCache.cs`](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/TenantMappingCache.cs) (Tenant mapping cache), [`Sentry Crashes Deobfuscator/Controllers/SentryDeobfuscationController.cs`](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Controllers/SentryDeobfuscationController.cs) (Envelope API), [`Sentry Crashes Deobfuscator/Services/SentryDeobfuscationService.cs`](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Services/SentryDeobfuscationService.cs) (Frame resolver), [`Sentry Crashes Deobfuscator/Observability/SymbolResolverMetrics.cs`](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Observability/SymbolResolverMetrics.cs) (Symbol metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingest and forwarding"]
  node_api["Envelope API"]
  node_deobfuscate["Frame resolver"]
  node_host["Application host<br/>[Program.cs]"]
end

subgraph group_resolve["Tenant resolution"]
  node_tenant_key["Tenant key resolver"]
  node_tenant_cache[("Tenant mapping cache")]
  node_cache_contract["Cache contract"]
end

subgraph group_maps["Mapping storage"]
  node_mapping_contract["Mapping contract"]
  node_nrmap_parser["NRMap parser<br/>[NRMapRepository.cs]"]
  node_blob_contract["Blob-store contract<br/>[INrmapBlobStore.cs]"]
  node_disk_store["Local disk store"]
end

subgraph group_observe["Observability"]
  node_metrics["Symbol metrics"]
end

node_client(("Sentry client"))
node_real_sentry(("Real Sentry"))

node_client -->|"posts envelope"| node_api
node_api -->|"resolves frames"| node_deobfuscate
node_deobfuscate -->|"resolves tenant"| node_tenant_key
node_deobfuscate -->|"gets mapping"| node_tenant_cache
node_tenant_cache -->|"resolves file"| node_disk_store
node_disk_store -->|"checks segments"| node_tenant_key
node_tenant_cache -->|"loads map"| node_nrmap_parser
node_nrmap_parser -->|"implements lookups"| node_mapping_contract
node_tenant_cache -->|"records cache stats"| node_metrics
node_deobfuscate -->|"records frame stats"| node_metrics
node_api -->|"reports occupancy"| node_tenant_cache
node_api -->|"forwards envelope"| node_real_sentry
node_host -->|"maps controllers"| node_api
node_host -->|"registers cache"| node_tenant_cache
node_host -->|"exposes metrics"| node_metrics
node_metrics -.->|"exports counters"| node_client

click node_api "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Controllers/SentryDeobfuscationController.cs"
click node_deobfuscate "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Services/SentryDeobfuscationService.cs"
click node_tenant_key "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/TenantKeyResolver.cs"
click node_tenant_cache "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/TenantMappingCache.cs"
click node_cache_contract "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/ITenantMappingCache.cs"
click node_mapping_contract "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/IMappingRepository.cs"
click node_nrmap_parser "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/NRMapRepository.cs"
click node_blob_contract "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/INrmapBlobStore.cs"
click node_disk_store "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/LocalDiskNrmapBlobStore.cs"
click node_metrics "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Observability/SymbolResolverMetrics.cs"
click node_host "https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Program.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_deobfuscate,node_host,node_client toneBlue
class node_tenant_key,node_tenant_cache,node_cache_contract toneAmber
class node_mapping_contract,node_nrmap_parser,node_blob_contract,node_disk_store toneMint
class node_metrics toneRose
class node_real_sentry toneIndigo
```

## Components

### Ingest and forwarding

- [Envelope API](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Controllers/SentryDeobfuscationController.cs): `Sentry Crashes Deobfuscator/Controllers/SentryDeobfuscationController.cs`
- [Frame resolver](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Services/SentryDeobfuscationService.cs): `Sentry Crashes Deobfuscator/Services/SentryDeobfuscationService.cs`
- [Application host](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Program.cs): `Sentry Crashes Deobfuscator/Program.cs`

### Tenant resolution

- [Tenant key resolver](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/TenantKeyResolver.cs): `Sentry Crashes Deobfuscator/Repositories/TenantKeyResolver.cs`
- [Tenant mapping cache](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/TenantMappingCache.cs): `Sentry Crashes Deobfuscator/Repositories/TenantMappingCache.cs`
- [Cache contract](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/ITenantMappingCache.cs): `Sentry Crashes Deobfuscator/Repositories/ITenantMappingCache.cs`

### Mapping storage

- [Mapping contract](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/IMappingRepository.cs): `Sentry Crashes Deobfuscator/Repositories/IMappingRepository.cs`
- [NRMap parser](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/NRMapRepository.cs): `Sentry Crashes Deobfuscator/Repositories/NRMapRepository.cs`
- [Blob-store contract](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/INrmapBlobStore.cs): `Sentry Crashes Deobfuscator/Repositories/INrmapBlobStore.cs`
- [Local disk store](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Repositories/LocalDiskNrmapBlobStore.cs): `Sentry Crashes Deobfuscator/Repositories/LocalDiskNrmapBlobStore.cs`

### Observability

- [Symbol metrics](https://github.com/muhammadaliasgher/dotnet-reactor-deobfuscator-for-sentry/blob/main/Sentry%20Crashes%20Deobfuscator/Observability/SymbolResolverMetrics.cs): `Sentry Crashes Deobfuscator/Observability/SymbolResolverMetrics.cs`

### Other components

- **Sentry client**
- **Real Sentry**

## Connections

- Sentry client → Envelope API: posts envelope (evidence: `README.md`)
- Envelope API → Frame resolver: resolves frames (evidence: `README.md`)
- Frame resolver → Tenant key resolver: resolves tenant (evidence: `Sentry Crashes Deobfuscator/Services/SentryDeobfuscationService.cs`)
- Frame resolver → Tenant mapping cache: gets mapping (evidence: `Sentry Crashes Deobfuscator/Services/SentryDeobfuscationService.cs`)
- Tenant mapping cache → Local disk store: resolves file (evidence: `Sentry Crashes Deobfuscator/Repositories/TenantMappingCache.cs`)
- Local disk store → Tenant key resolver: checks segments (evidence: `Sentry Crashes Deobfuscator/Repositories/LocalDiskNrmapBlobStore.cs`)
- Tenant mapping cache → NRMap parser: loads map (evidence: `Sentry Crashes Deobfuscator/Repositories/TenantMappingCache.cs`)
- NRMap parser → Mapping contract: implements lookups (evidence: `Sentry Crashes Deobfuscator/Repositories/NRMapRepository.cs`)
- Tenant mapping cache → Symbol metrics: records cache stats (evidence: `Sentry Crashes Deobfuscator/Repositories/TenantMappingCache.cs`)
- Frame resolver → Symbol metrics: records frame stats (evidence: `Sentry Crashes Deobfuscator/Services/SentryDeobfuscationService.cs`)
- Envelope API → Tenant mapping cache: reports occupancy (evidence: `Sentry Crashes Deobfuscator/Controllers/SentryDeobfuscationController.cs`)
- Envelope API → Real Sentry: forwards envelope (evidence: `README.md`)
- Application host → Envelope API: maps controllers (evidence: `Sentry Crashes Deobfuscator/Program.cs`)
- Application host → Tenant mapping cache: registers cache (evidence: `Sentry Crashes Deobfuscator/Program.cs`)
- Application host → Symbol metrics: exposes metrics (evidence: `Sentry Crashes Deobfuscator/Program.cs`)
- Symbol metrics → Sentry client: exports counters (evidence: `README.md`)
