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

@arms/rum-core

Package Overview
Dependencies
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arms/rum-core - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

1

lib/model/reporter.js

@@ -7,3 +7,2 @@ "use strict";

var _exception = require("../utils/exception");
// import { IReporter } from '../types/reporter';
var Reporter = exports["default"] = /*#__PURE__*/function () {

@@ -10,0 +9,0 @@ function Reporter() {

@@ -5,3 +5,2 @@ import { ICollector } from './collector';

import { RumEvent, RumEventBundle, IViewData } from './rum-event';
import { ITracingOption } from '../utils/trace';
export declare enum EventType {

@@ -96,7 +95,3 @@ /**

collectors?: any;
/**
* tracing 配置 'tracecontext' | 'b3' | 'b3multi' | 'jaeger';
*/
tracing?: boolean | ITracingOption;
[key: string]: any;
}

9

lib/utils/trace.d.ts

@@ -7,8 +7,2 @@ import { MatchOption } from "./match";

};
export type Baggage = {
appType?: string;
pid?: string;
uid?: string;
sid?: string;
};
export declare function isTraceOption(option: any): option is TraceOption;

@@ -19,2 +13,3 @@ export interface ITracingOption {

allowedUrls?: Array<MatchOption | TraceOption> | undefined;
tracestate?: boolean;
baggage?: boolean;

@@ -27,3 +22,3 @@ }

}
export declare function makeTracingHeaders(traceId: string, spanId: string, sampled: boolean, propagatorTypes: PropagatorType[], baggage?: Baggage): ITracingHeaders;
export declare function makeTracingHeaders(traceId: string, spanId: string, sampled: boolean, propagatorTypes: PropagatorType[], tracestate?: string, baggage?: string): ITracingHeaders;
export declare function parseTracingOptions(tracingOption: boolean | ITracingOption): ITracingOption;

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

function isTraceOption(option) {
return option && (0, _match.isMatchOption)(option.match) && Array.isArray(option.propagatorTypes);
return option && (0, _match.isMatchOption)(option.match) && (0, _is.isArray)(option.propagatorTypes);
}

@@ -42,3 +42,3 @@ function generateId(bytes) {

}
function makeTracingHeaders(traceId, spanId, sampled, propagatorTypes, baggage) {
function makeTracingHeaders(traceId, spanId, sampled, propagatorTypes, tracestate, baggage) {
var tracingHeaders = {};

@@ -63,2 +63,5 @@ var sample = sampled ? '1' : '0';

tracingHeaders['traceparent'] = "00-" + traceId + "-" + spanId + "-0" + sample;
if (tracestate) {
tracingHeaders['tracestate'] = tracestate;
}
break;

@@ -68,7 +71,3 @@ }

if (baggage) {
var bagValList = ['rum=v2'];
Object.keys(baggage).forEach(function (key) {
bagValList.push(key + "=" + baggage[key]);
});
bagValList.length && (tracingHeaders['baggage'] = bagValList.join(','));
tracingHeaders['baggage'] = baggage;
}

@@ -83,3 +82,4 @@ return tracingHeaders;

allowedUrls: [],
baggage: true
tracestate: true,
baggage: false
};

@@ -93,4 +93,6 @@ }

allowedUrls = _tracingOption$allowe === void 0 ? [] : _tracingOption$allowe,
_tracingOption$traces = tracingOption.tracestate,
tracestate = _tracingOption$traces === void 0 ? true : _tracingOption$traces,
_tracingOption$baggag = tracingOption.baggage,
baggage = _tracingOption$baggag === void 0 ? true : _tracingOption$baggag;
baggage = _tracingOption$baggag === void 0 ? false : _tracingOption$baggag;
var traceOptions = [];

@@ -113,4 +115,5 @@ if ((0, _is.isArray)(allowedUrls) && allowedUrls.length) {

allowedUrls: traceOptions,
tracestate: tracestate,
baggage: baggage
};
}
{
"name": "@arms/rum-core",
"version": "0.0.7",
"version": "0.0.8",
"description": "arms rum javascript sdk core",

@@ -5,0 +5,0 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>",

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