1.2.2 • Published 2 years ago

@affinidi/affinity-metrics-lib v1.2.2

Weekly downloads
1,015
License
ISC
Repository
gitlab
Last release
2 years ago

Affinidi Metrics Client (PUBLIC)

For security reasons we hash a link before sending it over the network. In a most cases link should be any relevant id that could help with a tracking. :caution: Strongly avoid passing any ppi or sensitive data in a subcategory fields.

Usage

import { metrics, EventName, EventCategory, EventComponent} from '@affinidi/affinity-metrics-lib'

const event = {
  link:        'any_relevant_unique_id_will_be_hashed',
  name:        EventName.DID_CREATED,
  category:    EventCategory.DID,
  subCategory: 'registry',
  component:   EventComponent.AffinidiRegistry,
}

metrics.send(event, apiKeyHash, metricsUrl)

Parameters

EventName, EventComponent, and EventCategory are predefined library level enums, in case you need to add a new component or category do it via PR. Try to keep the category as generic as possible.

Setup Integration Tests

Test API key hash should be added to the top level .env file. Reach out to a team member for instructions on how to set up this file, or to obtain a copy.

Events

Metrics EventDescription (When Does It Happen)Note
USER_ONBOARDEDA developer has signed up for an API key.https://affinity-onboarding-frontend.dev.affinity-project.org/
DID_CREATEDA DID has been created.
DID_UPDATEDA DID has been updated.
VC_VERIFIEDA VC has been verified.VC holder as the link.
VC_VERIFIED_PER_PARTYA VC has been verified.VC verifier as the link.
VC_SAVEDA VC has been stored in a wallet.VC ID as the link and issuer ID as the secondary link.
VC_SIGNEDA VC has been signed.VC holder as the link.
VC_REVOKEDA VC has been revoked.Issuer DID as the link.
VC_ISSUE_INITIATEDA VC issue has been initiated.VC ID as the link and issuer ID as the secondary link.
SHARED_MESSAGE_CREATEDA VC has been shared as shared message.VC ID as the link and issuer ID as the secondary link.
VP_VERIFIEDA VP has been verified.VP holder as the link.
VP_SIGNEDA VP has been signed.VP holder as the link and VP ID as the secondary link.
VP_VERIFIED_JWTA VP has been verified in JWT format.VP holder as the link.
VP_SIGNED_JWTA VP has been signed in JWT format.VP holder as the link and VP ID as the secondary link.
1.2.2

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.0

3 years ago

0.1.0

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago