Skip to content

Commit

Permalink
Merge pull request #6 from asaharn/feature/telemetrysupport
Browse files Browse the repository at this point in the history
feat: ConnectorName added to ADX props
  • Loading branch information
ag-ramachandran authored Oct 29, 2024
2 parents 62b44b7 + 9d2b2b6 commit 25a733d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/outputs/azure_data_explorer/azure_data_explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type AzureDataExplorer struct {
IngestionType string `toml:"ingestion_type"`
serializer serializers.Serializer
kustoClient *kusto.Client
AppName string
metricIngestors map[string]ingest.Ingestor
}

Expand All @@ -60,7 +61,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 Down Expand Up @@ -250,6 +251,7 @@ func init() {
outputs.Add("azure_data_explorer", func() telegraf.Output {
return &AzureDataExplorer{
Timeout: config.Duration(20 * time.Second),
AppName: "Kusto.Telegraf",
CreateTables: true,
}
})
Expand Down

0 comments on commit 25a733d

Please sign in to comment.