datalust / seq-input-healthcheck

Periodically GET an HTTP resource and write response metrics to Seq
Other
28 stars 10 forks source link

Error when using data extraction expression #36

Open leighmetzroth opened 1 month ago

leighmetzroth commented 1 month ago

Setting up our Seq instance following this guide and I used the suggested status field as the data extraction expression and we got the below exception logged from the plugin itself (we're using the. We're using the HealthChecks.UI.Client nuget for formatting the response, so it definitely has a status property in the response JSON.

Switching it to use @Properties works.

System.IO.FileLoadException: Could not load file or assembly 'Serilog.Formatting.Compact.Reader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'. Could not find or load a specific file. (0x80131621)
File name: 'Serilog.Formatting.Compact.Reader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Serilog.Formatting.Compact.Reader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'.
   at System.Runtime.Loader.AssemblyLoadContext.<LoadFromPath>g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at SeqCli.Apps.AppLoader.OnAssemblyResolve(Object _, ResolveEventArgs e) in C:\projects\seqcli\src\SeqCli\Apps\AppLoader.cs:line 116
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at Seq.Input.HealthCheck.Data.JsonDataExtractor.<>c__DisplayClass3_0.<.ctor>b__1(JToken v)
   at Seq.Input.HealthCheck.Data.JsonDataExtractor.ExtractData(TextReader json) in C:\projects\seq-input-healthcheck\src\Seq.Input.HealthCheck\Data\JsonDataExtractor.cs:line 71
   at Seq.Input.HealthCheck.HttpHealthCheck.DownloadContent(Stream body, String contentType, Nullable`1 contentLength) in C:\projects\seq-input-healthcheck\src\Seq.Input.HealthCheck\HttpHealthCheck.cs:line 201
   at Seq.Input.HealthCheck.HttpHealthCheck.CheckNow(CancellationToken cancel) in C:\projects\seq-input-healthcheck\src\Seq.Input.HealthCheck\HttpHealthCheck.cs:line 90
liammclennan commented 1 month ago

Hi @leighmetzroth

I've not been able to reproduce this problem yet. Can you please tell me which version of Seq you are using, which version of Seq.Input.Healthcheck and which operating system you are using? Or send a diagnostic report (from Settings > Diagnostics) to support@datalust.co.