Skip to content

Commit 88de119

Browse files
authored
Merge pull request dapr#1232 from berndverst/cosmosdbuseragent
Adds Dapr User Agent for Cosmos DB components
2 parents c8f40e8 + 3bc1c45 commit 88de119

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

bindings/azure/cosmosdb/cosmosdb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func (c *CosmosDB) Init(metadata bindings.Metadata) error {
7272
// so we aren't forced to use a struct by the upstream SDK
7373
// this allows us to provide the most flexibility in the request document sent to this binding
7474
config.IdentificationHydrator = nil
75+
config.WithAppIdentifier("dapr-" + logger.DaprVersion)
7576
client := documentdb.New(m.URL, config)
7677

7778
dbs, err := client.QueryDatabases(&documentdb.Query{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/DATA-DOG/go-sqlmock v1.5.0
2121
github.com/Shopify/sarama v1.23.1
2222
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect
23-
github.com/a8m/documentdb v1.3.0
23+
github.com/a8m/documentdb v1.3.1-0.20211026005403-13c3593b3c3a
2424
github.com/aerospike/aerospike-client-go v4.5.0+incompatible
2525
github.com/agrea/ptr v0.0.0-20180711073057-77a518d99b7b
2626
github.com/ajg/form v1.5.1 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrU
140140
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 h1:5sXbqlSomvdjlRbWyNqkPsJ3Fg+tQZCbgeX1VGljbQY=
141141
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
142142
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
143-
github.com/a8m/documentdb v1.3.0 h1:xzZQ6Ts02QesHeQdRr6doF7xfXYSsq9SUIlCqfJjbv4=
144-
github.com/a8m/documentdb v1.3.0/go.mod h1:4Z0mpi7fkyqjxUdGiNMO3vagyiUoiwLncaIX6AsW5z0=
143+
github.com/a8m/documentdb v1.3.1-0.20211026005403-13c3593b3c3a h1:CRGa9OOZNd184xTDcaVJd6N0KumviIGO6purxihBZ14=
144+
github.com/a8m/documentdb v1.3.1-0.20211026005403-13c3593b3c3a/go.mod h1:4Z0mpi7fkyqjxUdGiNMO3vagyiUoiwLncaIX6AsW5z0=
145145
github.com/aerospike/aerospike-client-go v4.5.0+incompatible h1:6ALev/Ge4jW5avSLoqgvPYTh+FLeeDD9xDhzoMCNgOo=
146146
github.com/aerospike/aerospike-client-go v4.5.0+incompatible/go.mod h1:zj8LBEnWBDOVEIJt8LvaRvDG5ARAoa5dBeHaB472NRc=
147147
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=

state/azure/cosmosdb/cosmosdb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func (c *StateStore) Init(meta state.Metadata) error {
130130
}
131131
config = documentdb.NewConfigWithServicePrincipal(spt)
132132
}
133+
config.WithAppIdentifier("dapr-" + logger.DaprVersion)
133134
client := documentdb.New(m.URL, config)
134135

135136
dbs, err := client.QueryDatabases(&documentdb.Query{

0 commit comments

Comments
 (0)