/nrdgraph

Dgraph client instrumentation for New Relic

Primary LanguageGoMIT LicenseMIT

nrdgraph

GoDoc license

Dgraph client instrumentation for New Relic.

Example

addrs := []string{
	"dgraph-1.example.com",
	"dgraph-2.example.com",
	"dgraph-3.example.com",
}

clients := make([]api.DgraphClient, len(addrs), len(addrs))

for i, addr := range addrs {
	conn, _ := grpc.Dial(addr, grpc.WithInsecure())
	clients[i] = nrdgraph.Wrap(api.NewDgraphClient(d), txn, nrdgraph.WithHost(addr))
}

client := dgo.NewDgraphClient(clients...)