Skip to content
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

Enable multi instances metrics #108

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jansouza
Copy link

  • Use python:3.10-slim
  • Include Packet Loss metric (speedtest_packet_loss)
  • Remove speedtest_server_id metric and Add server_id to the metric label
  • Use logging for debug/info (SPEEDTEST_LOG_LEVEL)
  • Add /health

@MiguelNdeCarvalho
Copy link
Owner

Hey

@jansouza really thanks for your contribution, whenever I can I will take a look on that!

Thanks,
MiguelNdeCarvalho

Copy link
Owner

@MiguelNdeCarvalho MiguelNdeCarvalho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey.

@jansouza really thanks for you PR. I have made some comments in things that I think that should be changed. Sorry for the delay.

Thanks,
MiguelNdeCarvalho

Dockerfile Outdated
@@ -1,29 +1,30 @@
FROM python:3.10.1-alpine3.15
FROM python:3.10-slim as build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to change the base image?


WORKDIR /app
RUN python -m venv /app/venv

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific way to use a venv inside the container?

#!/bin/bash
set -e

docker build -t speedtest-img .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this build.sh as all builds are done by CI

@@ -0,0 +1,8 @@
#!/bin/bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this destroy.sh script too?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since hes not using docker-compose. hes building with "build.sh" and destroying with "destroy.sh"

  • stop both servers
  • remove both containers
  • remove the image

@@ -0,0 +1,5 @@
[flake8]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason for ignoring this?

@app.route("/")
def mainPage():
return ("<h1>Welcome to Speedtest-Exporter.</h1>" +
"Click <a href='/metrics'>here</a> to see metrics.")
"Click <a href='/metrics'>here</a> to see metrics.<br>" +
"Click <a href='/health'>here</a> to see healthy.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to add the /health path here in my opinion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants