Skip to content

Commit

Permalink
Remove warnings and fix typos in *.md files
Browse files Browse the repository at this point in the history
  • Loading branch information
trein committed Nov 25, 2024
1 parent eadf517 commit f9fb566
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
14 changes: 6 additions & 8 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ To run the JMH benchmark tests:
./gradlew runJmhTests
```

By default, the benchmark test results are writen to `benchmark-tests.txt`.
Use `output` input parameter to configure the output path.
By default, the benchmark test results are written to `benchmark-tests.txt`.
Use the `output` input parameter to configure the output path.
E.g. the following command will run the benchmark tests for `tally-prometheus` sub-project and store
the results to `custom/path/result.txt`.
```bash
./gradlew :tally-prometheus:runJmhTests -Poutput="custom/path/result.txt"
```


By default, the build does *not* compile Thrift files to generate sources. If you make changes to Thrift files and need
regenerate sources, make sure you have thrift 0.9.x installed and build with the `genThrift` property set, e.g.
```bash
Expand All @@ -48,17 +47,16 @@ track [issues](https://help.github.com/articles/about-issues/) and create
If you have not contributed to the project before, please add your details to the `developers`
section in the top-level [build file](build.gradle).

### Encypting for Travis
### Encrypting for Travis
In order to pass secrets to Travis securely for authentication and signing, we need to encrypt them
first before checking in. The full documentation [here](https://docs.travis-ci.com/user/encryption-keys/)
for encrypting keys, and [here](https://docs.travis-ci.com/user/encrypting-files/) for encrypting files.

These are the secrets that need to be passed:
1. [OSSRH](http://central.sonatype.org/pages/ossrh-guide.html) **username** and **password**. These are
the credentials used to upload artifacts to the Sonatype Nexus Repository, which is used to sync to
Maven Central
1. Signing **key ID**, **password**, and **secret key ring file**. These three are used to sign
artifacts that get created, which is a requirement in order to upload to Maven Central.
the credentials used to upload artifacts to the Sonatype Nexus Repository, which is used to sync to Maven Central.
2. Signing **key ID**, **password**, and **secret key ring file**. These three are used to sign artifacts that get
created, which is a requirement in order to upload to Maven Central.

In order to pass these along, first login to Travis:
```bash
Expand Down
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,33 @@ Fast, buffered, hierarchical stats collection in Java. [Go here](https://github.

## Abstract

Tally provides a common interface for emitting metrics, while letting you not worry about the velocity of metrics emission.
Tally provides a common interface for emitting metrics, while letting you not worry about the velocity of metrics
emission.

By default it buffers counters, gauges and histograms at a specified interval but does not buffer timer values. This is primarily so timer values can have all their values sampled if desired and if not they can be sampled as summaries or histograms independently by a reporter.
By default, it buffers counters, gauges and histograms at a specified interval but does not buffer timer values. This is
primarily so timer values can have all their values sampled if desired and if not they can be sampled as summaries or
histograms independently by a reporter.

## Structure

- **Scope**: Keeps track of metrics, and their common metadata.
- **Metrics**: Counters, Gauges, Timers and Histograms.
- **Reporter**: Implemented by you. Accepts aggregated values from the scope. Forwards the aggregated values to your metrics ingestion pipeline.

### Acquire a Scope
### Create a `Scope`

```java
// Implement as you will
StatsReporter reporter = new MyStatsReporter();

Map<String, String> tags = new HashMap<>(2, 1);
tags.put("dc", "east-1");
tags.put("type", "master");
tags.put("type","leader");

Scope scope = new RootScopeBuilder()
.reporter(reporter)
.tags(tags)
.reportEvery(Duration.ofSeconds(1))
.reportEvery(Duration.ofSeconds(1));
```

### Get/Create a metric; use it
Expand All @@ -43,27 +46,29 @@ queueGauge.update(42);

Use one of the inbuilt reporters or implement your own using the `StatsReporter` interface.

## Example Usage
## Usage examples

Run the example by running:
```bash
$ ./gradlew run
```

This runs the `PrintStatsReporterExample` class in the `tally-example` project.

## Artifacts Published
## Artifacts publishing

All artifacts are published under the group `com.uber.m3`.

1. `tally-m3`: The tally M3 reporter
1. `tally-statsd`: The tally StatsD reporter
1. `tally-core`: tally core functionality that includes interfaces and utilities to report metrics to M3
1. `tally-example`: Example usages with different reporters
1. `tally-prometheus`: The tally Prometheus reporter (experimental; see prometheus/README.md)
1. `tally-m3`: The tally M3 reporter.
1. `tally-statsd`: The tally StatsD reporter.
1. `tally-core`: The tally core functionality that includes interfaces and utilities to report metrics to M3.
1. `tally-example`: Usage examples with different reporters.
1. `tally-prometheus`: The tally Prometheus reporter (experimental; see prometheus/README.md).

## Versioning
We follow semantic versioning outlined [here](http://semver.org/spec/v2.0.0.html). In summary,
given a version of MAJOR.MINOR.PATCH (e.g. 1.2.0):

We follow semantic versioning outlined [here](http://semver.org/spec/v2.0.0.html). In summary, given a version of
MAJOR.MINOR.PATCH (e.g. 1.2.0):

- MAJOR version changes are breaking changes to the public API
- MINOR version changes are backwards-compatible changes that include new functionality
Expand Down

0 comments on commit f9fb566

Please sign in to comment.