Skip to content

Commit

Permalink
Release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasper committed Apr 25, 2022
1 parent e9b1fd6 commit 1f5a240
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.7.0] - 2022-04-25

### Added
- OptionsBuilder API for more flexibly specifying client options - https://github.com/mcasper/dogstatsd-rs/pull/35
- Ability to provide default tags that should be sent with all events - https://github.com/mcasper/dogstatsd-rs/pull/34

## [0.6.2] - 2021-01-26

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dogstatsd"
version = "0.6.2"
version = "0.7.0"
authors = ["Matt Casper <matthewvcasper@gmail.com>"]
license = "MIT"
description = "A DogstatsD client for Rust."
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ let default_options = Options::default();
let default_client = Client::new(default_options).unwrap();

// Binds to 127.0.0.1:9000 for transmitting and sends to 10.1.2.3:8125, with a
// namespace of "analytics", and a default tag of "region:west".
let custom_options = Options::new("127.0.0.1:9000", "10.1.2.3:8125", "analytics", "region:west");
// namespace of "analytics".
let custom_options = Options::new("127.0.0.1:9000", "10.1.2.3:8125", "analytics", vec!(String::new()));
let custom_client = Client::new(custom_options).unwrap();

// You can also use the OptionsBuilder API to avoid needing to specify every option.
let built_options = OptionsBuilder::new().from_addr(String::from("127.0.0.1:9001")).build();
let built_client = Client::new(built_options).unwrap();
```

Start sending metrics:
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! Build an options struct and create a client:
//!
//! ```
//! use dogstatsd::{Client, Options};
//! use dogstatsd::{Client, Options, OptionsBuilder};
//!
//! // Binds to a udp socket on an available ephemeral port on 127.0.0.1 for
//! // transmitting, and sends to 127.0.0.1:8125, the default dogstatsd
Expand All @@ -21,6 +21,10 @@
//! // namespace of "analytics".
//! let custom_options = Options::new("127.0.0.1:9000", "10.1.2.3:8125", "analytics", vec!(String::new()));
//! let custom_client = Client::new(custom_options).unwrap();
//!
//! // You can also use the OptionsBuilder API to avoid needing to specify every option.
//! let built_options = OptionsBuilder::new().from_addr(String::from("127.0.0.1:9001")).build();
//! let built_client = Client::new(built_options).unwrap();
//! ```
//!
//! Start sending metrics:
Expand Down

0 comments on commit 1f5a240

Please sign in to comment.