Author: Editorial Team
-
Equals and clear method with a Protobuf object
In this tutorial, we will explore how a Protocol Buffers (Protobuf) generated Person object behaves in Java, especially in terms of: 1. Reusing the Existing Person Class Assume you already generated a Person class from a .proto file and created a helper method to build a person object. For example: Moving creation logic into a…
-
Generating Separate Java Classes from Protobuf Messages with java_multiple_files
1. Introduction When working with Protobuf in Java projects, one common surprise is the “outer class” that Protobuf generates around your messages. Many developers expect to access their message types directly, but instead they find themselves navigating through a wrapper class. This tutorial explains: We will build a clear mental model so you understand what…
-
Organizing Protobuf Files with package
1. Introduction When your project grows and you start adding multiple .proto files, especially copies or variations of similar messages, simple folder organization is not enough. Protobuf (protoc) does not treat directories the same way Java developers do. Instead, it relies on explicit package definitions and Java generation options to avoid naming conflicts. 2. The…
-
Setting Up the Protobuf Playground Project
1. Creating the Maven Project You can use any IDE you like, but in this tutorial we will assume IntelliJ IDEA. Create a new Maven project with the name: gRPC-playground The word playground is intentional. It reminds us that: Use: Once the project is created, let Maven finish importing and indexing. 2. Installing the Protobuf…
-
Protocol Buffers: Why They Exist and What Problem They Solve
1. Communication in a Microservices World In a modern microservices architecture, we almost never deal with a single standalone application. Instead, the system is composed of many small services, each responsible for a specific piece of functionality, and these services continuously talk to each other in order to handle a single user request. One service…
-
Types of Sampling in OpenTelemetry
1. Why Sampling Exists in the First Place When engineers first learn distributed tracing, the natural instinct is to say, “Let us trace everything, because more data is always better.” In a small development environment this approach works perfectly fine, and in fact it is strongly recommended because it helps you understand how your system…
-
Span Vs Resource Attributes
1. First, the Big Picture In OpenTelemetry, telemetry data (traces, metrics, logs) has three layers of information: Resource attributes describe the identity of the service. Span attributes describe a specific operation. If you confuse these two, your observability data becomes hard to query, hard to aggregate, and semantically wrong. 2. What Is a Resource? (Conceptual…
-
Span parent–child relationships
1. Introduction Before talking about parent and child spans, we must first clearly understand what a span is in OpenTelemetry. A span represents a single unit of work in your system. That unit of work could be: A trace is simply a collection of spans that all belong to the same request or transaction. So,…
-
Project Setup for Opentelemetry
In this tutorial and the examples going forward we’ll use a project setup which is available at path ‘https://github.com/vinsguru/opentelemetry-observability‘. We are using the ‘02-distributed-tracing‘ section in this tutorial. We’ll discuss the various files in the repository. Here is the docker-compose.yaml: The different services here are: Let’s discuss the other config files. opentelemetry-config.properties opentelemetry-config.properties is the…
-
Observability primer
What is Observability? Observability lets you understand a system from the outside by letting you ask questions about that system without knowing its inner workings. Furthermore, it allows you to easily troubleshoot and handle novel problems, that is, “unknown unknowns”. It also helps you answer the question “Why is this happening?” To ask those questions…
