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.
This does some minor cleanup. We don't use statsd_namespace so there's no point it having a configuration variable for it. This removes some header material from
antenna/__init__.py
.This adds a markus backend to capture what metrics were emitted during tests. We can compare before-and-after after making fundamental changes like this to how metrics are emitted.
After I landed the
CaptureMetricsUsed
code, I captured the metrics, ran them throughsort
anduniq
and get this:I changed the code to use a metrics client defined in
antenna/libmarkus.py
. In doing that, I had to make changes to a lot of keys. Then I added the host tag.That gives us this list which is the same, but with the addition of the host tag information.
That's not quite what we want. It adds the
host
tag for both AWS and GCP environments. However, I think that'll be ok.Pretty sure we can see the hostname value in Sentry since it gets passed into the sentry init function.
ec2-18-234-116-224.compute-1.amazonaws.com_i-04a52c01b39074c53
ip-172-31-59-195.ec2.internal
If we look at Grafana, we see the values that telegraf is putting in.
ip-172-31-23-117.us-west-2.compute.internal
ip-172-31-12-209.us-west-2.compute.internal
I implemented the Antenna hostname thing much like we have Tecken:
socket.gethostname()
Given that, I think even though this implementation adds a
host
tag for both AWS and GCP environments, it'll be fine.