Skip to content

Commit

Permalink
Merge pull request #84 from Netflix/juan/start-stop-readme
Browse files Browse the repository at this point in the history
Adding comments about starting/stopping the Registry at runtime
  • Loading branch information
jivimberg authored May 8, 2024
2 parents 79d2f8b + e695447 commit 7f7e987
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ to spectatord through UDP.
Writers can be configured through `spectator.Config.Location` (`sidecar.output-location` in file based configuration).
Possible values are:

- `none`
- `stdout`
- `stderr`
- `memory`
- `file:///path/to/file`
- `unix:///path/to/socket`
- `udp://host:port`
- `none`: Configures a no-op writer that does nothing. Can be used to disable metrics collection.
- `stdout`: Writes metrics to stdout.
- `stderr`: Writes metrics to stderr.
- `memory`: Writes metrics to memory. Useful for testing.
- `file:///path/to/file`: Writes metrics to a file.
- `unix:///path/to/socket`: Writes metrics to a Unix domain socket.
- `udp://host:port`: Writes metrics to a UDP socket.

Location can also be set through the environment variable `SPECTATOR_OUTPUT_LOCATION`. If both are set, the Config value
takes precedence over the environment variable.
Expand Down Expand Up @@ -163,7 +163,8 @@ Common tags are now automatically added to all Meters. Their values are read fro
- `spectator.Config` has been greatly simplified.
- If you're using file based configuration, `"common_tags"` has been renamed to `"sidecar.common-tags"`.
- `spectator.Registry` no longer has a `Start()` function. It is now automatically started when created.
- `spectator.Registry` no longer has a `Stop()` function. Instead, use `Close()` to close the registry.
- `spectator.Registry` no longer has a `Stop()` function. Instead, use `Close()` to close the registry. Once the
registry is closed, it can't be started again.
- `spectator.Config.IpcTimerRecord` has been removed. Use a `meter.Timer` instead to record Ipc metrics.
- `spectator.MeterFactoryFun` has been removed. If you need to create a custom meter you can do so by wrapping one of
the meters returned by `spectator.Registry`.
Expand All @@ -185,3 +186,5 @@ Common tags are now automatically added to all Meters. Their values are read fro
5. If you use `PercentileDistributionSummary` or `PercentileTimer` you need to update your code to use the respective
functions provided by the Registry to initialize these meters.
6. Remove dependency on Spectator Go Internal configuration library. Such dependency is no longer required.
7. There is no longer an option to start or stop the registry at runtime. If you need to configure a registry that
doesn't emit metrics, you can use the `spectator.Config.Location` option with `none` to configure a no-op writer.

0 comments on commit 7f7e987

Please sign in to comment.