Skip to content
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

Add SDK version in format java:v{version} to the sync call #77

Merged
merged 1 commit into from
Sep 8, 2024
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.inngest.springbootdemo;

import com.inngest.InngestHeaderKey;
import com.inngest.Version;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
Expand All @@ -24,7 +25,9 @@ public void shouldReturnSyncPayload() throws Exception {
.andExpect(content().contentType("application/json"))
.andExpect(header().string(InngestHeaderKey.Framework.getValue(), "springboot"))
.andExpect(jsonPath("$.appName").value("spring_test_demo"))
.andExpect(jsonPath("$.framework").value("springboot"))
.andExpect(jsonPath("$.v").value("0.1"))
.andExpect(jsonPath("$.url").value("http://localhost:8080/api/inngest"))
.andExpect(jsonPath("$.sdk").value("inngest-kt"));
.andExpect(jsonPath("$.sdk").value(String.format("java:v%s", Version.Companion.getVersion())));
}
}
6 changes: 3 additions & 3 deletions inngest/src/main/kotlin/com/inngest/Comm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ class CommHandler(
private fun getRegistrationRequestPayload(origin: String): RegistrationRequestPayload =
RegistrationRequestPayload(
appName = config.appId(),
framework = framework.toString(),
sdk = "inngest-kt",
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting, I see the linear thread where you got java from. I feel like JVM or JRE is used in these situations but I can't think of a concrete example we can draw from

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah the runtime could be good too, same I know Sentry has both languages but the platform isn't auto-detected on there.

framework = framework.value,
sdk = "java:v${Version.getVersion()}",
url = getServeUrl(origin),
v = Version.getVersion(),
v = "0.1",
functions = getFunctionConfigs(origin),
)

Expand Down
Loading