-
Notifications
You must be signed in to change notification settings - Fork 625
Open
Description
Steps
- First create a new project in
/dev, something likeio.openiberty.MCP.telemetry - Create a new autofeature, that enables the bundle when both openTelemetry and MCP are enabled.
- In MCP you want to create an new interface, this will have methods that register metrics, start and stop a span, stuff like that.
- In MCP you also want to create an implementation of that interface as an OGSi Component. It does nothing when any method is called.
- In your new bundle you want a second implementation, this one actually does stuff. (OSGi Service Rankings will make this one take priority)
- I would start by creating your auto feature and a really basic dummy metric, just to test it can output anything at all if the autofeature is enabled and safely calls the do-nothing fallback if the autofeature is not
Enabling an Autofeature
Fault Tolerance feature example
- Change the
osgi.identitylines to check for:- MCP feature
- MpTelemetry feature
- Change the
symbolicNameto referenceMCP.MpTelemetry - Change the
kindtobetaornoship - Change the bundle to your new bundle name
-include= ~${workspace}/cnf/resources/bnd/feature.props
symbolicName=io.openliberty.mpFaultTolerance4.1-mpTelemetry2.0
IBM-Provision-Capability: \
osgi.identity; filter:="(&(type=osgi.subsystem.feature)(osgi.identity=io.openliberty.mpFaultTolerance-4.1))", \
osgi.identity; filter:="(&(type=osgi.subsystem.feature)(|(osgi.identity=io.openliberty.mpTelemetry-2.0)(osgi.identity=io.openliberty.mpTelemetry-2.1)))"
IBM-Install-Policy: when-satisfied
-bundles=io.openliberty.microprofile.faulttolerance.telemetry
kind=ga
edition=core
Metadata
Metadata
Assignees
Labels
No labels