OutWit.Shared.Logging.Provider.Loki
1.1.3
dotnet add package OutWit.Shared.Logging.Provider.Loki --version 1.1.3
NuGet\Install-Package OutWit.Shared.Logging.Provider.Loki -Version 1.1.3
<PackageReference Include="OutWit.Shared.Logging.Provider.Loki" Version="1.1.3" />
<PackageVersion Include="OutWit.Shared.Logging.Provider.Loki" Version="1.1.3" />
<PackageReference Include="OutWit.Shared.Logging.Provider.Loki" />
paket add OutWit.Shared.Logging.Provider.Loki --version 1.1.3
#r "nuget: OutWit.Shared.Logging.Provider.Loki, 1.1.3"
#:package OutWit.Shared.Logging.Provider.Loki@1.1.3
#addin nuget:?package=OutWit.Shared.Logging.Provider.Loki&version=1.1.3
#tool nuget:?package=OutWit.Shared.Logging.Provider.Loki&version=1.1.3
OutWit.Shared.Logging.Provider.Loki
Grafana Loki log provider plugin for OutWit hosts. Thin wrapper over
OutWit.Common.Logging.Loki
that registers an ILogQueryProvider
which translates neutral LogQuery requests into LogQL and dispatches them
against /loki/api/v1/*.
Configuration
Plugin reads its own appsettings.json from inside the deployed module folder:
{
"Loki": {
"BaseUrl": "",
"TenantId": "",
"Username": "",
"Password": "",
"DefaultLabels": { "service_name": "WitIdentity" },
"MaxResultLimit": 1000,
"MaxRange": "7.00:00:00"
}
}
| Setting | Default | Description |
|---|---|---|
BaseUrl |
(required) | Loki HTTP endpoint, e.g. http://loki:3100. |
TenantId |
(empty) | Multi-tenant Loki tenant id (X-Scope-OrgID header). Leave blank for single-tenant deployments. |
Username |
(empty) | Basic-auth username (Grafana Cloud, nginx fronting Loki). |
Password |
(empty) | Basic-auth password. Should be supplied via env var Loki__Password — keep the JSON value blank. |
DefaultLabels |
{ service_name: WitIdentity } |
Stream selectors added to every query — narrow the scope to this host's logs. |
MaxResultLimit |
1000 |
Maximum entries per query (Loki rejects beyond its server-side cap). |
MaxRange |
7.00:00:00 |
Maximum time range per query (d.hh:mm:ss). Protects against accidental full-history scans. |
Env-var override convention
Loki__BaseUrl=http://loki.internal:3100
Loki__TenantId=witidentity
Loki__Username=witidentity
Loki__Password=******** # never put this in JSON
Installation
dotnet add package OutWit.Shared.Logging.Provider.Loki
The plugin's build/.targets auto-copies the module to your output
@Logging/loki.module/ at build time. The host's
WitPluginLoader<ILogProviderPlugin> discovers it.
License
Apache 2.0 — see LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- OutWit.Common.Logging.Loki (= 2.0.0)
- OutWit.Common.Logging.Query (>= 1.0.0)
- OutWit.Common.Plugins.Abstractions (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.