Skip to content

Commit

Permalink
feat(outputs.azure_data_explorer): add telemetry headers and options …
Browse files Browse the repository at this point in the history
…to connection string for troubleshooting
  • Loading branch information
ag-ramachandran committed Oct 3, 2023
1 parent dd74499 commit a741590
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/outputs/azure_data_explorer/azure_data_explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (*AzureDataExplorer) SampleConfig() string {
// Initialize the client and the ingestor
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", "1.0.0", "", "", false, "",
kusto.StringPair{Key: "MetricsGrouping", Value: adx.MetricsGrouping},
kusto.StringPair{Key: "IngestionType", Value: adx.IngestionType})
client, err := kusto.New(conn)
if err != nil {
return err
Expand Down

0 comments on commit a741590

Please sign in to comment.