Class ElasticsearchAuditSink
- Namespace
- JD.AI.Core.Governance.Audit
- Assembly
- JD.AI.Core.dll
POSTs audit events as JSON documents to an Elasticsearch index via
{endpoint}/{index}/_doc. The index name supports date templating:
{index} with {yyyy.MM} substituted with the event's month.
public sealed class ElasticsearchAuditSink : IAuditSink
- Inheritance
-
ElasticsearchAuditSink
- Implements
- Inherited Members
Constructors
ElasticsearchAuditSink(HttpClient, string, string, string?)
public ElasticsearchAuditSink(HttpClient httpClient, string endpoint, string indexTemplate, string? token = null)
Parameters
httpClientHttpClientendpointstringindexTemplatestringtokenstring
Properties
Name
public string Name { get; }
Property Value
Methods
FlushAsync(CancellationToken)
public Task FlushAsync(CancellationToken ct = default)
Parameters
Returns
WriteAsync(AuditEvent, CancellationToken)
public Task WriteAsync(AuditEvent evt, CancellationToken ct = default)
Parameters
evtAuditEventctCancellationToken