Socket
Socket
Sign inDemoInstall

@sentry/opentelemetry

Package Overview
Dependencies
Maintainers
11
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/opentelemetry - npm Package Compare versions

Comparing version 7.82.0 to 7.83.0

cjs/debug-build.js

7

cjs/custom/hubextensions.js
Object.defineProperty(exports, '__esModule', { value: true });
const core = require('@sentry/core');
const utils = require('@sentry/utils');

@@ -26,4 +27,6 @@ /**

) {
// eslint-disable-next-line no-console
console.warn('startTransaction is a noop in @sentry/opentelemetry. Use `startSpan` instead.');
utils.consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn('startTransaction is a noop in @sentry/opentelemetry. Use `startSpan` instead.');
});
// We return an object here as hub.ts checks for the result of this

@@ -30,0 +33,0 @@ // and renders a different warning if this is empty

@@ -5,2 +5,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

const utils = require('@sentry/utils');
const debugBuild = require('../debug-build.js');
const semanticAttributes = require('../semanticAttributes.js');

@@ -49,4 +50,3 @@ const convertOtelTimeToSeconds = require('../utils/convertOtelTimeToSeconds.js');

getSpan() {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
utils.logger.warn('Calling getSpan() is a noop in @sentry/opentelemetry. Use `getActiveSpan()` instead.');
debugBuild.DEBUG_BUILD && utils.logger.warn('Calling getSpan() is a noop in @sentry/opentelemetry. Use `getActiveSpan()` instead.');

@@ -61,3 +61,3 @@ return undefined;

setSpan(_span) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.warn('Calling setSpan() is a noop in @sentry/opentelemetry. Use `startSpan()` instead.');
debugBuild.DEBUG_BUILD && utils.logger.warn('Calling setSpan() is a noop in @sentry/opentelemetry. Use `startSpan()` instead.');

@@ -64,0 +64,0 @@ return this;

@@ -7,2 +7,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

const utils = require('@sentry/utils');
const debugBuild = require('./debug-build.js');
const semanticAttributes = require('./semanticAttributes.js');

@@ -44,8 +45,7 @@ const contextData = require('./utils/contextData.js');

parentSampled = getParentRemoteSampled(parentContext, context);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled}`);
} else {
parentSampled = Boolean(parentContext.traceFlags & api.TraceFlags.SAMPLED);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
utils.logger.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
}

@@ -73,3 +73,3 @@ }

if (!isValidSampleRate(sampleRate)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.warn('[Tracing] Discarding span because of invalid sample rate.');
debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Discarding span because of invalid sample rate.');

@@ -84,3 +84,3 @@ return {

if (!sampleRate) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.log(

@@ -106,3 +106,3 @@ `[Tracing] Discarding span because ${

if (!isSampled) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.log(

@@ -163,3 +163,3 @@ `[Tracing] Discarding span because it's not included in the random sample (sampling rate = ${Number(

if (utils.isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.warn(

@@ -175,3 +175,3 @@ `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(

if (rate < 0 || rate > 1) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);

@@ -178,0 +178,0 @@ return false;

@@ -11,2 +11,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

const transaction = require('./custom/transaction.js');
const debugBuild = require('./debug-build.js');
const semanticAttributes = require('./semanticAttributes.js');

@@ -49,3 +50,3 @@ const convertOtelTimeToSeconds = require('./utils/convertOtelTimeToSeconds.js');

(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
utils.logger.log(`SpanExporter exported ${sentSpanCount} spans, ${remainingOpenSpanCount} unsent spans remaining`);

@@ -55,3 +56,3 @@

const shouldDrop = shouldCleanupSpan(span, 5 * 60);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
debugBuild.DEBUG_BUILD &&
shouldDrop &&

@@ -58,0 +59,0 @@ utils.logger.log(

@@ -7,2 +7,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

const hub = require('./custom/hub.js');
const debugBuild = require('./debug-build.js');
const spanExporter = require('./spanExporter.js');

@@ -60,3 +61,3 @@ const captureExceptionForTimedEvent = require('./utils/captureExceptionForTimedEvent.js');

(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log(`[Tracing] Starting span "${span.name}" (${span.spanContext().spanId})`);
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Starting span "${span.name}" (${span.spanContext().spanId})`);

@@ -68,3 +69,3 @@ return super.onStart(span, parentContext);

onEnd(span) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log(`[Tracing] Finishing span "${span.name}" (${span.spanContext().spanId})`);
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing span "${span.name}" (${span.spanContext().spanId})`);

@@ -71,0 +72,0 @@ if (!this._shouldSendSpanToSentry(span)) {

import { addTracingExtensions as addTracingExtensions$1, getMainCarrier } from '@sentry/core';
import { consoleSandbox } from '@sentry/utils';

@@ -24,4 +25,6 @@ /**

) {
// eslint-disable-next-line no-console
console.warn('startTransaction is a noop in @sentry/opentelemetry. Use `startSpan` instead.');
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn('startTransaction is a noop in @sentry/opentelemetry. Use `startSpan` instead.');
});
// We return an object here as hub.ts checks for the result of this

@@ -28,0 +31,0 @@ // and renders a different warning if this is empty

import { Scope } from '@sentry/core';
import { logger, dateTimestampInSeconds, dropUndefinedKeys, normalize } from '@sentry/utils';
import { DEBUG_BUILD } from '../debug-build.js';
import { InternalSentrySemanticAttributes } from '../semanticAttributes.js';

@@ -46,4 +47,3 @@ import { convertOtelTimeToSeconds } from '../utils/convertOtelTimeToSeconds.js';

getSpan() {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
logger.warn('Calling getSpan() is a noop in @sentry/opentelemetry. Use `getActiveSpan()` instead.');
DEBUG_BUILD && logger.warn('Calling getSpan() is a noop in @sentry/opentelemetry. Use `getActiveSpan()` instead.');

@@ -58,3 +58,3 @@ return undefined;

setSpan(_span) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Calling setSpan() is a noop in @sentry/opentelemetry. Use `startSpan()` instead.');
DEBUG_BUILD && logger.warn('Calling setSpan() is a noop in @sentry/opentelemetry. Use `startSpan()` instead.');

@@ -61,0 +61,0 @@ return this;

@@ -5,2 +5,3 @@ import { trace, isSpanContextValid, TraceFlags } from '@opentelemetry/api';

import { logger, isNaN } from '@sentry/utils';
import { DEBUG_BUILD } from './debug-build.js';
import { InternalSentrySemanticAttributes } from './semanticAttributes.js';

@@ -42,8 +43,7 @@ import { getPropagationContextFromContext } from './utils/contextData.js';

parentSampled = getParentRemoteSampled(parentContext, context);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled}`);
} else {
parentSampled = Boolean(parentContext.traceFlags & TraceFlags.SAMPLED);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
logger.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
DEBUG_BUILD && logger.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
}

@@ -71,3 +71,3 @@ }

if (!isValidSampleRate(sampleRate)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Tracing] Discarding span because of invalid sample rate.');
DEBUG_BUILD && logger.warn('[Tracing] Discarding span because of invalid sample rate.');

@@ -82,3 +82,3 @@ return {

if (!sampleRate) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.log(

@@ -104,3 +104,3 @@ `[Tracing] Discarding span because ${

if (!isSampled) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.log(

@@ -161,3 +161,3 @@ `[Tracing] Discarding span because it's not included in the random sample (sampling rate = ${Number(

if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.warn(

@@ -173,3 +173,3 @@ `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(

if (rate < 0 || rate > 1) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);

@@ -176,0 +176,0 @@ return false;

@@ -9,2 +9,3 @@ import { SpanKind } from '@opentelemetry/api';

import { startTransaction } from './custom/transaction.js';
import { DEBUG_BUILD } from './debug-build.js';
import { InternalSentrySemanticAttributes } from './semanticAttributes.js';

@@ -47,3 +48,3 @@ import { convertOtelTimeToSeconds } from './utils/convertOtelTimeToSeconds.js';

(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
logger.log(`SpanExporter exported ${sentSpanCount} spans, ${remainingOpenSpanCount} unsent spans remaining`);

@@ -53,3 +54,3 @@

const shouldDrop = shouldCleanupSpan(span, 5 * 60);
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
DEBUG_BUILD &&
shouldDrop &&

@@ -56,0 +57,0 @@ logger.log(

@@ -5,2 +5,3 @@ import { trace, ROOT_CONTEXT } from '@opentelemetry/api';

import { getCurrentHub } from './custom/hub.js';
import { DEBUG_BUILD } from './debug-build.js';
import { SentrySpanExporter } from './spanExporter.js';

@@ -58,3 +59,3 @@ import { maybeCaptureExceptionForTimedEvent } from './utils/captureExceptionForTimedEvent.js';

(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Starting span "${span.name}" (${span.spanContext().spanId})`);
DEBUG_BUILD && logger.log(`[Tracing] Starting span "${span.name}" (${span.spanContext().spanId})`);

@@ -66,3 +67,3 @@ return super.onStart(span, parentContext);

onEnd(span) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing span "${span.name}" (${span.spanContext().spanId})`);
DEBUG_BUILD && logger.log(`[Tracing] Finishing span "${span.name}" (${span.spanContext().spanId})`);

@@ -69,0 +70,0 @@ if (!this._shouldSendSpanToSentry(span)) {

{
"name": "@sentry/opentelemetry",
"version": "7.82.0",
"version": "7.83.0",
"description": "Official Sentry utilities for OpenTelemetry",

@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "7.82.0",
"@sentry/types": "7.82.0",
"@sentry/utils": "7.82.0"
"@sentry/core": "7.83.0",
"@sentry/types": "7.83.0",
"@sentry/utils": "7.83.0"
},

@@ -31,0 +31,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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