Extraction Plugin specifications

Note

If you use the Java or Python extraction plugin SDK, you don’t have to worry about these specifications. The Java and Python SDKs makes sure your plugin is compiled and packaged conform to the extraction plugin specifications.

This page describes the specifications that define an extraction plugin. The spec contains two major parts: a plugin protocol, and the plugin packaging method.

This specification applies to plugins that are not embedded within Hansken, but to plugins that developed and distributed outside the scope of the Hansken platform development.

Plugin protocol

An extraction plugin is a process that implements a GRPC service ExtractionPluginService. The service defines a protocol that is used to allow communication between Hansken and an extraction plugin. The GRPC and protocol definitions can be found in the extraction plugin source code, under the folder grpc.

Note

The source code of the Extraction Plugin is currently not available outside the scope of the Hansken core development teams. If you are interested in the GRPC definitions, please Contact the Hansken development team.

Packaging

An extraction plugin is packaged as a container image – conform the open container initiative image spec. An extraction plugin can be

The ENTRYPOINT of the container image should be a process that starts a GRPC server that implements the plugin protocol. The GRPC protocol should run on port 8999.

The container image should be labeled with the plugin info. The plugin info returned by the plugin plugin-info call and container labels are required to match. If not, Hansken will not accept your plugin during extractions - as it is unsure if the intended plugin is processing traces.

The labels that are expected are:

  • org.hansken.plugin-id (conform Plugin naming convention)

  • org.hansken.plugin-version

  • org.hansken.plugin-api-version

  • org.hansken.plugin-description

  • org.hansken.plugin-webpage

  • org.hansken.plugin-deferred-iterations (optional, only has a meaning for deferred extraction plugins)

  • org.hansken.plugin-matcher (see HQL-Lite)

  • org.hansken.plugin-license

  • org.hansken.plugin-author-name

  • org.hansken.plugin-author-organisation

  • org.hansken.plugin-author-email

  • org.hansken.plugin-resource-max_cpu (in milicpu, optional)

  • org.hansken.plugin-resource-max_mem (in mbs, optional)