forked from stripe/smokescreen
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STORY-25143 - Add prometheus metrics to smokescreen #1
Open
jmcconnell26
wants to merge
13
commits into
master
Choose a base branch
from
feature/STORY-25143-AddPrometheusMetricsToSmokescreen
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ad6735c
STORY-25143 - Add prometheus metrics to smokescreen
jmcconnell26 fd1048a
STORY-25143 - Cleanup
jmcconnell26 904e079
STORY-25143 - Fix tests to compare new metric labels
jmcconnell26 ed9fb19
STORY-25143 - Host prometheus endpoint on separate port
jmcconnell26 7aabe5e
STORY-25143 - Use value provided via command line flag
jmcconnell26 cda3fec
STORY-25143 - Add prometheus timing metrics
jmcconnell26 3f4e182
STORY-25143 - Fix nil map assignment and prometheus metric name sanit…
jmcconnell26 56d4547
STORY-25143 - Cleanup comments
jmcconnell26 e1c7ca9
STORY-25143 - Remove some repetition + add further unit testing
jmcconnell26 aca8718
STORY-25143 - Document new prometheus features in README + add port f…
jmcconnell26 2ed11fb
STORY-25143 - Make PR requested changes:
jmcconnell26 c3379be
STORY-25143 - Rename only one receiver
jmcconnell26 940217d
STORY-25143 - Add new `--expose-prometheus-metrics` flag to CLI to to…
jmcconnell26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
module github.com/stripe/smokescreen | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/DataDog/datadog-go v4.5.1+incompatible | ||
github.com/armon/go-proxyproto v0.0.0-20170620220930-48572f11356f | ||
github.com/carlmjohnson/versioninfo v0.22.4 | ||
github.com/hashicorp/go-cleanhttp v0.0.0-20171218145408-d5fe4b57a186 | ||
github.com/patrickmn/go-cache v2.1.0+incompatible | ||
github.com/prometheus/client_golang v1.13.0 | ||
github.com/rs/xid v1.2.1 | ||
github.com/sirupsen/logrus v1.7.0 | ||
github.com/stretchr/testify v1.8.0 | ||
github.com/stripe/goproxy v0.0.0-20220308202309-3f1dfba6d1a4 | ||
golang.org/x/net v0.0.0-20220812174116-3211cb980234 | ||
gopkg.in/urfave/cli.v1 v1.20.0 | ||
gopkg.in/yaml.v2 v2.2.8 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/Microsoft/go-winio v0.4.17 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/prometheus/common v0.37.0 // indirect | ||
github.com/prometheus/procfs v0.8.0 // indirect | ||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
google.golang.org/protobuf v1.28.1 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is just how my brain works with cli args but can we default this to /metrics and add an additional flag to the effect of
metric-type
where you would choose statsd and/or prometheus and then ride the defaults if needed?As of now the default is always shipping statsd metrics. Might want to provide a toggle to flip those off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alex-kalinowski, I've pushed a change to add the
--expose-prometheus-metrics
flag to toggle exposing prometheus metrics.Currently the default isn't shipping statsd metrics? A default flag is set for
statsd-address
, but unless the flag is explicitly passed in,IsSet("statsd-address")
will return false, and theSetupStatsd()
method won't be called.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed IsSet() returned true for defaults as well.