Skip to content

Diagnostics

Kieron Lanning edited this page Feb 18, 2025 · 5 revisions

General

ID Level Category Description
TSG1000 Error Usage Fatal execution error occurred.
TSG1001 Error Usage Inferring generation targets is not supported when using multi-target generation.
TSG1002 Error Usage Multiple generation types are not supported.
TSG1003 Error Usage Duplicate method names are not supported.
TSG1004 Error Usage Generic interfaces are not supported.
TSG1005 Error Usage Generic methods are not supported.

Logging

ID Level Category Description Valid For
TSG2000 Error Usage Too many exception parameters. Generation v1
TSG2001 Error Usage More than 6 parameters, which is unsupported bug the logging generation framework. Generation v1
TSG2002 Info Usage Inferring Microsoft.Extensions.Logging.LogLevel.Error log level. Generation v1, Generation v2
TSG2003 Warning Usage The Microsoft.Extensions.Logging.ILogger type wasn't found/ referenced, but a generation was attempted. Generation v1, Generation v2
TSG2004 Error Usage Mixing ordinal and named placeholders in message templates is not supported. Generation v1, Generation v2
TSG2005 Error Usage Ordinal placeholders referenced exceeds the number of provided parameters. Generation v1, Generation v2
TSG2006 Error Usage Using LogPropertiesAttribute and ExpandEnumerableAttribute on the same parameter is not supported. Generation v2
TSG2007 Warning Usage A scoped log shouldn't have a LogLevel, this will be ignored. Generation v1, Generation v2
TSG2008 Warning Performance Unbounded enumeration possible. This may have performance implications. Generation v2

Activities

ID Level Category Description
TSG3000 Warning Usage Baggage parameter types only accept strings.
TSG3001 Warning Usage No activity source specified.
TSG3002 Error Usage Invalid return type.
TSG3003 Error Usage Duplicate reserved parameters defined.
TSG3004 Error Usage Activity parameter is not valid.
TSG3005 Error Usage Timestamp parameter is not valid.
TSG3006 Error Usage Start time parameter is not valid on Create activity or Event method.
TSG3007 Error Usage Parent context or Parent Id parameter is not valid on event.
TSG3008 Error Usage Activity links parameters are not valid on events or context methods.
TSG3009 Error Usage Activity tags parameter are not valid on context methods.
TSG3010 Error Usage Escaped parameters must be a boolean.
TSG3011 Error Usage Escaped parameters are only valid on Events, not Activity or Context methods.
TSG3012 Info Usage There is no Activity method defined, only Event and/ or Context. This means the Activity.Current is assumed which much be created manually.
TSG3013 Warning Usage The activity method does not return an Activity.
TGS3014 Warning Usage The Event and/ or Context method should have an Activity or Activity? parameter.
TGS3015 Info Usage For readability, include the Activity parameter as the first one.
TGS3016 Error Usage Status parameter should be a string.
TGS3017 Error Usage Status Description parameters are only valid on Events, not Activity or Context methods.

Metrics

ID Level Category Description
TSG4000 Error Usage No instrument defined.
TSG4001 Error Usage Must return void or bool.
TSG4002 Error Usage Auto increment counter and measurement defined.
TSG4003 Error Usage Multiple measurement values defined.
TSG4004 Error Usage No measurement value defined.
TSG4005 Error Usage Observable instrument requires Func<T>.
TSG4006 Error Usage Invalid measurement type.
Clone this wiki locally