building-seq-plug-in-apps

Build Seq plug-in input and output apps using the Seq.Apps .NET runtime API.

167|30|Updated Feb 5, 2018
One-click install
npx skills add https://github.com/datalust/seqcli --skill building-seq-plug-in-apps-datalust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-seq-plug-in-apps
Source: https://github.com/datalust/seqcli/tree/main/src/SeqCli/Skills/Resources/building-seq-plug-in-apps
Command: npx skills add https://github.com/datalust/seqcli --skill building-seq-plug-in-apps-datalust

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developing Seq plug-in apps requires knowledge of the Seq.Apps runtime lifecycle, settings injection, template rendering, and packaging conventions that are easy to get wrong without guidance. ## Core Features & Use Cases - Output App Development: Implement event subscribers with ISubscribeToAsync<LogEvent> or ISubscribeToJsonAsync for alerts, notifications, and event forwarding. - Input App Development: Implement IPublishJson publishers that generate CLEF events from external sources like health checks. - Settings, Templates & Testing: Configure SeqAppSetting properties, render Seq.Syntax templates with custom encoders, and test apps using the gateway pattern with TestAppHost. - Use Case: Build a Telegram notification app that receives Seq alert events, renders an HTML message from a default template, and sends it via a bot API gateway, fully covered by xUnit tests. ## Quick Start Help me create a new Seq output app that forwards alert events to my chat service using the Seq.Apps runtime.

Frequently Asked Questions about building-seq-plug-in-apps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Seq output app in .NET?

Create a class deriving from SeqApp that implements ISubscribeToAsync<LogEvent>, decorate it with the SeqApp attribute, and process events in OnAsync. Validate settings in OnAttached and abstract external I/O behind a gateway interface for testability.

How do I create a Seq input app that publishes events?

Implement IPublishJson on a SeqApp subclass, then write CLEF JSON lines to the TextWriter passed to Start. Return immediately from Start using background tasks, synchronize writes with a lock, and block in Stop until publishing finishes.

Should I use ISubscribeToAsync or ISubscribeToJsonAsync for Seq apps?

Use ISubscribeToJsonAsync for high-volume forwarders and relays that process raw CLEF JSON without Serilog deserialization. Use ISubscribeToAsync<LogEvent> when rendering human-readable output with Seq.Syntax templates or inspecting structured properties.

How do I test Seq apps without a running Seq server?

Set setting properties directly on the app instance, call Attach with a TestAppHost from Seq.Apps.Testing, and invoke OnAsync with test events. Inject a test double gateway through an internal constructor to capture sent payloads without network access.

Why does my Seq app fail to load its dependencies?

Seq does not resolve package dependencies when installing apps, so all assemblies must be packed into the app's own NUPKG. Exclude Seq.Apps.dll, Serilog.dll, and the app's own assembly since the runtime pins its own copies.