@azure/eventgrid 4.9.1-alpha.20220408.2 → 4.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -4
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist-esm/src/eventGridClient.js +15 -16
- package/dist-esm/src/eventGridClient.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +1 -1
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/tracing.js +5 -4
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +10 -6
- package/types/eventgrid.d.ts +29 -1
package/CHANGELOG.md
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
-
## 4.
|
3
|
+
## 4.10.0-beta.1 (2022-04-14)
|
4
4
|
|
5
5
|
### Features Added
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
### Bugs Fixed
|
7
|
+
- Add support for specifiying a channel to send to in a specific Partner Topic via the `channelName` property of `SendOptions`.
|
10
8
|
|
11
9
|
### Other Changes
|
12
10
|
|
11
|
+
- Updated our `@azure/core-tracing` dependency to the latest version (1.0.0).
|
12
|
+
- Notable changes include Removal of `@opentelemetry/api` as a transitive dependency and ensuring that the active context is properly propagated.
|
13
|
+
- Customers who would like to continue using OpenTelemetry driven tracing should visit our [OpenTelemetry Instrumentation](https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk) package for instructions.
|
14
|
+
|
13
15
|
## 4.9.0 (2022-04-07)
|
14
16
|
|
15
17
|
### Features Added
|
package/dist/index.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var coreAuth = require('@azure/core-auth');
|
6
|
+
var tslib = require('tslib');
|
6
7
|
var coreClient = require('@azure/core-client');
|
7
8
|
var coreTracing = require('@azure/core-tracing');
|
8
9
|
var uuid = require('uuid');
|
@@ -7734,7 +7735,7 @@ class GeneratedClientContext extends coreClient__namespace.ServiceClient {
|
|
7734
7735
|
const defaults = {
|
7735
7736
|
requestContentType: "application/json; charset=utf-8"
|
7736
7737
|
};
|
7737
|
-
const packageDetails = `azsdk-js-eventgrid/4.
|
7738
|
+
const packageDetails = `azsdk-js-eventgrid/4.10.0-beta.1`;
|
7738
7739
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
7739
7740
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
7740
7741
|
: `${packageDetails}`;
|
@@ -7882,12 +7883,13 @@ function cloudEventDistributedTracingEnricherPolicy() {
|
|
7882
7883
|
|
7883
7884
|
// Copyright (c) Microsoft Corporation.
|
7884
7885
|
/**
|
7885
|
-
*
|
7886
|
+
* A tracing client to handle spans.
|
7886
7887
|
* @internal
|
7887
7888
|
*/
|
7888
|
-
const
|
7889
|
-
packagePrefix: "Azure.Data.EventGrid",
|
7889
|
+
const tracingClient = coreTracing.createTracingClient({
|
7890
7890
|
namespace: "Microsoft.Messaging.EventGrid",
|
7891
|
+
packageName: "@azure/event-grid",
|
7892
|
+
packageVersion: "4.9.0",
|
7891
7893
|
});
|
7892
7894
|
|
7893
7895
|
// Copyright (c) Microsoft Corporation.
|
@@ -7933,31 +7935,30 @@ class EventGridPublisherClient {
|
|
7933
7935
|
* @param events - The events to send. The events should be in the schema used when constructing the client.
|
7934
7936
|
* @param options - Options to control the underlying operation.
|
7935
7937
|
*/
|
7936
|
-
|
7937
|
-
|
7938
|
-
try {
|
7938
|
+
send(events, options = {}) {
|
7939
|
+
return tracingClient.withSpan("EventGridPublisherClient.send", options, (updatedOptions) => {
|
7939
7940
|
switch (this.inputSchema) {
|
7940
7941
|
case "EventGrid": {
|
7941
|
-
return
|
7942
|
+
return this.client.publishEvents(this.endpointUrl, events.map(convertEventGridEventToModelType), updatedOptions);
|
7942
7943
|
}
|
7943
7944
|
case "CloudEvent": {
|
7944
|
-
|
7945
|
+
// The underlying REST API expects a header named `aeg-channel-name`, and so the generated client
|
7946
|
+
// expects that options bag has a property called `aegChannelName`, where as we expose it with the
|
7947
|
+
// friendlier name "channelName". Fix up the impedence mismatch here
|
7948
|
+
const _a = updatedOptions, { channelName } = _a, sendOptions = tslib.__rest(_a, ["channelName"]);
|
7949
|
+
if (channelName) {
|
7950
|
+
sendOptions.aegChannelName = channelName;
|
7951
|
+
}
|
7952
|
+
return this.client.publishCloudEventEvents(this.endpointUrl, events.map(convertCloudEventToModelType), sendOptions);
|
7945
7953
|
}
|
7946
7954
|
case "Custom": {
|
7947
|
-
return
|
7955
|
+
return this.client.publishCustomEventEvents(this.endpointUrl, events, updatedOptions);
|
7948
7956
|
}
|
7949
7957
|
default: {
|
7950
7958
|
throw new Error(`Unknown input schema type '${this.inputSchema}'`);
|
7951
7959
|
}
|
7952
7960
|
}
|
7953
|
-
}
|
7954
|
-
catch (e) {
|
7955
|
-
span.setStatus({ code: coreTracing.SpanStatusCode.ERROR, message: e.message });
|
7956
|
-
throw e;
|
7957
|
-
}
|
7958
|
-
finally {
|
7959
|
-
span.end();
|
7960
|
-
}
|
7961
|
+
});
|
7961
7962
|
}
|
7962
7963
|
}
|
7963
7964
|
/**
|