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 SE8 example #7800

Merged
merged 1 commit into from
Jan 16, 2025
Merged
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
38 changes: 38 additions & 0 deletions modules/reference/pages/feature/mpTelemetry-2.0/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,41 @@ xref:ROOT:class-loader-library-config.adoc#3rd-party[Enable third-party APIs] fo
<classloader apiTypeVisibility="+third-party"/>
</webApplication>
----

=== Use MicroProfile Telemetry 2.0 with Java SE 8

Unlike previous versions of MicroProfile Telemetry, version 2.0 supports Java SE 8 in certain configurations.

MicroProfile Telemetry 2.0 (`mpTelemetry-2.0`) is included in the feature:microProfile-7.0[display=MicroProfile 7.0 umbrella feature] and xref:reference:platform/MicroProfile.adoc[platform], which do not support Java SE 8. However, MicroProfile Telemetry 2.0 is compatible with the following earlier versions of MicroProfile that do support Java SE 8:

- feature:microProfile-5.0[display=MicroProfile 5.0]
- feature:microProfile-4.1[display=MicroProfile 4.1]
- feature:microProfile-1.4[display=MicroProfile 1.4]

Although `mpTelemetry-2.0` is not automatically enabled by these umbrella features, if you independently enable it alongside any of them, the configuration supports Java SE 8.

For example, the following `featureManager` configuration in your `server.xml` file enables `mpTelemetry-2.0` in a Java SE 8 environment:

[source.xml]
----
<featureManager>
<feature>microProfile-5.0</feature>
<feature>mpTelemetry-2.0</feature>
...
</featureManager>
----

Alternatively, if you are using xref:reference:feature/versionless-features.adoc[versionless features], you must likewise independently enable the versioned `mpTelemetry-2.0` feature, along with your chosen platform feature, if you want to use it with Java SE 8. The following example shows the `microProfile-5.0` platform feature and several example versionless features enabled together with `mpTelemetry-2.0`:

[source.xml]
----
<featureManager>
<platform>microProfile-5.0</platform>
<feature>mpTelemetry-2.0</feature>
<feature>mpHealth</feature>
<feature>mpMetrics</feature>
...
</featureManager>
----

In this example, the versionless `mpHealth` and `mpMetrics` features are automatically resolved to compatible versions buy the `microProfile-5.0` platform. The versioned `mpTelemetry-2.0` feature gets the benefit of Java SE 8 support that the platform provides.