Skip to content

Conversation

@andy-radchenko
Copy link
Contributor

@andy-radchenko andy-radchenko commented Jun 10, 2025

Generated sdk-project.properties, which is included within sdk jar, for many sdks contains unextended project variables.
Screenshot 2025-06-12 at 9 53 22 AM

When one uses sdk, by default properties taken from sdk-project.properties are used to generate User-agent header which leads to user-agent header looking like this in our apigateway log:
2025-06-10 11:15:47:682 +0000 - [INFO] [http-nio-8443-exec-431] (RequestSummaryFilter.java:run:159) rid=002a673a-966e-4ec6-a0de-442b8c7e52fa#tqdm [MAINLOG] Request finished, status_code=200, service_id=JOBS-SERVICE, total_time=36, auth_filter_time=29, user=service+email-notifications@smartling.com, method=POST, url="https://api.smartling.com/jobs-admin-api/v3/projects/f67df5d74/find-jobs-by-content", service_uri="/jobs-admin-api/v3/projects/f67df5d74/find-jobs-by-content", auth_source=header, user_agent="${project.artifactId}-java/${project.version}", exception_happened=false, service_origin="email-notifications-service", projectId=f67df5d74

The way to fix it is substitute project.artifactId and project.version variables in sdk-project.properties when this file is copied into the jar file during build process. So in the end we would have correct sdk-project.properties file inside sdk's jar:
Screenshot 2025-06-12 at 10 01 30 AM

To do this we need to use filtering when we copy resources into jar.
https://smartling.atlassian.net/browse/TCM-5747

Copy link
Contributor

@dsavchenko-sm dsavchenko-sm left a comment

Choose a reason for hiding this comment

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

👍

@andy-radchenko andy-radchenko merged commit 7edbc45 into master Jun 12, 2025
2 checks passed
@andy-radchenko andy-radchenko deleted the TCM-5747-fix-user-agents branch June 12, 2025 12:01
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.

9 participants