Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,22 @@ Increment the:
* [SDK] View should not have a unit
[#3552](https://github.com/open-telemetry/opentelemetry-cpp/pull/3552)

* [BUILD] Use -dev versions in main branch
[#3609](https://github.com/open-telemetry/opentelemetry-cpp/pull/3609)

Important changes:

* [CMAKE] Upgrade CMake minimum version to 3.16
[#3599](https://github.com/open-telemetry/opentelemetry-cpp/pull/3599)

* [BUILD] Use -dev versions in main branch
[#3609](https://github.com/open-telemetry/opentelemetry-cpp/pull/3609)
* The version number in the main branch has changed,
to better differentiate with the latest release.
* For example:
* With a latest release 1.22.0, the main branch is 1.23.0-dev
* Upon release of 1.23.0, the main branch becomes 1.24.0-dev

Breaking changes:

* [SDK] View should not have a unit
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20.0")
cmake_policy(SET CMP0117 NEW)
endif()

set(OPENTELEMETRY_VERSION_NUMBER "1.22.0")
set(OPENTELEMETRY_VERSION_SUFFIX "")
set(OPENTELEMETRY_VERSION_NUMBER "1.23.0")
set(OPENTELEMETRY_VERSION_SUFFIX "-dev")
set(OPENTELEMETRY_VERSION
"${OPENTELEMETRY_VERSION_NUMBER}${OPENTELEMETRY_VERSION_SUFFIX}")

Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module(
name = "opentelemetry-cpp",
version = "1.22.0",
version = "1.23.0-dev",
compatibility_level = 0,
repo_name = "io_opentelemetry_cpp",
)
Expand Down
4 changes: 2 additions & 2 deletions api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# define OPENTELEMETRY_ABI_VERSION_NO 1
#endif

#define OPENTELEMETRY_VERSION "1.22.0"
#define OPENTELEMETRY_VERSION "1.23.0-dev"
#define OPENTELEMETRY_VERSION_MAJOR 1
#define OPENTELEMETRY_VERSION_MINOR 22
#define OPENTELEMETRY_VERSION_MINOR 23
#define OPENTELEMETRY_VERSION_PATCH 0

#define OPENTELEMETRY_ABI_VERSION OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_ABI_VERSION_NO)
Expand Down
5 changes: 4 additions & 1 deletion api/test/core/version_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <gtest/gtest.h>
#include <stdio.h>
#include <string.h>
#include <string>

#include "opentelemetry/version.h"
Expand All @@ -14,5 +15,7 @@ TEST(VersionTest, Consistency)
OPENTELEMETRY_VERSION_MINOR, OPENTELEMETRY_VERSION_PATCH);

std::string actual = OPENTELEMETRY_VERSION;
EXPECT_EQ(actual, expected);
/* OPENTELEMETRY_VERSION may contain a -dev suffix */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the exact suffix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -dev convention for main is arbitrary, we can potentially have also -rc, -rfc or anything, so the -dev part can not be hardcoded in the unit test itself.

There is no #define OPENTELEMETRY_VERSION_SUFFIX "-dev" either (and I don't think we should add it), so there is nothing to compare the suffix against to validate the full version string.

This code change in the unit test is sufficient to pass with both "1.23.0" and "1.23.0-dev".

std::string prefix = actual.substr(0, strlen(expected));
EXPECT_EQ(prefix, expected);
}
2 changes: 1 addition & 1 deletion docs/public/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
author = 'OpenTelemetry authors'

# The full version, including alpha/beta/rc tags
release = "1.22.0"
release = "1.23.0-dev"

# Run sphinx on subprojects and copy output
# -----------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions exporters/ostream/test/ostream_log_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ TEST(OstreamLogExporter, DefaultLogRecordToCout)
" severity_text : INVALID\n",
" body : \n",
" resource : \n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
" attributes : \n",
Expand Down Expand Up @@ -199,7 +199,7 @@ TEST(OStreamLogRecordExporter, SimpleLogToCout)
" severity_text : TRACE\n"
" body : Message\n",
" resource : \n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
" attributes : \n",
Expand Down Expand Up @@ -270,7 +270,7 @@ TEST(OStreamLogRecordExporter, LogWithStringAttributesToCerr)
" severity_text : INVALID\n",
" body : \n",
" resource : \n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
" service.name: unknown_service\n",
Expand Down Expand Up @@ -352,7 +352,7 @@ TEST(OStreamLogRecordExporter, LogWithVariantTypesToClog)
" body : \n",
" resource : \n",
" service.name: unknown_service\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
" res1: [1,2,3]\n",
Expand Down Expand Up @@ -425,7 +425,7 @@ TEST(OStreamLogRecordExporter, IntegrationTest)
" severity_text : DEBUG\n",
" body : Hello\n",
" resource : \n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" service.name: unknown_service\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
Expand Down Expand Up @@ -496,7 +496,7 @@ TEST(OStreamLogRecordExporter, IntegrationTestWithEventId)
" severity_text : DEBUG\n",
" body : Hello {key1} {key2}\n",
" resource : \n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_SDK_VERSION + "\n",
" service.name: unknown_service\n",
" telemetry.sdk.name: opentelemetry\n",
" telemetry.sdk.language: cpp\n",
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/opentelemetry/sdk/version/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#define OPENTELEMETRY_SDK_VERSION "1.22.0"
#define OPENTELEMETRY_SDK_VERSION "1.23.0-dev"

#include "opentelemetry/version.h"

Expand Down
12 changes: 6 additions & 6 deletions sdk/src/version/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace sdk
namespace version
{
const int major_version = 1;
const int minor_version = 22;
const int minor_version = 23;
const int patch_version = 0;
const char *pre_release = "NONE";
const char *build_metadata = "NONE";
const char *short_version = "1.22.0";
const char *full_version = "1.22.0-NONE-NONE";
const char *build_date = "Fri Jul 11 08:13:24 PM UTC 2025";
const char *pre_release = "dev";
const char *build_metadata = "none";
const char *short_version = "1.23.0";
const char *full_version = "1.23.0-dev";
const char *build_date = "MAIN BRANCH";
} // namespace version
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Loading