Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@postman/postman-sdk

Package Overview
Dependencies
Maintainers
341
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postman/postman-sdk - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

2

build/postman/base-sdk.js

@@ -41,3 +41,3 @@ "use strict";

}
const keysOfProps = ["collectionId", "apiToken", "collectorEndpoint", "testCollectorEndpoint", "samplingRatio", "enable", "debug", "dataTruncation", "environment", "configFilePath", "dataRedactions"];
const keysOfProps = ["collectionId", "apiKey", "receiverEndpoint", "testreceiverEndpoint", "samplingRatio", "enable", "debug", "dataTruncation", "environment", "configFilePath", "dataRedactions"];
for (let key of keysOfProps) {

@@ -44,0 +44,0 @@ if (!(key in config)) {

import { DataRedactionRules } from './data-redaction-rules';
/**
* BaseConfig, defines Instrumentation configurations.
* collectorEndpoint: where the data should be shipped to collector's http endpoint.
* apiToken: any api key needed for collector
* testCollectorEndpoint: additional collector endpoint for testing.
* receiverEndpoint: where the data should be shipped to collector's http endpoint.
* apiKey: any api key needed for collector
* testreceiverEndpoint: additional collector endpoint for testing.
* samplingRatio: sampling ration ( TO-DO)

@@ -14,6 +14,6 @@ * enable: enable or disable tracing.

export interface BaseConfig {
collectionId?: string;
apiToken?: string;
collectorEndpoint?: string;
testCollectorEndpoint?: string;
collectionId?: string | string[];
apiKey?: string;
receiverEndpoint?: string;
testreceiverEndpoint?: string;
samplingRatio?: number | string;

@@ -20,0 +20,0 @@ enable?: boolean;

@@ -23,3 +23,3 @@ "use strict";

initialize(config) {
var _a, _b;
var _a, _b, _c;
this.config = config;

@@ -32,5 +32,8 @@ if (!this.config) {

}
if (typeof ((_a = this.config) === null || _a === void 0 ? void 0 : _a.collectionId) === 'string') {
this.config.collectionId = (_b = this.config) === null || _b === void 0 ? void 0 : _b.collectionId.split(',');
}
const provider = new sdk_trace_node_1.NodeTracerProvider({
resource: new resources_1.Resource({
[semantic_attributes_1.POSTMAN_COLLECTION_IDS]: JSON.stringify((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.collectionId) === null || _b === void 0 ? void 0 : _b.split(','))
[semantic_attributes_1.POSTMAN_COLLECTION_IDS]: JSON.stringify((_c = this.config) === null || _c === void 0 ? void 0 : _c.collectionId)
})

@@ -77,8 +80,8 @@ });

};
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.collectorEndpoint) {
otelExporterConfig.url = this.config.collectorEndpoint;
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.receiverEndpoint) {
otelExporterConfig.url = this.config.receiverEndpoint;
}
if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.apiToken) {
if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.apiKey) {
otelExporterConfig.headers = {
'x-api-key': this.config.apiToken
'x-api-key': this.config.apiKey
};

@@ -85,0 +88,0 @@ }

@@ -1,1 +0,1 @@

export declare const VERSION = "0.0.24";
export declare const VERSION = "0.0.26";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '0.0.24';
exports.VERSION = '0.0.26';
{
"name": "@postman/postman-sdk",
"version": "0.0.25",
"version": "0.0.26",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -6,6 +6,9 @@ ### About

### Installation
```
npm install @postman/postman-sdk
```
At the top of your app.js file, before app is initialized add this.
```

@@ -20,10 +23,11 @@ initialize({

SDK's initialization can be configured with these values
- **collectionId**: Postman collectionId where requests will be added.
- type: string
- **apiToken**: any api key needed for collector
- type: string
- **collectorEndpoint**: where the data should be shipped to collector's http endpoint.
- type: string
- **apiKey**: Postman api key needed for collector
- type: string
- **receiverEndpoint**: where the data should be shipped to collector's http endpoint.
- type: string(valid url)
- default: 'https://trace-service-receiver.postman-beta.tech/traces'
- **testCollectorEndpoint**: additional collector endpoint for testing.
- **testreceiverEndpoint**: additional collector endpoint for testing.
- type: string (valid url)

@@ -40,5 +44,6 @@ - **samplingRatio**: sampling ration ( TO-DO)

- **environment**: instrumentation environment development/prod etc. ( implementation TO-DO)
- type: string
- type: string
- **configFilePath**: path to config YAML file.
- type: string
- type: string
```

@@ -49,1 +54,2 @@

```
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