This lesson is a part of our OpenTelemetry masterclass. If you haven't already, checkout the chapter introduction.

Each lesson in this lab builds on the last one, so make sure you learn about SDK constructors before proceeding with this one.

You use a resource to identify your project’s environment by means of attributes. For example, to describe your host, you can include attributes for your host name and a virtual machine image. To describe your service, you can include a service namespace and a version. To describe your telemetry instrumentation, you can include an SDK name and a version.

The OpenTelemetry specification provides resource semantic conventions, like it does for signals. The one and only required conventional attribute for a resource is You can find the optional conventional attributes in the specification.

Once you’ve created a resource for your environment, you can include it with a constructor. For traces, this means that you attach the resource to your tracer provider. When you create spans, they are associated with your environment’s resource.

Like with the data model and API specifications, some SDK specs are more mature than others. The resource spec, for example, is stable, while the resource semantic conventions are still experimental. View the OpenTelemetry status page for the most up-to-date information on the maturity of SDK specifications.

You’ve learned a lot about OpenTelemetry as a specification. This is the foundation for understanding OpenTelemetry because everything built around it follows the spec. But OpenTelemetry also includes official code repositories that implement the spec in many popular programming languages.


This lesson is a part of our OpenTelemetry masterclass. Continue on to the next lesson: OpenTelemetry implementations.