Skip to content

Commit

Permalink
*Added MS_Fabric output plugin
Browse files Browse the repository at this point in the history
*Added ADX_commons and EH_Commons tests
*Added tests for ADX output
  • Loading branch information
asaharn committed Dec 27, 2024
1 parent 179e6b9 commit efb1e7d
Show file tree
Hide file tree
Showing 12 changed files with 1,235 additions and 450 deletions.
7 changes: 6 additions & 1 deletion plugins/common/adx/adx_commons.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type AzureDataExplorer struct {
serializer telegraf.Serializer
kustoClient *kusto.Client
metricIngestors map[string]ingest.Ingestor
AppName string
}

const (
Expand All @@ -57,7 +58,7 @@ func (*AzureDataExplorer) SampleConfig() string {
func (adx *AzureDataExplorer) Connect() error {
conn := kusto.NewConnectionStringBuilder(adx.Endpoint).WithDefaultAzureCredential()
// Since init is called before connect, we can set the connector details here including the type. This will be used for telemetry and tracing.
conn.SetConnectorDetails("Telegraf", internal.ProductToken(), "", "", false, "")
conn.SetConnectorDetails("Telegraf", internal.ProductToken(), adx.AppName, "", false, "")
client, err := kusto.New(conn)
if err != nil {
return err
Expand All @@ -68,6 +69,10 @@ func (adx *AzureDataExplorer) Connect() error {
return nil
}

func (adx *AzureDataExplorer) SetSerializer(serializer telegraf.Serializer) {
adx.serializer = serializer
}

// Clean up and close the ingestor
func (adx *AzureDataExplorer) Close() error {
var errs []error
Expand Down
Loading

0 comments on commit efb1e7d

Please sign in to comment.