
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@myunisoft/loki
Advanced tools
Node.js Grafana API SDK (Loki, Datasources ..)
This package is available in the Node Package Repository and can be easily installed with npm or yarn
$ npm i @myunisoft/loki
# or
$ yarn add @myunisoft/loki
import { GrafanaApi } from "@myunisoft/loki";
import { LogQL, StreamSelector } from "@sigyn/logql";
const api = new GrafanaApi({
authentication: {
type: "bearer",
token: process.env.GRAFANA_API_TOKEN!
},
remoteApiURL: "https://name.loki.com"
});
const ql = new LogQL(
new StreamSelector({ app: "serviceName", env: "production" })
);
const logs = await api.Loki.queryRange(
ql, // or string `{app="serviceName", env="production"}`
{
start: "1d",
limit: 200
}
);
console.log(logs);
You can also provide a Loki pattern to automatically parse logs (and infer the right type with TypeScript)
const logs = await api.Loki.queryRange(
`{app="serviceName", env="production"}`
{
pattern: "<verb> <_> <endpoint>"
}
);
for (const { verb, endpoint } of logs) {
console.log({verb, endpoint });
}
interface GrafanaApiOptions {
/**
* If omitted then no authorization is dispatched to requests
*/
authentication?: ApiCredentialAuthorizationOptions;
/**
* User-agent HTTP header to forward to Grafana/Loki API
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agents
*/
userAgent?: string;
/**
* Remote Grafana root API URL
*/
remoteApiURL: string | URL;
}
type ApiCredentialAuthorizationOptions = {
type: "bearer";
token: string;
} | {
type: "classic";
username: string;
password: string;
} | {
type: "custom";
authorization: string;
};
Thanks goes to these wonderful people (emoji key):
Thomas.G 💻 🛡️ 📖 | PierreDemailly 💻 ⚠️ 📖 |
MIT
FAQs
Node.js Grafana Loki SDK
We found that @myunisoft/loki demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.