Skip to content

Commit

Permalink
docs: add an example of sending to a Wavefront proxy with custom ports
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWinikates authored and priyaselvaganesan committed Aug 31, 2023
1 parent 4aa3472 commit 150e4f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion senders/example_newsender_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ import (

func ExampleNewSender_proxy() {
// For Proxy endpoints, by default metrics and histograms are sent to
// port 2878 and spans are sent to port 30001.
// port 2878 and traces are sent to port 30001.
sender, err := wavefront.NewSender("http://localhost")

// To use non-default ports, specify the metric/histogram port in the url,
// and set the port for traces using the TracesPort Option.
sender, err = wavefront.NewSender("https://localhost:4443",
wavefront.TracesPort(55555))

if err != nil {
// handle error
}
Expand Down

0 comments on commit 150e4f3

Please sign in to comment.