Skip to content

Prototype telemetry integration with MCP #33715

@habiblawal1

Description

@habiblawal1

Steps

  1. First create a new project in /dev , something like io.openiberty.MCP.telemetry
  2. Create a new autofeature, that enables the bundle when both openTelemetry and MCP are enabled.
  3. In MCP you want to create an new interface, this will have methods that register metrics, start and stop a span, stuff like that.
  4. In MCP you also want to create an implementation of that interface as an OGSi Component. It does nothing when any method is called.
  5. In your new bundle you want a second implementation, this one actually does stuff. (OSGi Service Rankings will make this one take priority)
  6. 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.identity lines to check for:
    • MCP feature
    • MpTelemetry feature
  • Change the symbolicName to reference MCP.MpTelemetry
  • Change the kind to beta or noship
  • 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions