Skip to main content

Backend Event ID Registry

Centralized reference of all [LoggerMessage] event IDs used across the backend API.
Prevents ID collisions and enables efficient log querying in Azure Application Insights.

Event ID Scheme

Event IDs follow the pattern XXX_YZZ where:

  • XXX = Layer/domain prefix
  • Y = Sub-category within the layer
  • ZZ = Sequential event number

Registry by Project

Common — Key Vault and Configuration Loading (src/Common/Log.cs)

Event IDLevelMessageMethod
0CriticalOption missing from config AND Key VaultLogOptionValueIsCompletelyMissing
1InformationOption loaded from Key VaultLogOptionValueFromKeyVault
2InformationOption loaded from configuration fileLogOptionValueFromConfiguration

Common — Configuration Proxy (src/Common/Log.cs)

Event IDLevelMessageMethod
410_103InformationConfig and features refreshed from proxyLogRefreshSucceeded
410_104WarningConfig refresh failed, retryingLogRefreshFailed
410_105WarningConfig refresh returned no valuesLogBootstrapMissing
410_107InformationFeature snapshot cache updatedLogFeatureSnapshotUpdated
410_201Warningexp returned HTTP error for config keyLogConfigKeyHttpError
410_202ErrorNetwork error fetching config keyLogConfigKeyNetworkError
410_203ErrorTimeout fetching config keyLogConfigKeyTimeout
410_204ErrorDeserialization error for config keyLogConfigKeyDeserializationError

Core (src/Core/Log.cs)

Event IDLevelMessageMethod
500_100InformationGeneral domain config startedLogGeneralDomainConfigurationStarted
500_101InformationGeneral domain config completedLogGeneralDomainConfigurationCompleted
500_102InformationProxy config fetch startedLogProxyConfigurationFetchStarted
500_103InformationProxy config fetch completedLogProxyConfigurationFetchCompleted
500_104ErrorProxy config fetch failedLogProxyConfigurationFetchFailed
500_105InformationOTel configuredLogOTelConfigured
500_106InformationInvoices domain configuredLogInvoicesDomainConfigured
500_107InformationApplication startedLogApplicationStarted
500_200InformationPipeline config startedLogPipelineConfigurationStarted
500_201InformationPipeline config completedLogPipelineConfigurationCompleted
500_202DebugSecurity headers injectedLogSecurityHeadersInjected
500_203InformationSwagger configuredLogSwaggerConfigured
500_300InformationHealth checks registeredLogHealthChecksRegistered
500_301DebugHealth check completedLogHealthCheckCompleted

Core.Auth (src/Core.Auth/Log.cs)

Event IDLevelMessageMethod
600_100InformationUser logged outLogUserLoggedOut
600_101WarningLogout failed — null bodyLogLogoutFailed
600_102InformationAuth endpoints mappedLogAuthEndpointsMapped
600_200WarningJWT secret missingLogJwtSecretMissing
600_201WarningJWT issuer validation failedLogJwtIssuerValidationFailed
600_202WarningJWT audience validation failedLogJwtAudienceValidationFailed
600_203DebugJWT issuer fallback appliedLogJwtIssuerFallback
600_204DebugJWT audience fallback appliedLogJwtAudienceFallback
600_300InformationAuth services configuredLogAuthServicesConfigured
600_301InformationAuth middleware appliedLogAuthMiddlewareApplied
600_302ErrorAuthDbContext config failedLogAuthDbContextConfigurationFailed

Invoices (src/Invoices/Modules/Log.cs)

Foundation Services (100_xxx)

Event IDLevelMessageMethod
100_100ErrorInvoice analysis validation exceptionLogInvoiceAnalysisValidationException
100_101ErrorInvoice analysis dependency exceptionLogInvoiceAnalysisDependencyException
100_102ErrorInvoice analysis dependency validation exceptionLogInvoiceAnalysisDependencyValidationException
100_103ErrorInvoice analysis service exceptionLogInvoiceAnalysisServiceException
100_104WarningNo analysis performed on invoiceLogInvoiceAnalysisNoAnalysisHasBeenPerformed
100_200ErrorInvoice storage validation exceptionLogInvoiceStorageValidationException
100_201ErrorInvoice storage dependency exceptionLogInvoiceStorageDependencyException
100_202ErrorInvoice storage dependency validation exceptionLogInvoiceStorageDependencyValidationException
100_203ErrorInvoice storage service exceptionLogInvoiceStorageServiceException
100_300ErrorMerchant storage validation exceptionLogMerchantStorageServiceValidationException
100_301ErrorMerchant storage dependency exceptionLogMerchantStorageServiceDependencyException
100_302ErrorMerchant storage dependency validation exceptionLogMerchantStorageServiceDependencyValidationException
100_303ErrorMerchant storage service exceptionLogMerchantStorageServiceException

Orchestration Services (200_xxx)

