New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

insomnia-plugin-usage-logger

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insomnia-plugin-usage-logger

An Insomnia plugin for logging request and response details using Resurface. More info at: https://resurface.io

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
232
decreased by-6.45%
Maintainers
1
Weekly downloads
 
Created
Source

Resurface Insomnia Plugin

Log API requests and responses made with Insomnia to your own system of record.

Requirements

  • docker
  • Resurface (free Docker container)

Set up

  • Go to Insomnia > Preferences > Plugins, type in insomnia-plugin-usage-logger and click Install Plugin.

(Alternatively, check out the manual installation.)

  • Create a new Environment to store the variables used by the logger.

That's it!

Usage

  • Make sure to select the environment you created before (also, make sure the plugin is enabled).
  • Use Insomnia as you would normally.
  • Go to http://localhost:4002 to explore all your logs using the included API Explorer

Happy loggin' 📝

Environment variables

This plugin has access to three environment variables, but only one them is required for the logger to work properly.

✔ All API calls are sent to the database running inside the docker container

The environment variable USAGE_LOGGERS_URL stores this address, which by default should be http://localhost:4001/message

✔ All API calls are filtered using a set of rules (Optional)

The environment variable USAGE_LOGGERS_RULES stores these rules. Learn more

✔ What if I want to disable the Logger? (Optional)

You can! By setting the environment variable USAGE_LOGGERS_DISABLE to true the logger will be disabled and no API calls will be logged.

In addition, if you're not using any other environment variables, you can just disable the environment and no API calls will be logged until you select the environment again.

Manual installation

  • Clone this repo inside:
    • MacOS: ~/Library/Application\ Support/Insomnia/plugins/
    • Windows: %APPDATA%\Insomnia\plugins\
    • Linux: $XDG_CONFIG_HOME/Insomnia/plugins/ or ~/.config/Insomnia/plugins/
  • Install dependencies using npm i

Protecting User Privacy

Loggers always have an active set of rules that control what data is logged and how sensitive data is masked. All of the examples above apply a predefined set of rules (include debug), but logging rules are easily customized to meet the needs of any application.

Logging rules documentation


© 2016-2021 Resurface Labs Inc.

Keywords

FAQs

Package last updated on 26 Aug 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc