You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be awesome if ot api and sdk could provide manifests with proper OSGi entries, e.g., by using the bnd gradle plugin that calculates them automatically :)
Reacted by Mrtuk1111, Simon Leigh, Pavol Loffay, Bhuvneshwar Kumar, Vinicius Pegorini Arnhold, Mathieu Debove, Christian Schneider, Lorcan Wogan, Łukasz Dywicki, Pascal and 3 more
Could you give input if this is feasible? We also want to include opentelemetry into an OSGi application and would love to have the osgi manifest headers available
@jkwatson I have created a very basic PR that adds OSGi support. It only adds a gradle plugin that automatically sets the correct headers and added the exportcontents manifest so that every package is available for OSGi usage. How can we get this merged :)?
@jkwatson I have created a very basic PR that adds OSGi support. It only adds a gradle plugin that automatically sets the correct headers and added the exportcontents manifest so that every package is available for OSGi usage. How can we get this merged :)?
Hi @royteeuwen . I noticed the PR. We're looking for someone (anyone!) who knows something about OSGi to help review this. Post xz, you can understand how we're a bit cautious about accepting changes to our build process from people who have not been active in the community, with plugins that none of us are familiar with.
Would you be able to attend one of our weekly Java SIG meetings to help us get to know you and feel comfortable with the addition to the build process?
@jkwatson I also added a commit and opened a PR to semcov (open-telemetry/semantic-conventions-java#87) to achieve the same and I'm also working on opening a PR on the libraries. If you would like me to join also feel free reach out.
I also have some other open source projects under my organisation name Orbinson: https://github.com/orbinson
@bdhoine and myself are also hosting a session at a conference, specifically highlighting all capabilities of OpenTelemetry in AEM, which is a platform that is built upon OSGi:
@royteeuwen have you had a chance to test the resulting artifacts from this change? Concerns were expressed offline about whether you need to consider the internal classes as well, since they are used, but not intended for public consumption.
@jkwatson we came to the same conclusions yesterday, that internal isn't really internal to that specific jar 😅
Exposing the api and context jar's as OSGi bundles are the easiest and we already got that working, so I might do it in two phases, one for the consumer of the api's that can use the java agent as configurator, and then another PR for the SDK jars, that have transitive deps like okhttp that also might need a fix. Does that sound OK for you? I will make an integration test for both situations
I am waiting for the release of bnd plugin 7.1.0, this will make it a lot easier to integrate OSGi manifest headers into libraries that use the java ServiceLoader principle. It will auto-detect it and then generate the correct headers instead of having to manually specify them in the wrappers I "handmade" like here:
Ideally we can get rid of the handmade wrappers, by showcasing how it works in OSGi and by having the headers generated in this project. I already have this done in the referenced maven project, but will have to migrate this to gradle and add an integration test in this projects PR
Reacted by Jack Berg, Brian Nitletone, Thomas Sigdestad, Sergey Rymsha and Stefan Bischof
Activity
LWogan commentedon Jul 19, 2022
Added a PR to do this here:
#4627
royteeuwen commentedon Oct 6, 2023
Could you give input if this is feasible? We also want to include opentelemetry into an OSGi application and would love to have the osgi manifest headers available
jkwatson commentedon Oct 11, 2023
None of the maintainers are very familiar with OSGI, so your best bet is a contribution at this point.
solves open-telemetry#768: Add OSGi support by exporting all java pac…
solves open-telemetry#768: Add OSGi support by exporting all java pac…
solves open-telemetry#768: Add OSGi support by exporting all java pac…
royteeuwen commentedon Aug 25, 2024
@jkwatson I have created a very basic PR that adds OSGi support. It only adds a gradle plugin that automatically sets the correct headers and added the exportcontents manifest so that every package is available for OSGi usage. How can we get this merged :)?
jkwatson commentedon Aug 25, 2024
Hi @royteeuwen . I noticed the PR. We're looking for someone (anyone!) who knows something about OSGi to help review this. Post xz, you can understand how we're a bit cautious about accepting changes to our build process from people who have not been active in the community, with plugins that none of us are familiar with.
Would you be able to attend one of our weekly Java SIG meetings to help us get to know you and feel comfortable with the addition to the build process?
bdhoine commentedon Aug 25, 2024
@jkwatson I also added a commit and opened a PR to semcov (open-telemetry/semantic-conventions-java#87) to achieve the same and I'm also working on opening a PR on the libraries. If you would like me to join also feel free reach out.
royteeuwen commentedon Aug 25, 2024
@jkwatson of course! I'm an Apache committer myself (royteeuwen: https://people.apache.org/committer-index.html#R)
I also have some other open source projects under my organisation name Orbinson:
https://github.com/orbinson
@bdhoine and myself are also hosting a session at a conference, specifically highlighting all capabilities of OpenTelemetry in AEM, which is a platform that is built upon OSGi:
https://adapt.to/2024/schedule/observability-in-aemaacs-with-opentelemetry
There are enough other OSGi based platforms that would benefit a lot of having things, I can name some if it is of interest.
Just shout how I can join the Java SIG and I'll join to give an intro of myself and what the PR does
jkwatson commentedon Aug 25, 2024
Meeting info can be found here: https://github.com/open-telemetry/community?tab=readme-ov-file#implementation-sigs
jkwatson commentedon Aug 27, 2024
@royteeuwen have you had a chance to test the resulting artifacts from this change? Concerns were expressed offline about whether you need to consider the
internalclasses as well, since they are used, but not intended for public consumption.royteeuwen commentedon Aug 28, 2024
@jkwatson we came to the same conclusions yesterday, that internal isn't really internal to that specific jar 😅
Exposing the api and context jar's as OSGi bundles are the easiest and we already got that working, so I might do it in two phases, one for the consumer of the api's that can use the java agent as configurator, and then another PR for the SDK jars, that have transitive deps like okhttp that also might need a fix. Does that sound OK for you? I will make an integration test for both situations
brianmituka commentedon Nov 13, 2024
Hi, is there an update on this? I am interested in integrating open-telemetry in an OSGI environment and I came across this thread.
royteeuwen commentedon Nov 14, 2024
I am waiting for the release of bnd plugin 7.1.0, this will make it a lot easier to integrate OSGi manifest headers into libraries that use the java ServiceLoader principle. It will auto-detect it and then generate the correct headers instead of having to manually specify them in the wrappers I "handmade" like here:
https://github.com/orbinson/opentelemetry-osgi-wrappers/blob/main/opentelemetry-java/opentelemetry-exporter-otlp/pom.xml#L39
Ideally we can get rid of the handmade wrappers, by showcasing how it works in OSGi and by having the headers generated in this project. I already have this done in the referenced maven project, but will have to migrate this to gradle and add an integration test in this projects PR
stbischof commentedon Jul 11, 2025
bnd 7.1.0 is released
https://mvnrepository.com/artifact/biz.aQute.bnd/bnd-maven-plugin/7.1.0
if you need some help, just tell me.
there is also the ServiceProvider Annotation, i would recomment to use.
this will also generate the service files and all manifest metatdata for you automatically
On top of that it could automatic calc the module files.
https://bnd.bndtools.org/chapters/330-jpms.html