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

Introduction to Observability #1

Open
JayCesar opened this issue Jul 5, 2024 · 10 comments
Open

Introduction to Observability #1

JayCesar opened this issue Jul 5, 2024 · 10 comments
Labels

Comments

@JayCesar
Copy link
Owner

JayCesar commented Jul 5, 2024

image
image

What is Monitoring

Monitoring is the process of gathering data to understand whats's going inside of your infrastructure

image

What is Observability

Observability is taking the same data that you have collected and moving beyond "What is happening" to "Why is it happening"?

Monitoring is the tip of the iceberg. It means the if I want to see the whole picture, I need both.

image

image
image
image
image

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

What is a Metric?

In a nutshell, it is a number in and a timestamp!

Metric are numerical values that can track anything about your envirorment over time, from latency to error rates to user signups.

image

In practice we need to collect a lot of them! in order to make sense!

image

This peak can indicate an anomaly.

Reasons to collect metrics

  • To get an idea of ​​a normal scenario;
  • To prevent problems before they snowball;
  • Have a proactive attitude (we don’t need to wait until a problem appears)
    image

By using metrics I can spend less money, wake up less for on call, have less fire drills, happier costumers etc.

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

Metric Walk Through

image

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

What is Monitoring?

  • Just because we can alert someone does not mean that we shold alert someone

- Meaning: Monitoring is the act of paying attention to the patterns that your metrics are telling you. It's about analyzing your data and acting on it.

image

What do we Monitor?

- Performance: by watching performance we can match how our architecture and applications are using the resources that are available.

- Security: Is something going wrong in our environment? Creating monitors around security metrics can stop incidentes in their tracks.

- Usage: How application code is actually functioning

image

Whom do we alert?

image

threshold = a point at which something starts

image

- It's important to only alert team members when something actionable needs to be done.

  • Be careful with the alerting strategy
  • If everything is an aemergency, nothing is an emergency

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

Monitoring Walk Through

I can set up the metric from the dashboard:

image

Tip: think the alert as a software

And I can set up an e-mail to it:

image

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

What is a Log?

A log is usually a bukly piece or length of a cut or fallen tree.

image

Just kidding...

A log is a computer generated file that contains information regarding the usage of a system, This gives you insight into the behaviour of the resource.

image

📍It is a file filled with the history of that that computer / application / resource has been doing.

Why do we collect logs?

  • Complicance: just because we have to. Standards that the business is held to might dictate which logs you will need to store and for how long you need to store them. (Following the rules)
  • Insight: Logs can give you insight into application and system performance that metrics by themselves might not be able to provide. It means they are beyond metrics.
  • Security: This is priority for businesses. Logs are needed to demonstrate that only authorized activities are going on inside of a system.

Practical uses for logs

  • Troubleshooting
  • Auditing
  • Monitoring (monitoring the logs) -> Datalog helps with it;
  • By using logs I can add Alerting based on their content
  • Personal History
  • Not getting in trouble (I can prove something by showing the logs)

_Obs: Computer troubleshooting is the process of diagnosing and solving computer errors or technical problems.

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

Storing our Logs

What kind of services generate Logs?

  • Where else did we get Logsfrom?

image

Everything done in cloud is tracked!

How long do we store Logs?

Thre are three guidances:

  • Compliance: Standards taht business is held to might dictate how long your longs need to be stored.
  • Usefulness: Some logs are more helpful than other. It's up to you decide which logs need to be stored for whatever length of time is useful to you.
  • Cost: Store costas money. Dpending on the services you're using you'll want to keep in mind your budget when deciding on storage length. (Measured service?)
    • A good pratice is to ask myself: "is this Log useful? If it is, how long it will be useful for?

How do we consolidate our Logs?

image

Curiosity: (From ChatGPT)
Datadog, a monitoring and analytics platform for cloud applications, is named to evoke the idea of a vigilant, loyal, and reliable guard dog. The name "Datadog" suggests the platform's role in keeping a watchful eye on data, ensuring that systems are running smoothly, and alerting users to any issues. Just as a guard dog is trusted to protect and notify its owner of potential problems, Datadog is designed to provide comprehensive monitoring and alerting for IT infrastructure and applications.

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 5, 2024

Logging Walk Through

image

image

It is important to know that Logs can not always tell me how to fix a possible problem, but they can alert me the problem I need to investigate

By using DataDog I can extract the context from a specific log

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 6, 2024

What is a Trace?

A trace is used to track the time spent by an application processing a request along with the execution path taken.

  • e.g A trace would be both a path to a database along with how long it takes to get there, when a application calls a database.

What is a Span

A Span is the individual unit of work that the code is doing.

  • I can think of span as a portion of the veral trip.

image

Why do we collect Traces?

- Microservices: As businesses migrate away from Monolithic architecture, tracing is needed to figure out what all of the microservices ar up to.

- Optimization: Tracing allows you to optimize the performance of your applications by identifying bottlenecks in the calls being made.

- Troubleshooting: When something goes wrong, we need insight into the actual application code. This can assist us in tracking down errors with the code.

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 6, 2024

Tracing Walk Through

image

Datadog can tie traces, metrics and logs togheter!

@JayCesar
Copy link
Owner Author

JayCesar commented Jul 6, 2024

Summary:

image

image

@JayCesar JayCesar changed the title Datadog: Monitoring vs Obserability Introduction to Observability Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant