Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

feat!: add metrics #223

Merged
merged 2 commits into from
Nov 5, 2022
Merged

feat!: add metrics #223

merged 2 commits into from
Nov 5, 2022

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Nov 5, 2022

Uses new metrics interface from libp2p/js-libp2p-interfaces#310 to report useful connection metrics.

Similar to #217 but it adds the listening host/port to the metrics name to allow multiple TCP listeners to report metrics separately.

BREAKING CHANGE: requires metrics interface v4

Uses new metrics interface from libp2p/js-libp2p-interfaces#310
to report useful connection metrics.

Similar to #217 but it adds the listening host/port to the metrics
name to allow multiple TCP listeners to report metrics separately.
@achingbrain achingbrain changed the title feat: add metrics feat!: add metrics Nov 5, 2022
@achingbrain achingbrain merged commit c004357 into master Nov 5, 2022
@achingbrain achingbrain deleted the feat/add-metrics branch November 5, 2022 18:12
github-actions bot pushed a commit that referenced this pull request Nov 5, 2022
## [6.0.0](v5.0.2...v6.0.0) (2022-11-05)

### ⚠ BREAKING CHANGES

* requires metrics interface v4

### Features

* add metrics ([#223](#223)) ([c004357](c004357)), closes [#217](#217)
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dapplion
Copy link
Contributor

dapplion commented Nov 11, 2022

@achingbrain Using a variable metric name is a really bad idea this will break dashboards. Metric name should be constant and contain only _ as special character

status: context.metrics.registerMetric(`libp2p_tcp_${addr}_server_status`, {

I don't really see the point for splitting metrics for different ports. Once someone requests that feature we can add a label on the metric per address. But please do not do this now adding extra labels adds cost to metrics at no-one request

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants