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

Implement Metrics in EDC and IdentityHub #1732

Open
ma3u opened this issue Jan 8, 2025 · 0 comments
Open

Implement Metrics in EDC and IdentityHub #1732

ma3u opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request triage all new issues awaiting classification

Comments

@ma3u
Copy link

ma3u commented Jan 8, 2025

WHAT

The EDC owner need to define the main KPIs to measure the Data Exchange:

  1. Number of offered Assets in the catalog
  2. Number of contracts per month
  3. Unique connections between two BPN
  4. Amount of File transfers (incoming, outgoing)

WHY

Data Providers want to create Dashboards to track and audit the data negotiations and data transfers.

Positive and negative activities of the Dataspace Protocol describe catalog, contract negotation, transfer process.

HOW

In the EDC documentation the recommendation is to working with Asynchronous Messaging and Events via cloud event data specification.

Following Event implementation exists:

  1. AssetEvent - create an Asset
  2. ContractDefinitionEvent - create a contract definition
  3. SecretEvent - create a secret
  4. PolicyDefintionEvent - create a policy definition
  5. ContractNegotiationEvent - create contract negotiation
  6. TransferProcessEvent - start the transfer process

We want to store the relevant events as time series data (history data) in the log storage like Prometheus as persist activity log events and visualize this data in dashboard with Grafana.

To implement this feature we need to write a monitor service that subscribe the required events from the EventRouter. The example PolicyMonitorExtension shows how this can implemented. Following scopes we can subscribe the events:

  • TransferProcessPolicyContext.TRANSFER_SCOPE
  • ContractNegotiationPolicyContext.NEGOTIATION_SCOPE
  • CatalogPolicyContext.CATALOG_SCOPE

Image

The PrometheusMonitorServiceExtension need to inject the EventRouter:

    @Inject
    private EventRouter eventRouter;

And provide a subscriber that implements EventSubscriber like StartMonitoring.java

Next activities

Other resources

There are two architectural decision records for the eventing framework with more technical details:

The Open Telemetry example on Micrometer/Jaeger scape the requests and response of the EDC endpoints only. This example provides traceability and observability information.

Context

Part of the Catena-X NEXT TAP7.2 discussion

@ma3u ma3u added enhancement New feature or request triage all new issues awaiting classification labels Jan 8, 2025
@github-project-automation github-project-automation bot moved this to Open in EDC Board Jan 8, 2025
@ma3u ma3u changed the title Implement Metrics in EDC Implement Metrics in EDC and IdentityHub Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage all new issues awaiting classification
Projects
Status: Open
Development

No branches or pull requests

2 participants