Git Product home page Git Product logo

gettingstarted-am-py's Introduction

Sample Python FastAPI app with Autometrics

This is a sample backend service written in Python with the FastAPI framework with several API handlers that are erroring or responding slowly intended to showcase the Autometrics framework with Service Level Objectives.

Resources

Getting started

To get the sample up and running you can follow these steps:

  1. Clone the repository and install the dependencies
git clone autometrics-dev/gettingstarted-am-py

cd gettingstarted-am-py

pip install -r requirements.txt
  1. Download the Autometrics CLI

If you're on macOS you can use Homebrew:

brew install autometrics-dev/tap/am

or you can grab the binaries directly from the GitHub release.

  1. Start the application
python uvicorn main:app --reload

The application will start on a port 8080 by default and expose a metrics endpoint.

  1. Start the Autometrics CLI and Explorer

Start the Autometrics CLI and point it to the endpoint it can scrape metrics from.

am start :8080

Autometrics CLI will download and run a Prometheus binary under the hood and start scraping metrics.

  1. Preview the metrics in Autometrics Explorer

Autometrics CLI will also start a server with the Explorer available on localhost:6789. You can browse it and start exploring your sample app metrics! (You might need to ping the endpoints a few times to see the data reflected).

That's all!

gettingstarted-am-py's People

Contributors

keturiosakys avatar mies avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.