Event IDLevelMessageMethod
200_100ErrorInvoice orchestration validation exceptionLogInvoiceOrchestrationValidationException
200_101ErrorInvoice orchestration dependency exceptionLogInvoiceOrchestrationDependencyException
200_102ErrorInvoice orchestration dependency validation exceptionLogInvoiceOrchestrationDependencyValidationException
200_103ErrorInvoice orchestration service exceptionLogInvoiceOrchestrationServiceException
200_200ErrorMerchant orchestration validation exceptionLogMerchantOrchestrationValidationException
200_201ErrorMerchant orchestration dependency exceptionLogMerchantOrchestrationDependencyException
200_202ErrorMerchant orchestration dependency validation exceptionLogMerchantOrchestrationDependencyValidationException
200_203ErrorMerchant orchestration service exceptionLogMerchantOrchestrationServiceException

Processing Services (300_xxx)

Event IDLevelMessageMethod
300_100ErrorInvoice processing validation exceptionLogInvoiceProcessingValidationException
300_101ErrorInvoice processing dependency exceptionLogInvoiceProcessingDependencyException
300_102ErrorInvoice processing dependency validation exceptionLogInvoiceProcessingDependencyValidationException
300_103ErrorInvoice processing service exceptionLogInvoiceProcessingServiceException

Classifier Broker (400_xxx)

Event IDLevelMessageMethod
400_100ErrorGPT method failedLogGptMethodFailed
400_101ErrorGPT method failed with contextLogGptMethodFailedWithContext
400_102WarningContent filter triggeredLogContentFilterTriggered
400_103WarningContent filter triggered with contextLogContentFilterTriggeredWithContext
400_104InformationGPT analysis startedLogGptAnalysisStarted
400_105WarningAllergen hallucination skippedLogAllergenHallucinationSkipped
400_106WarningAllergen unrecognized skippedLogAllergenUnrecognizedSkipped

General Validation (900_xxx)

Event IDLevelMessageMethod
900_100WarningUser identifier not setLogUserIdentifierNotSetWarning

ID Range Allocation

RangeProjectDomain
0–99Common/TelemetryOTel setup, Key Vault config
100_000–199_999InvoicesFoundation services
200_000–299_999InvoicesOrchestration services
300_000–399_999InvoicesProcessing services
400_000–409_999InvoicesClassifier/AI broker
410_000–419_999Common/ConfigConfiguration proxy
500_000–599_999CoreStartup, middleware, health
600_000–699_999Core.AuthAuth, JWT, identity
900_000–999_999InvoicesGeneral validation

Custom Metrics Registry

Invoice Meter (arolariu.Backend.Domain.Invoices) — RED Method

InstrumentTypeUnitTagsDescription
invoices.operationsCounteroperationsoperation, entity, outcome, failure.reasonInvoice/merchant CRUD rate with outcome
invoices.operations.durationHistogrammsoperation, entity, outcomeCRUD operation latency distribution
invoices.analysisCounteranalysesoutcome, failure.reasonAnalysis pipeline rate with outcome
invoices.analysis.durationHistogrammsoutcomeAnalysis pipeline latency distribution
invoices.analysis.content_filter.triggeredCountereventsAI content filter triggers
invoices.cosmosdb.request_chargeHistogramRUdb.operation, db.cosmosdb.containerCosmos DB RU per operation

SLA/QoS Computation (KQL):

// Success Rate SLI (per operation)
customMetrics
| where name == "invoices.operations"
| summarize total=sum(value), success=sumif(value, customDimensions["outcome"]=="success")
by tostring(customDimensions["operation"]), tostring(customDimensions["entity"])
| extend success_rate = round(100.0 * success / total, 2)
| order by success_rate asc

// Latency SLO (p99 < threshold)
customMetrics
| where name == "invoices.operations.duration"
| where customDimensions["outcome"] == "success"
| summarize p50=percentile(value, 50), p95=percentile(value, 95), p99=percentile(value, 99)
by tostring(customDimensions["operation"]), tostring(customDimensions["entity"])

// Error Budget Burn Rate
customMetrics
| where name == "invoices.operations"
| where customDimensions["outcome"] == "failure"
| summarize failures=sum(value) by bin(timestamp, 1h), tostring(customDimensions["failure.reason"])
| render timechart

Auth Meter (arolariu.Backend.Auth)

InstrumentTypeUnitDescription
auth.logoutsCountereventsSuccessful logouts
auth.logout_failuresCountereventsFailed logout attempts
auth.jwt.validation_failuresCountereventsJWT validation failures (tag: reason)

Common Meter (arolariu.Backend.Common)

InstrumentTypeUnitDescription
config.refresh.successCountereventsConfig refresh successes
config.refresh.failureCountereventsConfig refresh failures
config.refresh.durationHistogrammsConfig refresh cycle duration
// was this page useful?