-
Notifications
You must be signed in to change notification settings - Fork 791
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 example of creating custom vendor distribution #1621
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice!! Will be great to have people add to this for any additional SPIs that are added.
examples/distro/custom/src/main/java/io/opentelemetry/demo/DemoIdGenerator.java
Outdated
Show resolved
Hide resolved
examples/distro/custom/src/main/java/io/opentelemetry/demo/DemoSampler.java
Outdated
Show resolved
Hide resolved
examples/distro/custom/src/main/java/io/opentelemetry/demo/DemoTracerCustomizer.java
Outdated
Show resolved
Hide resolved
examples/distro/smoke-tests/src/test/java/com/splunk/opentelemetry/SmokeTest.java
Outdated
Show resolved
Hide resolved
examples/distro/smoke-tests/src/test/java/com/splunk/opentelemetry/SpringBootSmokeTest.java
Outdated
Show resolved
Hide resolved
import org.testcontainers.containers.wait.strategy.Wait; | ||
import org.testcontainers.utility.MountableFile; | ||
|
||
abstract class SmokeTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we publish artifact with our SmokeTest
and reuse this and OkHttpUtils
? (not in this PR)
examples/distro/custom/src/main/java/io/opentelemetry/demo/DemoIdGenerator.java
Outdated
Show resolved
Hide resolved
examples/distro/custom/src/main/java/io/opentelemetry/demo/DemoIdGenerator.java
Outdated
Show resolved
Hide resolved
examples/distro/smoke-tests/src/test/java/com/splunk/opentelemetry/OkHttpUtils.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
a couple of suggestions for this example if we want to advertise it as a supported way of creating custom build:
|
Why is this important? |
Also, @pavolloffay, what do you think about addressing your points in future PRs? At least we cannot do proper muzzle support without #1225, IMO |
It's important from the testing perspective, I think users would like to unit test instrumentations like we do right now.
We should at leat document this in the example readme and point to the issue. |
Unit tests for instrumentations are certainly important. I am wondering why "a separate instrumentation module" is important |
In case you want to have multiple instrumentations and test them in isolation? There might be multiple ways to do it, but following the core repo might be good as well. |
Would you see additions like |
Yes that would be great 👍 |
I think we'll want this once we have muzzle added to the example, since muzzle needs each instrumentation in its own module, so makes sense to me to break it out now, but also happy to merge this PR as-is so that others can start contributing to this effort |
@pavolloffay example of unit-testing should come in a follow-up, as it depends on #1644 |
|
||
Response response = client.newCall(request).execute(); | ||
System.out.println(response.headers().toString()); | ||
|
||
Collection<ExportTraceServiceRequest> traces = waitForTraces(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding // given // when // then
comments?
it could be a challenge for users (for me as well :) to translate gradle scripts to maven. |
I highly recommend using gradle for custom vendor distributions, at least until we have a brave contributor who documents the equivalent setup for maven. (and I ❤️ maven) |
I am also not sure how our gradle plugins (muzzle, bytecode instrumentation) would work in maven. It wouldn't probably. |
I propose to merge this as a "good enough for now" and to continue improving these examples in the follow-ups |
agree, this is awesome 👍 |
No description provided.