Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
valamidev committed Oct 7, 2023
1 parent 5d37e5b commit 95cde75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm i grafana-cloud-graphite
To use this package, first import the GraphiteMetrics class:

```javascript
import { GraphiteMetrics } from "graphite-metrics-handler";
import { GraphiteMetrics } from "grafana-cloud-graphite";
```

Then, create a new instance of the class with your Graphite server options:
Expand All @@ -34,14 +34,14 @@ Then, create a new instance of the class with your Graphite server options:
const Metrics = new GraphiteMetrics({
userId: "5435231", // Grafana Graphite UserId
token: "glc_kyupkp...", // Grafana Access Token
ingestEndpointURL: "https://something.grafana.net/graphite/metrics",
ingestEndpointURL: "https://something.grafana.net/graphite/metrics",
namespace: "e2e",
});

// Handle/Listen Metrics error
Metrics.on("error", (err) => {
console.error(err);
});
Metrics.on("error", (err) => {
console.error(err);
});
```

You can then register counters and interval metrics with the `registerCounter` method:
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "grafana-cloud-graphite",
"version": "0.2.1",
"version": "0.2.3",
"description": "NodeJS client for Grafana Cloud Graphite API",
"repository": {
"type": "git",
"url": "git+https://github.com/valamidev/grafana-cloud-graphite.git"
},
"homepage": "https://github.com/valamidev/grafana-cloud-graphite#readme",
"main": "dist/src/index.js",
"engines": {
"node": ">=16"
Expand Down

0 comments on commit 95cde75

Please sign in to comment.