Skip to content

Commit 1189c3c

Browse files
authored
Fix Minor Issues with OTel Blogs & Document Yarn Setup Step (#2191)
* docs: add yarn setup step to readme * fix: address minor issues in otel logs blog * fix: fix typo and logical error in comment * chore: move collector video at the end of collector section * fix: remove formatting changes * fix: remove auto-commit formatting changes * fix: python indentation in example
1 parent 83fb0d8 commit 1189c3c

File tree

3 files changed

+30
-34
lines changed

3 files changed

+30
-34
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,40 @@
1414
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
1515
```
1616

17-
2. Install and use the correct Node.js version by running the following commands in the project directory:
17+
2. Install Yarn if you haven't already:
18+
19+
```bash
20+
npm install -g yarn
21+
```
22+
23+
3. Install and use the correct Node.js version by running the following commands in the project directory:
1824

1925
```bash
2026
nvm install
2127
nvm use
2228
```
2329

24-
3. Install dependencies:
30+
4. Install dependencies:
2531

2632
```bash
2733
yarn install
2834
```
2935

30-
4. Build the project to ensure there are no errors:
36+
5. Build the project to ensure there are no errors:
3137

3238
```bash
3339
yarn build
3440
```
3541

3642
This will create a `build` directory with the production build of the website. Check the output for any errors.
3743

38-
5. Start the development server:
44+
6. Start the development server:
3945

4046
```bash
4147
yarn dev
4248
```
4349

44-
6. Open your browser and navigate to `http://localhost:3000` to view the website locally.
50+
7. Open your browser and navigate to `http://localhost:3000` to view the website locally.
4551

4652
### Git Hooks
4753

data/blog/opentelemetry-collector-complete-guide.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ This guide will provide a comprehensive overview of the OpenTelemetry Collector,
2525

2626
<a href="https://opentelemetry.io/" rel="noopener noreferrer">OpenTelemetry</a> is an open-source observability framework, incubated by the Cloud Native Computing Foundation (<a href="https://www.cncf.io/" rel="noopener noreferrer">CNCF</a>), that standardizes how telemetry data (logs, metrics, traces) is generated and collected. After instrumenting your applications with OpenTelemetry SDKs, the Collector is the next critical piece for managing that data.
2727

28-
Check out the video for a quick walkthrough of OpenTelemetry Collector.
29-
30-
<YouTube id="KFesgjzK3gk" mute={false}/>
31-
3228
## What is the OpenTelemetry Collector?
3329

3430
In very simple words, the collector is an agent that sits between your instrumented services, collects the telemetry data that is emitted by the services, processes it and sends it to an observability backend.
@@ -39,6 +35,10 @@ The below animation shows the flow of data through the collector. You can try th
3935

4036
Apart from acting as a buffer, the collector also acts as a *translation layer;* it supports the native OpenTelemetry Protocol [OTLP] for ingesting data, but can also accept other formats [like Jaeger trace data or [Prometheus metrics](https://signoz.io/guides/what-are-the-4-types-of-metrics-in-prometheus/)] and translate them on the fly.
4137

38+
Check out the video for a quick walkthrough of OpenTelemetry Collector.
39+
40+
<YouTube id="KFesgjzK3gk" mute={false}/>
41+
4242
## Why Use an OpenTelemetry Collector?
4343

4444
Using a Collector is a best practice for several key reasons:
@@ -263,4 +263,4 @@ With SigNoz, you can visualize all your logs, metrics, and traces in a single pa
263263

264264
**[OpenTelemetry Logs - A Complete Introduction & Implementation](https://signoz.io/blog/opentelemetry-logs/)**<br />
265265

266-
**[Monitor Nodejs Application with OpenTelemetry and SigNoz](https://signoz.io/opentelemetry/nodejs/)**<br />
266+
**[Monitor Nodejs Application with OpenTelemetry and SigNoz](https://signoz.io/opentelemetry/nodejs/)**<br />

data/blog/opentelemetry-logs.mdx

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ keywords: [opentelemetry logs,opentelemetry log,opentelemetry,logs correlation,o
1111
---
1212
OpenTelemetry is a Cloud Native Computing Foundation(<a href = "https://www.cncf.io/" rel="noopener noreferrer nofollow" target="_blank" >CNCF</a>) incubating project aimed at standardizing the way we instrument applications for generating telemetry data(logs, metrics, and traces). OpenTelemetry aims to provide a vendor-agnostic observability framework that provides a set of tools, APIs, and SDKs to instrument applications.
1313

14-
15-
1614
![Cover Image](/img/blog/2023/10/otel-logs-cover.webp)
1715

1816
Modern-day software systems are built with many pre-built components taken from the open source ecosystem like web frameworks, databases, HTTP clients, etc. Instrumenting such a software system in-house can pose a huge challenge. And using vendor-specific instrumentation agents can create a dependency. OpenTelemetry provides an open source instrumentation layer that can instrument various technologies like open source libraries, programming languages, databases, etc.
@@ -39,10 +37,9 @@ OpenTelemetry provides instrumentation libraries for your application. The devel
3937

4038
<figure data-zoomable align='center'>
4139
<img src="/img/blog/2022/09/opentelemetry_architecture.webp" alt="OpenTelemetry Architecture"/>
42-
<figcaption><i>How OpenTelemetry fits in an application architecture. OTel collector refers to OpenTelemetry Collector</i></figcaption>
40+
<figcaption><i>How OpenTelemetry fits in an application architecture. OTel is the convenient short form for OpenTelemetry</i></figcaption>
4341
</figure>
4442

45-
4643
OpenTelemetry libraries can be used to generate logs, metrics, and traces. You can then collect these signals with OpenTelemetry Collector or send them to an observability backend of your choice. In this article, we will focus on [OpenTelemetry logs](https://signoz.io/comparisons/opentelemetry-events-vs-logs/). OpenTelemetry can be used to collect log data and process it. Let's explore OpenTelemetry logs further.
4744

4845
[![Get Started - Free CTA](/img/blog/2024/01/opentelemetry-collector-try-signoz-cloud-cta.webp)](https://signoz.io/teams/)
@@ -220,7 +217,7 @@ In OpenTelemetry, there are two important context IDs for context propagation.
220217
A trace is a complete breakdown of a transaction as it travels through different components of a distributed system. Each trace gets a [trace ID](https://signoz.io/comparisons/opentelemetry-trace-id-vs-span-id/) that helps to correlate all events connected with a single trace.
221218

222219
- **Span IDs**<br></br>
223-
A trace consists of multiple spans. Each span represents a single unit of logical work in the trace data. Spans have span ids that are used to represent the parent-child relationship.
220+
A trace consists of multiple spans. Each span represents a single unit of logical work in the trace data. Spans have span IDs that are used to represent the parent-child relationship.
224221
<figure data-zoomable align='center'>
225222
<img src="/img/blog/2025/09/otel-spans.webp" alt="Traces in SigNoz"/>
226223
<figcaption><i>A trace graph broken down into individual spans visualized as Flamegraphs and Gantt charts in SigNoz dashboard</i></figcaption>
@@ -269,17 +266,16 @@ from its SDK.
269266
Here's an example of using OpenTelemetry's [LoggingInstrumentor](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/logging/logging.html) to instrument the logging library to automatically add trace context in a Python application.
270267

271268
```python
272-
273-
import logging
274-
from opentelemetry.instrumentation.logging import LoggingInstrumentor
275-
276-
# Instrument the logging library to automatically add trace context
277-
LoggingInstrumentor().instrument(set_logging_format=True)
278-
279-
# Now, any log created within an active trace will automatically
280-
# include trace_id and span_id in its record.
281-
logging.basicConfig(level=logging.INFO)
282-
logging.info("User login successful.")
269+
import logging
270+
from opentelemetry.instrumentation.logging import LoggingInstrumentor
271+
272+
# Instrument the logging library to automatically add trace context
273+
LoggingInstrumentor().instrument(set_logging_format=True)
274+
275+
# Now, any log created within an active trace will automatically
276+
# include trace_id and span_id in its record.
277+
logging.basicConfig(level=logging.INFO)
278+
logging.info("User login successful.")
283279
```
284280

285281
**Example 2. Instrumenting in Java with a Log Appender**
@@ -311,16 +307,12 @@ application's source code as shown in the below example.
311307
</Root>
312308
</Loggers>
313309
</Configuration>
314-
315310
```
316311

317312
As you can see, while the mechanism differs by language ecosystem (Handlers in Python, Appenders in Java), the
318313
underlying idea is the same, i.e, integrate the OpenTelemetry SDK with your existing logging framework to automatically enrich
319314
all your logs with invaluable trace context.
320315

321-
322-
323-
324316
### Collecting third-party application log data
325317

326318
Logs emitted by third-party applications running on the system are known as third-party application logs. The logs are typically written to stdout, files, or other specialized mediums.
@@ -430,7 +422,7 @@ how you can perform log analytics. The logs tab in SigNoz has advanced features
430422

431423
Your key step in any investigation during an escalation is to find the right logs. Instead of manually searching through tons of logs,
432424
you can use a query builder to filter logs based on any field in the OpenTelemetry log data model.
433-
We recently made some improvements to the query builder to make it more, you can read more about it [here](https://signoz.io/blog/query-builder-v5/).
425+
We have recently overhauled the Query Builder, you can read more about it [here](https://signoz.io/blog/query-builder-v5/).
434426

435427
For example, you can quickly find all logs with `SeverityText = ERROR` from your web-backend service that occurred in
436428
the last hour as shown in the below screenshot.
@@ -468,8 +460,6 @@ In SigNoz, the `TraceId` in a log record is a clickable link. Meaning, when you
468460
<figcaption><i>Correlating Logs with Traces in SigNoz</i></figcaption>
469461
</figure>
470462

471-
472-
473463
## Getting started with SigNoz
474464

475465
<GetStartedSigNoz />
@@ -489,4 +479,4 @@ To get started with OpenTelemetry logs, install SigNoz and start experimenting b
489479

490480
- [OpenTelemetry Collector - complete guide](https://signoz.io/blog/opentelemetry-collector-complete-guide/)
491481

492-
- [Log Monitoring 101 Detailed Guide](https://signoz.io/blog/log-monitoring/)
482+
- [Log Monitoring 101 Detailed Guide](https://signoz.io/blog/log-monitoring/)

0 commit comments

Comments
 (0)