Skip to content

Commit

Permalink
feat(outputs.azure_data_explorer): Set user agent string (#14047)
Browse files Browse the repository at this point in the history
  • Loading branch information
ag-ramachandran authored Oct 4, 2023
1 parent 360eeec commit 4759214
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/outputs/azure_data_explorer/azure_data_explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/config"
"github.com/influxdata/telegraf/internal"
"github.com/influxdata/telegraf/internal/choice"
"github.com/influxdata/telegraf/plugins/outputs"
"github.com/influxdata/telegraf/plugins/serializers"
Expand Down Expand Up @@ -58,6 +59,8 @@ 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", internal.ProductToken(), "", "", false, "")
client, err := kusto.New(conn)
if err != nil {
return err
Expand Down

0 comments on commit 4759214

Please sign in to comment.