Skip to content

Comments

✅ add support for Windows#48

Draft
ryandens wants to merge 15 commits intomainfrom
ryandens/windows-build
Draft

✅ add support for Windows#48
ryandens wants to merge 15 commits intomainfrom
ryandens/windows-build

Conversation

@ryandens
Copy link
Owner

@ryandens ryandens commented Nov 1, 2023

No description provided.

@pixee-ryandens
Copy link

pixee-ryandens bot commented Nov 1, 2023

Nice work! ✅ I analyzed your pull request and don't see any hardening opportunities.

@ryandens ryandens changed the title ✅ add windows to CI ✅ add support for Windows Nov 1, 2023
@ryandens ryandens changed the title ✅ add support for Windows ✅ add support for Windows Nov 1, 2023
@neboskreb
Copy link
Contributor

@ryandens this PR seems a bit stuck. Would you like some assistance? I'd gladly help to move it forward.

@ryandens ryandens force-pushed the ryandens/windows-build branch 2 times, most recently from 31ef87d to b6917f3 Compare December 18, 2025 03:41
@ryandens
Copy link
Owner Author

@neboskreb feel free! i just rebased it with main. I don't have a windows machine accessible, so getting the integration tests to pass on windows is a bit painful.

@neboskreb
Copy link
Contributor

I fixed a couple of very small bugs and it seems to work for me.

@ryandens I'd push my changes if you add me to the collaborators

@neboskreb
Copy link
Contributor

@ryandens I found a way to push my commits without pushing :) Created PR #298 to "push" those 2 commits into this branch - please see and merge.

@neboskreb
Copy link
Contributor

My investigation finds that the test failures in #298 come from IllegalArgumentException thrown from the internals of Java Instrumentation, probably triggered by an error condition inside or around the OpenTelemetryAgent:

Hello from my simple agent!
ERROR io.opentelemetry.javaagent.OpenTelemetryAgent
java.lang.IllegalArgumentException
	at java.instrument/sun.instrument.InstrumentationImpl.appendToClassLoaderSearch0(Native Method)
	at java.instrument/sun.instrument.InstrumentationImpl.appendToBootstrapClassLoaderSearch(InstrumentationImpl.java:276)
	at io.opentelemetry.javaagent.OpenTelemetryAgent.installBootstrapJar(OpenTelemetryAgent.java:98)
	at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:56)
	at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:46)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:544)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:556)

Unfortunately, the exact cause of the exception is not know because OpenTelemetryAgent does not do a best job logging it, showing only the topmost layer and not printing the "caused by" part.

This error occurs only in test configuration, whereas the run configuration completes successfully.

Bumping up the version from 1.11.1 to the newest 1.23.0 brought no relief.

Also, no errors occur in test configuration if a different agent is used, for instance org.mockito:mockito-core:5.21.0 - in this case the test shows no malfunction.

@ryandens This looks to me like an Open Telemetry setup issue on Windows (or my machine?). Unfortunately, I'm not familiar with the framework. If you are, could you give me some hints to what could be wrong?

@ryandens
Copy link
Owner Author

Unfortunately, I also don't know what the issue was here - I also saw test failures in the javaagent-application plugin project, so I don't think this is isolated to the OpenTelemetry instrumentation agent. I could of course be mistaken. Thanks for your work on this issue, it looks like it brought it closer to the finish line.

@ryandens ryandens force-pushed the ryandens/windows-build branch from 264bf47 to 38951ec Compare December 22, 2025 16:54
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