Skip to content

add version.gradle.kts #1122

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ezhang6811
Copy link
Contributor

@ezhang6811 ezhang6811 commented Jul 29, 2025

Issue #, if available:

Description of changes:
(copied from #1121)
The current version for ADOT SDK and Lambda Layer releases is only provided manually in the release workflow and auto-generated by the nebula release plugin based on previous tags, but never specified in the code. Adding a version file will provide explicit version management and make it easier to track upcoming releases. adotVersion is currently set to 2.11.1-dev0, following the convention used by our other ADOT projects (Python, .NET, NodeJS).

The ADOT Lambda layer was previously given a version name after the upstream OpenTelemetry instrumentation. For example, for the most recent 2.11.1 release -- which still depends on OpenTelemetry Java Instrumentation 2.11.0 -- logs the following upon startup:

INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.11.0-adot-lambda1-aws

This change has the Lambda layer's Otel agent consume the version provided in version.gradle.kts. For example, after building locally, the layer will now log:

INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.11.1-dev0-adot-lambda1-aws

which is the accurate version.

Soon we will add pre-release and post-release workflows like the other language ADOT repos to automatically bump the version number. This is part of our work to align the release process for all 4 languages and streamline releases for future engineers.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ezhang6811 ezhang6811 requested a review from a team as a code owner July 29, 2025 22:39
@srprash
Copy link
Contributor

srprash commented Jul 30, 2025

We have a version file here: https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/.github/patches/versions

I believe it is currently used in building the lambda layer. Do we need to do something about that?

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.70%. Comparing base (09e6487) to head (5abb6d8).
⚠️ Report is 456 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1122       +/-   ##
=============================================
- Coverage     85.71%   52.70%   -33.01%     
- Complexity       19      416      +397     
=============================================
  Files             3       53       +50     
  Lines            49     2584     +2535     
  Branches          5      348      +343     
=============================================
+ Hits             42     1362     +1320     
- Misses            3     1131     +1128     
- Partials          4       91       +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants