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

@azure/communication-chat

Package Overview
Dependencies
Maintainers
3
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/communication-chat - npm Package Compare versions

Comparing version 1.0.0-alpha.20210219.1 to 1.0.0-alpha.20210226.1

26

dist-esm/src/tracing.js
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { getTracer } from "@azure/core-tracing";
import { SpanKind } from "@opentelemetry/api";
import { createSpanFunction } from "@azure/core-tracing";
/**
* Creates a span using the global tracer.
* @internal
* @param name - The name of the operation being performed.
* @param tracingOptions - The options for the underlying http request.
*/
export function createSpan(operationName, operationOptions) {
const tracer = getTracer();
const tracingOptions = operationOptions.tracingOptions || {};
const spanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { kind: SpanKind.INTERNAL });
const span = tracer.startSpan(`Azure.Communication.${operationName}`, spanOptions);
span.setAttribute("az.namespace", "Microsoft.Communication");
let newSpanOptions = tracingOptions.spanOptions || {};
if (span.isRecording()) {
newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { parent: span.context(), attributes: Object.assign(Object.assign({}, spanOptions.attributes), { "az.namespace": "Microsoft.Communication" }) });
}
const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions });
const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });
return {
span,
updatedOptions: newOperationOptions
};
}
export const createSpan = createSpanFunction({
packagePrefix: "Azure.Communication",
namespace: "Microsoft.Communication"
});
//# sourceMappingURL=tracing.js.map

2

package.json
{
"name": "@azure/communication-chat",
"version": "1.0.0-alpha.20210219.1",
"version": "1.0.0-alpha.20210226.1",
"description": "Azure client library for Azure Communication Chat services",

@@ -5,0 +5,0 @@ "sdk-type": "client",

@@ -1,13 +0,11 @@

import { Span } from "@opentelemetry/api";
import { OperationOptions } from "@azure/core-http";
/**
* Creates a span using the global tracer.
* @internal
* @param name - The name of the operation being performed.
* @param tracingOptions - The options for the underlying http request.
*/
export declare function createSpan<T extends OperationOptions>(operationName: string, operationOptions: T): {
span: Span;
export declare const createSpan: <T extends {
tracingOptions?: import("@azure/core-tracing").OperationTracingOptions | undefined;
}>(operationName: string, operationOptions: T | undefined) => {
span: import("@opentelemetry/api").Span;
updatedOptions: T;
};
//# sourceMappingURL=tracing.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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